-
Notifications
You must be signed in to change notification settings - Fork 362
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
AttributeError: 'Dot' object has no attribute '_repr_svg_' #52
Comments
I also encountered this problem, have you solved it? |
This issue has been fixed, modifying pytorch_draw_model.py like this can be solved. #51 |
Hm, the fix in #51 isn't working for me. Did it work for either of you? |
Yes, it works for me. Maybe you should try to restart your jupyter notebook or just reimport tensorwatch after modifying pytorch_draw_model.py |
I debugged this issue and it appears that pydot needs to be updated to resolve this error (see this comment). Unfortunately, pydot seems like an unmaintained project so I forked pydot and applied open PRs against it which resolves this issue. If you are facing this issue, I would suggest to reinstall pydot from my fork: https://github.com/sytelus/pydot. TensorWatch is updated to use pydot from above fork however it will only affect new installations because pip doesn't detect vertion changes from package installed from git URLs. So in nutshell, do this:
|
my usage like this:
model = Model()
tw.draw_model(model, [1, 2, 256, 256])
and get error message:
AttributeError Traceback (most recent call last)
~/miniconda2/envs/pytorch_env/lib/python3.6/site-packages/IPython/core/formatters.py in call(self, obj)
343 method = get_real_method(obj, self.print_method)
344 if method is not None:
--> 345 return method()
346 return None
347 else:
~/miniconda2/envs/pytorch_env/lib/python3.6/site-packages/tensorwatch/model_graph/hiddenlayer/pytorch_draw_model.py in repr_svg(self)
11 def repr_svg(self):
12 """Allows Jupyter notebook to render the graph automatically."""
---> 13 return self.dot.repr_svg()
14 def save(self, filename, format="png"):
15 # self.dot.format = format
AttributeError: 'Dot' object has no attribute 'repr_svg'
The text was updated successfully, but these errors were encountered: