Machine learning 如何通过Pycaffe获得图层的输出形状
标题已经包含了一个完整的问题:如何使用Pycaffe获得Caffe模型给定层的输出形状Machine learning 如何通过Pycaffe获得图层的输出形状,machine-learning,neural-network,deep-learning,caffe,pycaffe,Machine Learning,Neural Network,Deep Learning,Caffe,Pycaffe,标题已经包含了一个完整的问题:如何使用Pycaffe获得Caffe模型给定层的输出形状 我有一个caffe.Net()对象,现在我需要模型中特定层的输出形状。给定层名称,可以通过以下方式获取其索引: l_idx = list(net._layer_names).index(my_layer_name) 一旦您有了l_idx,您就可以得到它的输出(也称为“top”s): 对于每个“top”,您都可以获得信息 for tn in tops: print "output name {} has
我有一个
caffe.Net()
对象,现在我需要模型中特定层的输出形状。给定层名称,可以通过以下方式获取其索引:
l_idx = list(net._layer_names).index(my_layer_name)
一旦您有了l_idx
,您就可以得到它的输出(也称为“top”
s):
对于每个“top”
,您都可以获得信息
for tn in tops:
print "output name {} has shape {}".format(tn, net.blobs[tn].data.shape)
可以找到关于如何通过pycaffe接口访问网络结构的更详细示例
for tn in tops:
print "output name {} has shape {}".format(tn, net.blobs[tn].data.shape)