MisaOgura / flashtorch

Visualization toolkit for neural networks in PyTorch! Demo -->
https://youtu.be/18Iw4qYqfPo
MIT License
734 stars 87 forks source link

Cannot load #from flashtorch.saliency import Backprop #5

Closed farshidrayhan closed 5 years ago

farshidrayhan commented 5 years ago

I have downgraded to pytorch 0.4.0 yet everytime I run # from flashtorch.saliency import Backprop i get the errors below

from flashtorch.saliency import Backprop Traceback (most recent call last):

File "/home/farshid/anaconda3/envs/pytorchgpu/lib/python3.5/site-packages/IPython/core/interactiveshell.py", line 2961, in run_code exec(code_obj, self.user_global_ns, self.user_ns)

File "", line 1, in from flashtorch.saliency import Backprop

File "/home/farshid/anaconda3/envs/pytorchgpu/lib/python3.5/site-packages/flashtorch/saliency/init.py", line 1, in from .backprop import *

File "/home/farshid/anaconda3/envs/pytorchgpu/lib/python3.5/site-packages/flashtorch/saliency/backprop.py", line 99 f'The predicted class index {top_class.item()} does not' + ^ SyntaxError: invalid syntax

MisaOgura commented 5 years ago

Hi @farshidrayhan,

FlashTorch supports Python 3.6 and 3.7 - from the stack trace it looks like the environment you're running uses Python 3.5.

Please use supported versions of Python. If you still encounter issues after that, please open another issue.

Thanks!