How to load,and create pickled object


#1

i am trying to learn python and machine learning. i am trying to implement and run the hunse repository .During this i found a file cifar10-lif-1628.pkl which is a pickled object.would like to know that how one can find what is this file how to make your own file like this.

data_mean = X_train.mean(axis=0)
X_train -= data_mean
X_test -= data_mean

# retrieve from https://figshare.com/s/49741f9e2d0d29f68871
cc_model = load_model_pickle('cifar10-lif-1628.pkl')


# --- Run model in Nengo
presentation_time = 0.2

#3

That file contains the weights. To make your own, you’ll have to train a network, using something like cuda-convnet2 or keras (I’ve just started playing around with Keras more, and I hope to add some spiking CIFAR-10 examples in the near future).


#4

can i use these weights for other image datasets?


#5

You can, but they might not work that well. This is known as “transfer learning”, and is a pretty big sub-field of neural networks. I don’t know a whole lot about it, but it would certainly depend on what dataset you’ve trained on and what you’re transferring to.

If you wanted to transfer to something like MNIST from CIFAR-10, that might work ok. You would take your CIFAR-10 weights and re-train the final layer (the classifier layer) on MNIST, so that the network knows the MNIST categories (digits).