问题
Here is the code
with tf.variable_scope(scope, 'resnet_v2', [inputs], reuse=reuse) as sc:
end_points_collection = sc.original_name_scope + '_end_points'
with slim.arg_scope([slim.conv2d, bottleneck, stack_blocks_dense],
outputs_collections=[end_points_collection]):
ValueError: ('%s is not decorated with @add_arg_scope', ('main', 'bottleneck')) d:\resnet\main_resnet.py(219)resnet_v2() -> outputs_collections=[end_points_collection])
So what is wrong with the code?
回答1:
forgive my stupid question, just decorates the function with @add_arg_scope before the definition of bottleneck
@add_arg_scope
def bottleneck():
来源:https://stackoverflow.com/questions/52838304/valueerror-s-is-not-decorated-with-add-arg-scope-main-bottleneck