Here is my first Tensorflow run to convert images to different styles of famous painters   I am using the code that is available at  https://github.com/lengstrom/fast-style-transfer   It uses specific versions of below libraries  !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  I started with latest version and that triggered failure after failure.   If you are like me, add below changes to their respective files    #This is to make tensorflow behave as if it is in v1 File : evaluate.py and ./src/transform.py import tensorflow.compat.v1 as tf tf.disable_v2_behavior()      #Image functions are removed from scipy.misc module. so use imageio instead import imageio scipy.misc.imsave(out_path, img) --> imageio.imwrite(out_path, img) img = scipy.misc.imread(src, mode='RGB') --> img = imageio.imread(src, pilmode='RGB')    Refer this post on more details on imageio changes   Here is the ...
Thoughts and actions seeking purposefulness will lead to Better Tomorrow
Comments