i try to load the mnist dataset by writing :
from keras.datasets import mnist
(x_train,y_train),(x_test,y_test)=mnist.load_data()
but i get the following error :
IOError: CRC check failed 0xc187cf56L != 0x14c5212fL
how can i fix this error??
i also tried to mnist.py in my keras datasets directory to download the dataset but i get the following error
ValueError: Attempted relative import in non-package
rm ~/.keras/datasets/*
and retry.
For OSX 10.11.3 using Python3.6, here's what worked for me. To the top of
/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/keras/utils/data_utils.py
just below the import statements, add:
import requests
requests.packages.urllib3.disable_warnings()
import ssl
try:
_create_unverified_https_context = ssl._create_unverified_context
except AttributeError:
# Legacy Python that doesn't verify HTTPS certificates by default
pass
else:
# Handle target environment that doesn't support HTTPS verification
ssl._create_default_https_context = _create_unverified_https_context
Restart Python and it will hopefully work
@dderiso 's code change worked for imdb dataset too
@dderiso worked for me.. Thanks
Thank @dderiso it work for me.
nice. I've done it and my VM bricked. hahahahahaha What the hell...
I found the file data_utils.py and copied the code insertion. After reboot the system, it won't boot anymore...
Most helpful comment
For OSX 10.11.3 using Python3.6, here's what worked for me. To the top of
just below the import statements, add:
Restart Python and it will hopefully work