sergivalverde / cnn-ms-lesion-segmentation

MS lesion segmentation using cascaded 3D convolutional neural networks
GNU General Public License v3.0
42 stars 24 forks source link

pickle isse - NameError: global name 'pickle' is not defined #7

Open fragalassi opened 6 years ago

fragalassi commented 6 years ago

Hi, anyone ended up with a problem of this sort - NameError: global name 'pickle' is not defined See below for details:

model = train_cascaded_model(model, train_x_data, train_y_data, options) File "/udd/fgalassi/base.py", line 38, in train_cascaded_model model[0].fit(X, Y) File "/udd/fgalassi/myenv/lib/python2.7/site-packages/nolearn/lasagne/base.py", line 700, in fit self.train_loop(X, y, epochs=epochs) File "/udd/fgalassi/myenv/lib/python2.7/site-packages/nolearn/lasagne/base.py", line 839, in train_loop func(self, self.trainhistory) File "/udd/fgalassi/myenv/lib/python2.7/site-packages/nolearn_utils/hooks.py", line 60, in call pickle.dump(train_history, f, -1) NameError: global name 'pickle' is not defined

Thank you!

sergivalverde commented 6 years ago

Hi @FrancyGalassi

I recommend you to move to the keras version:

https://github.com/sergivalverde/cnn-ms-lesion-segmentation/tree/keras

Does this sound good for you?

s