So I am trying to use the code in this link:
https://colab.research.google.com/github/tensorflow/lucid/blob/master/notebooks/differentiable-parameterizations/style_transfer_2d.ipynb#scrollTo=FsFc1mE51tCd
it's giving some errors when Lucid is trying to use Tensorflow at the first part where it tries to import. I tried to install some different Tensorflow versions and some different Lucid versions but still could not get it working.
Here are some of errors I get:
when I try
from lucid.modelzoo import vision_models
I get this
/usr/local/lib/python3.6/dist-packages/lucid/misc/io/reading.py in <module>()
31 from urllib.parse import urlparse, urljoin
32 from future.moves.urllib import request
33 from tensorflow import gfile
34 from tempfile import gettempdir
35 from io import BytesIO, StringIO
ImportError: cannot import name 'gfile'
when I try:
import lucid.optvis.param as param
I get this error:
/usr/local/lib/python3.6/dist-packages/lucid/optvis/param/cppn.py in <module>()
19 import numpy as np
20 import tensorflow as tf
21 from tensorflow.contrib import slim
22
23
ModuleNotFoundError: No module named 'tensorflow.contrib'
As for today, lucid does not work with tensorflow2.0 and later versions. However, you can use tf1.15 or any older version and this should solve it.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With