Anirban
Anirban

Reputation: 343

How to use pickled file as dataset for keras

I have build my own dataset for digit classification and it worked well with convolutional network model developed by lisa lab (Here). I wanted to visualize the weights and i wanted to do it through keras.

Keras documentation tries to load mnist data like this:

(X_train, y_train), (X_test, y_test) = mnist.load_data()

But i want my pickled dataset to load instead of mnist default data. Where does mnist module for keras load it's dataset ? And, how can i pass my own dataset instead of that to use mnist module from keras ?

Thanks in advance.

Upvotes: 1

Views: 1720

Answers (1)

lmjohns3
lmjohns3

Reputation: 7602

You can get a lot of info about this method by reading the source: https://github.com/fchollet/keras/blob/master/keras/datasets/mnist.py

In this case, the dataset is a pickle file loaded from an Amazon S3 bucket.

You could write a copy of this function and use it yourself to load up a different pickled dataset.

Upvotes: 2

Related Questions