fast-style-transfer
fast-style-transfer copied to clipboard
Error: module 'scipy.misc' has no attribute 'imread'
Is this code up to date? Getting the following error while running script style.py
AttributeError: module 'scipy.misc' has no attribute 'imread'
! sudo pip install --upgrade scipy==1.1.0
Solved the issue on Colab.. apparently we need older version of Scipy which has 'imread' function..
After upgrading scipy to Version 1.1.0 I've received the error message I've received the error message
ERROR: tensorflow 2.1.0 has requirement scipy==1.4.1; python_version >= "3", but you'll have scipy 1.1.0 which is incompatible.
and after executing
python evaluate.py --checkpoint ./rain-princess.ckpt --in-path <path_to_input_file> --out-path ./output_image.jpg
I get the message
Traceback (most recent call last):
File "evaluate.py", line 212, in <module>
main()
File "evaluate.py", line 199, in main
device=opts.device)
File "evaluate.py", line 132, in ffwd_to_img
ffwd(paths_in, paths_out, checkpoint_dir, batch_size=1, device_t=device)
File "evaluate.py", line 85, in ffwd
soft_config = tf.ConfigProto(allow_soft_placement=True)
AttributeError: module 'tensorflow' has no attribute 'ConfigProto'
Update: Solved! You just need to downgrade Tensorflow 2.x to a previous version.
I'm having the same problem. I downgraded scipy to 1.1.0. Then downgraded tensorflow to 2.0.0, got the same ˛"module 'tensorflow' has no attribute 'ConfigProto'" problem. Also tried downgrading it to 1.15.0, got a lot of "Failed to place the graph without changing the devices of some resources" error.
@RamoramaInteractive @pamruta which are the correct versions of scipy and tensorflow to use with this project?
@madarasz I meant you should downgrade Tensorflow 2.x to a Tensorflow Version 1.x. Version 1.15 works for me. I used scipy version 1.0.0, but try first to install the correct Tensorflow Version.
Check this thread: https://stackoverflow.com/questions/15345790/scipy-misc-module-has-no-attribute-imread
According to this, imread
is no longer supported and instead we should use imageio
.
Downgrading tensorflow to version 1.15.0 after downgrading scipy to 1.1.0 worked for me!
This worked for me
!apt install ffmpeg
!pip install tensorflow==0.12.1
!pip install numpy==1.11.2
!pip install scipy==0.18.1
!pip install pillow==3.4.2
Confirmed that downgrading scipy and tensorflow was required to run evaluate.py without errors.
Using Anaconda:
conda install scipy=1.1.0
conda install tensorflow=1.15.0
Pinning scipy to 1.1.0
as suggested by @pamruta worked for me in TF2.4.1 setup.
Scipy 1.1.0 and Tensorflow 1.15.0 worked for me too.
sorry, but it doesn't for me.
File "
that's what i got