deep-learning-with-python-notebooks icon indicating copy to clipboard operation
deep-learning-with-python-notebooks copied to clipboard

IMDB Data Read Error

Open odundar opened this issue 5 years ago • 2 comments

Reading from imdb data set raises error as:

'charmap' codec can't decode byte 0x8d in position 194

Fix is to open file with utf-8 encoding with adding encoding definition in open.

encoding="utf-8"

odundar avatar Apr 19 '19 15:04 odundar

I got an error using numpy=1.16.3 : keras imdb ValueError: Object arrays cannot be loaded when allow_pickle=False downgrading to numpy=1.16.2 solved the problem

dagrimm avatar Apr 23 '19 12:04 dagrimm

You do not need to explicitly downgrade Numpy. Use the following code to 'allow_pickle':

old = np.load, np.load = lambda *a, **k:old(*a, **k, allow_pickle=TRUE), from keras.datasets import mnist, np.load=old, del(old)

The last line allows Numpy to load normally after you have read in your MNIST data set.

RorisangSitoboli avatar Sep 02 '19 09:09 RorisangSitoboli