draw_net.py绘制结构图报错AttributeError 'google.protobuf.pyext._message.Repeated' has no attribute '_values

~/caffe/python$ python draw_net.py ../models/bvlc_reference_caffenet/train_val.prototxt caffenet.png
Drawing net to caffenet.png
Traceback (most recent call last):
  File "draw_net.py", line 58, in <module>
    main()
  File "draw_net.py", line 54, in main
    phase)
  File "/home/zkk/caffe/python/caffe/draw.py", line 244, in draw_net_to_file
    fid.write(draw_net(caffe_net, rankdir, ext, phase))
  File "/home/zkk/caffe/python/caffe/draw.py", line 223, in draw_net
    return get_pydot_graph(caffe_net, rankdir, phase=phase).create(format=ext)
  File "/home/zkk/caffe/python/caffe/draw.py", line 167, in get_pydot_graph
    node_label = get_layer_label(layer, rankdir)
  File "/home/zkk/caffe/python/caffe/draw.py", line 94, in get_layer_label
    layer.convolution_param.kernel_size[0] if len(layer.convolution_param.kernel_size._values) else 1,
AttributeError: 'google.protobuf.pyext._message.RepeatedScalarConta' object has no attribute '_values'

我的笔记本上只装了caffe,没有装cuda和matlab可以运行draw_net.py,但是我的台式机把所有东西装完后就不能画了,两个机器上的protobuf版本都是2.6,我感觉是哪块路径不太对,但是也查不出来,有没有高手可以指点一下
已邀请:

renhanchi

赞同来自:

遇到同样问题,解决不了。我的也是台式机,安装了cuda7.5, cudnn-4和matlab。

美嫣1991

赞同来自:

我的是draw.py报错:no attribute'_values',发现文件里多了几行删掉就不报错了。这个好像是版本问题。你可以从网上看看人家能运行的py文件看看,是不是你的和别人不一样
 

要回复问题请先登录注册