title: Tensorflow Resnet full-connected layer
body: <p>I'm studying on the Tensorflow official example of Resnet (<a href="https://github.com/tensorflow/models/blob/master/official/resnet/resnet_model.py" rel="nofollow noreferrer">https://github.com/tensorflow/models/blob/master/official/resnet/resnet_model.py</a>), and I don't understand the expression of the last layer of its model:</p>
  
  <pre><code>inputs = tf.reshape(inputs, [-1, self.final_size])
  </code></pre>
  
  <p>where the final_size is equal to <code>inputs.get_shape().as_list()[-1]</code> if my interpretation is correct.
  But for normal CNN model, the expressions of the last fully-connected layer are something like:</p>
  
  <pre><code>reshape = tf.reshape(pool2, [images.get_shape()[0], -1])
  dim = reshape.get_shape()[1].value
  weights = _variable_with_weight_decay('weights', shape=[dim, 384],
                                        stddev=0.04, wd=0.004)
  biases = _variable_on_cpu('biases', [384], tf.constant_initializer(0.1))
  local3 = tf.nn.relu(tf.matmul(reshape, weights) + biases, name=scope.name)
  _activation_summary(local3)
  </code></pre>
  
  <p>And I have another question about the reuse of the model, is it only necessary to use get_variable() to initialize variables only when we use multiple GPUs? </p>