title: Tensorflow reuse when inference?
body: <p>Does tensorflow need to set the reuse ==True when finish training and inference?
  I have a network like this: </p>
  
  <pre><code>def __build_net(self,placeholder,reuse=False):
           with tf.variable_scope('siamse',reuse=reuse):
               layer = tf.layers.dense(placeholder,3000,activation=tf.nn.leaky_relu)
               layer = tf.layers.batch_normalization(layer)
  
               embedding= tf.layers.dense(layer,300,activation = tf.nn.leaky_relu)
               print('Siamse Net has built',flush=True)
           return embedding
  </code></pre>
  
  <p>And I create two network share same parameter: </p>
  
  <pre><code>self.embedding1=self.__build_net(self.centers_placeholder)
  self.embedding2=self.__build_net(self.neighbors_placeholder,reuse=True)
  </code></pre>
  
  <p>I used this network to generate embeddings of some kind of data. </p>
  
  <p>My question is: Do I need to set the reuse to True when doing inference(generate embedding) like this:</p>
  
  <pre><code>       with tf.Session() as sess:
          self.saver.restore(sess,self.store_path+self.model_type+'_model_'+str(self.model_num)+'_'+str(self.center_size)+'_'+str(self.neighbor_size)+'.ckpt')
          embedding = self.__build_net(self.centers_placeholder,reuse=True)
          embeddings = sess.run(embedding,feed_dict = {self.centers_placeholder : data})
  </code></pre>
  
  <p>Or like this: </p>
  
  <pre><code>    with tf.Session() as sess:
          self.saver.restore(sess,self.store_path+self.model_type+'_model_'+str(self.model_num)+'_'+str(self.center_size)+'_'+str(self.neighbor_size)+'.ckpt')
          embedding = self.__build_net(self.centers_placeholder,reuse=False)
          embeddings = sess.run(embedding,feed_dict = {self.centers_placeholder : data})
  </code></pre>
  
  <p>And then, When set the variable scope, do I need to give a name to each layer?</p>
  
  <p>Thanks!</p>