raghakot / keras-vis

Neural network visualization toolkit for keras
https://raghakot.github.io/keras-vis
MIT License
2.97k stars 664 forks source link

FileNotFoundError: [Errno 2] No such file or directory: '/home/Storm/anaconda3/envs/tensorflow/lib/python3.6/site-packages/vis/utils/../../resources/imagenet_class_index.json' #126

Closed tianyu0523 closed 5 years ago

tianyu0523 commented 6 years ago

when I run the 'keras-vis/examples/vggnet/activation_maximization.ipynb', the error happens when it reaches the part in the following pictures 1 2

keisen commented 6 years ago

The cause of this issue is the bug of vis.utils.utils.get_imagenet_label() or file placement. It should be fixed.

However, @tianyu0523, If you need to run the examples immediately, Please do it on environment that keras-vis isn't installed via pip.

tianyu0523 commented 6 years ago

Actually, 'get_imagenet_label()' does not exist in the file '\keras-vis\vis\utils\utils.py'. Could you please tell me how to install the keras-vis? @keisen

keisen commented 6 years ago

Umm... get_imagenet_label() was renamed lookup_imagenet_labels() in below commit. And, This issue is existing in lookup_imagenet_labels(). maybe.

https://github.com/raghakot/keras-vis/commit/56198ddddd47ac1ff9867a60496ae0ffb6f12ea1#diff-42bb00f72e593fae535671061ddf7bbb

Could you please tell me how to install the keras-vis? @keisen

I did as follows.

$ git clone https://github.com/raghakot/keras-vis.git
$ cd keras-vis
$ pip install .... # other than keras-vis
$ jupyter notebook

In addition, the following code was added to the first line of the first code cell of example.

import sys
sys.path.append('../../')

It's not smart, haha.

keisen commented 6 years ago

Sorry, I had not answered your question accurately. I install keras-vis as follows when I don't use example.

pip install git+https://github.com/raghakot/keras-vis.git@#{commit-id}