Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

problem in draw model for this AttributeError: 'int' object has no attribute '_values' #5328

Closed
LinChuangwei opened this issue Feb 24, 2017 · 3 comments

Comments

@LinChuangwei
Copy link

when i draw model,someting happend like this:
Drawing net to netImage/lenet.png
Traceback (most recent call last):
File "python/draw_net.py", line 57, in
main()
File "python/draw_net.py", line 53, in main
caffe.draw.draw_net_to_file(net, args.output_image_file, args.rankdir,phase)
File "/home/linchuangwei/caffe/python/caffe/draw.py", line 245, in draw_net_to_file
fid.write(draw_net(caffe_net, rankdir, ext, phase))
File "/home/linchuangwei/caffe/python/caffe/draw.py", line 223, in draw_net
return get_pydot_graph(caffe_net, rankdir, phase=phase).create(format=ext)
File "/home/linchuangwei/caffe/python/caffe/draw.py", line 167, in get_pydot_graph
node_label = get_layer_label(layer, rankdir)
File "/home/linchuangwei/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'

someone knows why?please help me

@ToTheBeginning
Copy link

You can see my closed issue issue 5324.

@foobar167
Copy link

You could either fix bug in Caffe's draw.py file manually or switch to older version of draw.py file.

  1. To fix it manually just delete changes made here. There are 3 additions to draw.py marked with green color. Delete them.
  2. Go here and download Caffe release candidate 4 (previous version). Copy-paste file caffe-rc4.zip/caffe-rc4/python/caffe/draw.py to your working directory.

P.S. After fixing bug you most likely should install Graphviz - Graph Visualization Software to visualize your graph.

@shelhamer
Copy link
Member

Thanks for reporting the issue! Fixed in #5477 and #5487.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants