Hi Friends, when I try to run the code for lesson notebook, I get the error as below. Can you pls guide me on how to fix it?
I created new folder called Lesson1 and copied lesson1.ipynb, utils.py and vgg16.py into the new folder and tried to execute the notebook file line by line.
ModuleNotFoundError Traceback (most recent call last)
in ()
----> 1 import utils; reload(utils)
2 from utils import plots
/Users/kprayagai/Documents/Magesh/MachineLearning/JeremyTutorials/lesson1/utils.py in ()
1 from future import division,print_function
2 import math, os, json, sys, re
----> 3 import cPickle as pickle
4 from glob import glob
5 import numpy as np
ModuleNotFoundError: No module named ācPickleā
Here are my theano and tensor versions.
theano: 0.9.0.dev-c697eeab84e5b8a74908da654b66ec9eca4f1291
tensorflow: 1.0.0
Using Theano backend.
keras: 2.0.4
Hi Brendan - Thanks. I already see an import āimport cPickle as pickleā in utils.py. Do you mean to replace
"import cPickle as pickle" with āimport pickleā?
Hi - I fixed that issue by installing bcolz. But now am getting a different error now.
from keras.regularizers import l2, activity_l2, l1, activity_l1
43 from keras.layers.normalization import BatchNormalization
44 from keras.optimizers import SGD, RMSprop, Adam
ImportError: cannot import name āactivity_l2ā
I also see a Warning as below. I think it is something to do with installation or configuration but not able to figure out the problem. I tried to see what is there in keras.json, but I could not find a folder called ~/.keras itself. Not sure how to figure out the problem. But I did install keras.
WARNING (theano.configdefaults): g++ not detected ! Theano will be unable to execute optimized C-implementations (for both CPU and GPU) and will default to Python implementations. Performance will be severely degraded. To remove this warning, set Theano flags cxx to an empty string.
Using TensorFlow backend.
I tried executing further, but face another issue on vgg16 as well. May be is this because of the above issue?
import vgg16; reload(vgg16)
3 from vgg16 import Vgg16
Hi - I tried to downgrade keras, but I get an error when I try to. (tried the solution as per one of the posts from google)
conda install keras=1.2.2
PackageNotFoundError: Package missing in current osx-64 channels:
keras 1.2.2*
I followed the post - Keras 2 Released, and fixed most of the errors due to keras now. But am still getting error - NameError: name āreloadā is not defined.
Hope there are other similar users who has faced the same, and hoping to find some solution there.
Thanks for all the friends, for the help and guidance.
Why the change from cPickle to pickle? - see here, but in summaryā¦
In Python 2, you can speed up your pickle access with cPickle. (In Python3, importing pickle will automatically use the accelerated version if it is available.)