1

我需要帮助来理解 TensorFlow 中的这个嵌套参数范围:

def vgg_arg_scope(weight_decay=0.0005):
  """Defines the VGG arg scope.
  Args:
    weight_decay: The l2 regularization coefficient.
  Returns:
    An arg_scope.
  """
  with arg_scope(
          [layers.conv2d, layers_lib.fully_connected],
          activation_fn=nn_ops.relu,
          weights_regularizer=regularizers.l2_regularizer(weight_decay),
          biases_initializer=init_ops.zeros_initializer()):
    with arg_scope([layers.conv2d], padding='SAME') as arg_sc:
        return arg_sc

我所理解的是,外部级别的范围适用于函数

[layers.conv2d, layers_lib.fully_connected]. 

内层作用域是做什么的?

4

1 回答 1

0

内部 arg_scope 适用padding='SAME'layers.conv2d但不适用于layers_lib.fully_connected,它可能没有padding参数。

于 2017-12-12T07:52:18.430 回答