Closed najingligong1111 closed 5 years ago
from lucid.modelzoo.other_models import *
ImportErrorTraceback (most recent call last)
<ipython-input-31-73e16add7239> in <module>()
1
2 from lucid.modelzoo.util import forget_xy ,load_graphdef
----> 3 from lucid.modelzoo.other_models import *
ImportError: No module named other_models
or
ImportErrorTraceback (most recent call last)
<ipython-input-32-8947b524c42d> in <module>()
1
2 from lucid.modelzoo.util import forget_xy ,load_graphdef
----> 3 from lucid.modelzoo.other_models.AlexNet import AlexNet
ImportError: No module named other_models.AlexNet
from lucid.modelzoo.other_models.AlexNet import AlexNet
(edited question to separate code and text)
Hi! You want this:
import lucid.modelzoo.vision_models as models
model = models.VGG16_caffe()
model.load_graphdef()
The _caffe
is because there are multiple implementations of VGG floating around.
You may find it helpful to look at the modelzoo notebook.
Good luck with your experiments!
ucid.modelzoo.vision_models as
AttributeErrorTraceback (most recent call last)
in () 1 ----> 2 model = models.VGG16_caffe() 3 model.load_graphdef()
AttributeError: 'module' object has no attribute 'VGG16_caffe'
Hm. I'd guess you're using an old version of lucid. Could you try doing this?
import pkg_resources
pkg_resources.get_distribution("lucid").version
Hm. I'd guess you're using an old version of lucid. Could you try doing this?
import pkg_resources pkg_resources.get_distribution("lucid").version
https://colab.research.google.com/github/tensorflow/lucid/blob/master/notebooks/tutorial.ipynb 0.1.5 https://colab.research.google.com/github/tensorflow/lucid/blob/master/notebooks/modelzoo.ipynb 0.2.3 and it is ok in the bellow . the upper dont work.
Great, glad you got it working! I'd recommend trying to use recent versions of lucid.
Great, glad you got it working! I'd recommend trying to use recent versions of lucid.
thank you , great work you have done!
how to change to vgg16?