(fc_weights, fc_bias, make_copies)
return fc_weights, fc_bias, fc_vars_copy_ops
Gets copies of the classifier layer variables or returns those variables.

  At meta-test time, a copy is created for the given Variables, and these copies
  copies will be used in place of the original ones.

  Args:
    fc_weights: A Variable for the weights of the fc layer.
    fc_bias: A Variable for the bias of the fc layer.
    make_copies: A bool. Whether to copy the given variables. If not, those
      variables themselves are returned.

  Returns:
    fc_weights: A Variable for the weights of the fc layer. Might be the same as
      the input fc_weights or a copy of it.
    fc_bias: Analogously, a Variable for the bias of the fc layer.
    fc_vars_copy_ops: A (possibly empty) list of operations for assigning the
      value of each of fc_weights and fc_bias to a respective copy variable.
Gets copies of the classifier layer variables or returns those variables.
Gets copies of the classifier layer variables or returns those variables .
def get_fc_vars_copy_ops(fc_weights, fc_bias, make_copies):
  """Gets copies of the classifier layer variables or returns those variables.

  At meta-test time, a copy is created for the given Variables, and these copies
  copies will be used in place of the original ones.

  Args:
    fc_weights: A Variable for the weights of the fc layer.
    fc_bias: A Variable for the bias of the fc layer.
    make_copies: A bool. Whether to copy the given variables. If not, those
      variables themselves are returned.

  Returns:
    fc_weights: A Variable for the weights of the fc layer. Might be the same as
      the input fc_weights or a copy of it.
    fc_bias: Analogously, a Variable for the bias of the fc layer.
    fc_vars_copy_ops: A (possibly empty) list of operations for assigning the
      value of each of fc_weights and fc_bias to a respective copy variable.
  """
  fc_vars_copy_ops = []
  if make_copies:
    with tf.variable_scope('weight_copy'):
      # fc_weights copy
      fc_weights_copy = tf.Variable(
          tf.zeros(fc_weights.shape.as_list()),
          collections=[tf.GraphKeys.LOCAL_VARIABLES])
      fc_weights_copy_op = tf.assign(fc_weights_copy, fc_weights)
      fc_vars_copy_ops.append(fc_weights_copy_op)

      # fc_bias copy
      fc_bias_copy = tf.Variable(
          tf.zeros(fc_bias.shape.as_list()),
          collections=[tf.GraphKeys.LOCAL_VARIABLES])
      fc_bias_copy_op = tf.assign(fc_bias_copy, fc_bias)
      fc_vars_copy_ops.append(fc_bias_copy_op)

      fc_weights = fc_weights_copy
      fc_bias = fc_bias_copy
  return fc_weights, fc_bias, fc_vars_copy_ops
def get_fc_vars_copy_ops ( fc_weights , fc_bias , make_copies ) : fc_vars_copy_ops = [ ] if make_copies : with tf . variable_scope ( 'weight_copy' ) : # fc_weights copy fc_weights_copy = tf . Variable ( tf . zeros ( fc_weights . shape . as_list ( ) ) , collections = [ tf . GraphKeys . LOCAL_VARIABLES ] ) fc_weights_copy_op = tf . assign ( fc_weights_copy , fc_weights ) fc_vars_copy_ops . append ( fc_weights_copy_op ) # fc_bias copy fc_bias_copy = tf . Variable ( tf . zeros ( fc_bias . shape . as_list ( ) ) , collections = [ tf . GraphKeys . LOCAL_VARIABLES ] ) fc_bias_copy_op = tf . assign ( fc_bias_copy , fc_bias ) fc_vars_copy_ops . append ( fc_bias_copy_op ) fc_weights = fc_weights_copy fc_bias = fc_bias_copy return fc_weights , fc_bias , fc_vars_copy_ops