caffe中draw_net 无法使用

在调用caffe中draw_net 的时候报错

 sudo python /home/yuanshuai/caffe/python/draw_net.py /home/yuanshuai/caffe/examples/mnist/lenet_train_test.prototxt /home/yuanshuai/lenet.png --rankdir=LR  

错误如下:

 Drawing net to /home/yuanshuai/lenet.png
Traceback (most recent call last):
  File "/home/yuanshuai/caffe/python/draw_net.py", line 58, in <module>
    main()
  File "/home/yuanshuai/caffe/python/draw_net.py", line 54, in main
    phase)
  File "/home/yuanshuai/caffe/python/caffe/draw.py", line 244, in draw_net_to_file
    fid.write(draw_net(caffe_net, rankdir, ext, phase))
  File "/home/yuanshuai/caffe/python/caffe/draw.py", line 223, in draw_net
    return get_pydot_graph(caffe_net, rankdir, phase=phase).create(format=ext)
  File "/home/yuanshuai/caffe/python/caffe/draw.py", line 167, in get_pydot_graph
    node_label = get_layer_label(layer, rankdir)
        File "/home/yuanshuai/caffe/python/caffe/draw.py", line 107, in get_layer_label
    layer.pooling_param.kernel_size[0] if len(layer.pooling_param.kernel_size._values) else 1,
AttributeError: 'int' object has no attribute '_values'



楼主 您好 我也遇到同样的问题? 请问你解决了吗?

https://github.com/BVLC/caffe/issues/5324

你们后来怎么解决的啊?

caffe-master/python/caffe/draw.py 源码有bug,去github上更新一个最新版的caffe-master即可