Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/python/323.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Python tensorflow-slim修正resnet模型_Python_Tensorflow_Tensorflow Slim - Fatal编程技术网

Python tensorflow-slim修正resnet模型

Python tensorflow-slim修正resnet模型,python,tensorflow,tensorflow-slim,Python,Tensorflow,Tensorflow Slim,我想修改resnet_v2.resnet_v2_50模型,以便将一个数字连接到pool5层。 导入网络后,我可以在end_points变量中看到层 with slim.arg_scope(resnet_v2.resnet_arg_scope()): net, end_points = resnet_v2.resnet_v2_50(self.imageIn, num_classes = numClasses) 所以我可以访问不同的层 curr_conv1 = end_po

我想修改resnet_v2.resnet_v2_50模型,以便将一个数字连接到pool5层。 导入网络后,我可以在end_points变量中看到层

    with slim.arg_scope(resnet_v2.resnet_arg_scope()):
        net, end_points = resnet_v2.resnet_v2_50(self.imageIn, num_classes = numClasses)
所以我可以访问不同的层

curr_conv1 = end_points['resnet_v2_50/conv1']
curr_pred = end_points['resnet_v2_50/predictions']
curr_block4 = end_points['mainQN/resnet_v2_50/block4/unit_3/bottleneck_v2']
但我无法访问池层之后网络的最后一部分

curr_pool5 = end_points['resnet_v2_50/pool5']
但是我可以在Tensorboard和resnet_v2_50的代码中看到,有一种pool5层。如何访问它,以便修改它并将一个数字连接到它

end_points['global_pool']
这就是你想要的。这紧跟在代码中名为pool5的全局池层之后