How to save / serialize a trained model in theano?
问题 I saved the model as documented on loading and saving. # saving trained model f = file('models/simple_model.save', 'wb') cPickle.dump(ca, f, protocol=cPickle.HIGHEST_PROTOCOL) f.close() ca is a trained auto-encoder. It's a instance of class cA. From the script in which I build and save the model I can call ca.get_reconstructed_input(...) and ca.get_hidden_values(...) without any problem. In a different script I try to load the trained model. # loading the trained model model_file = file(