title: How to restore logits
body: <p>When we declare the variable logits, the variables: </p>
  
  <p>fully_connected/weights_1:0,</p>
  
  <p>fully_connected/biases_1:0</p>
  
  <p>are created. How can I restore logits without this happening?</p>
  
  <p>All global variables are:</p>
  
  <p>fully_connected/weights:0, 
  fully_connected/biases:0, 
  beta1_power:0, 
  beta2_power:0, 
  fully_connected/weights/Adam:0, 
  fully_connected/weights/Adam_1:0, 
  fully_connected/biases/Adam:0, 
  fully_connected/biases/Adam_1:0, 
  fully_connected/weights_1:0, 
  fully_connected/biases_1:0</p>
  
  <pre><code>ROOT_PATH = "datasets"
  directory = TEST_DATA_SET
  test_data_dir = os.path.join(ROOT_PATH, directory, "Testing")
  
  # Restore session and variables/nodes/weights
  session = tf.Session()
  meta_file = os.path.join("output", MODEL_DIR, "save.ckpt.meta")
  new_saver = tf.train.import_meta_graph(meta_file)
  checkpoint_dir = os.path.join("output", MODEL_DIR)
  new_saver.restore(session, tf.train.latest_checkpoint(checkpoint_dir))
  
  # Load the test dataset.
  test_images, test_labels = load_data(test_data_dir)
  
  # Transform the images, just like we did with the training set.
  test_images32 = [skimage.transform.resize(image, (IMAGE_SCALE_SIZE_X, IMAGE_SCALE_SIZE_Y)) for image in test_images]
  
  # Create a graph to hold the model.
  graph = session.graph
  #with graph.as_default():
  # Placeholders for inputs and labels.
  images_ph = tf.placeholder(tf.float32, [None, IMAGE_SCALE_SIZE_X, IMAGE_SCALE_SIZE_Y, 3])
  
  # Flatten input from: [None, height, width, channels]
  # To: [None, height * width * channels] == [None, 3072]
  
  images_flat = tf.contrib.layers.flatten(images_ph)
  
  # Fully connected layer.
  # Generates logits of size [None, 62]
  logits = tf.contrib.layers.fully_connected(images_flat, 62, tf.nn.relu)
  
  predicted_labels = tf.argmax(logits, 1)
  </code></pre>