Closed
Description
Hello David! Thanks for the great book!
I have ran an error when running CycleGan notebook: 05_01_cyclegan_train.ipynb
It is due to an error 'keras_contrib' library not found.
So I have installed the library separately, from the github of keras-contrib .
import os
import matplotlib.pyplot as plt
from models.cycleGAN import CycleGAN
from utils.loaders import DataLoader
---------------------------------------------------------------------------
ModuleNotFoundError Traceback (most recent call last)
<ipython-input-6-647ffcce73df> in <module>
2 import matplotlib.pyplot as plt
3
----> 4 from models.cycleGAN import CycleGAN
5 from utils.loaders import DataLoader
~/GAN/GDL_code/models/cycleGAN.py in <module>
5 #have replaced above with below line on 2019 7 8
6 #due to an error
----> 7 from keras_contrib.layers.normalization.instancenormalization import InstanceNormalization
8 from keras.layers import Input, Dense, Reshape, Flatten, Dropout, Concatenate
9 from keras.layers import BatchNormalization, Activation, ZeroPadding2D, Add
ModuleNotFoundError: No module named 'keras_contrib'
After installing the library, it seems to work okay, but need to change slightly the command
following this
From this :
from keras_contrib.layers.normalization import InstanceNormalization
To this:
from keras_contrib.layers.normalization.instancenormalization import InstanceNormalization
However from the notebook it still doesn't work.
I have tried it both from the same conda environment ..
Any ideas?
Metadata
Metadata
Assignees
Labels
No labels
Activity