title: Weight sharing in Keras
body: <p>I am trying to use same weight for two layers which are named <code>dense3</code> in the code below. I know using <code>dense3</code> as name is not allowed as layers need to have unique names.</p>
  
  <p>What is the best was to specify same weight different layers in Keras?</p>
  
  <pre><code>model = keras.Sequential([
      keras.layers.Flatten(input_shape=(28, 28)),
      keras.layers.Dense(128, activation=tf.nn.relu,name='dense_1'),
      keras.layers.Dense(10, activation=tf.nn.relu, name='dense_2'),
      keras.layers.Dense(10, activation=tf.nn.relu,name='dense_3' ),
      keras.layers.Dense(10, activation=tf.nn.relu,name='dense_3' ),
      keras.layers.Dense(10, activation=tf.nn.softmax)
  ])
  </code></pre>