I was trying to load the dataset mnist/cifar10 from keras, but it takes like forever to download it(the downloading speed gradually slows down, in the beginning it was quick, but then it gets slower and slower),e.g. still not be able to download the dataset in several hours. Here is my code:
from keras.datasets import mnist
from matplotlib import pyplot
from scipy.misc import toimage
(X_train, Y_train),(X_test,Y_test) = mnist.load_data()
for i in range(0.9):
pyplot.subplot(330+1+i)
pyplot.imshow(toimage(X_train[i]))
pyplot.show()
I have looked on the web, people usually don't encounter these problems, normally the dataset can be downloaded in several minutes. I have tried reinstalling python and other packages, but it did not help. Can anyone help me please?
I had the same issue. The problem is the IDLE not the code, the IDLE runs slower for every line printed. Instead run the python code in a terminal, power-shell or command prompt. Then it should run in about 5 seconds, the file is only 52 MB.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With