ValueError: ('%s is not decorated with @add_arg_scope', ('__main__', 'bottleneck'))

☆樱花仙子☆ 提交于 2021-02-11 14:51:43

问题


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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!