Skip to content Skip to sidebar Skip to footer

Keras Multiple_gpu_model Causes "Can't Pickle Module Object" Error

This is a follow up of this question. I am trying to utilize 8 GPUs for training and am using the multiple_gpu_model from Keras. I specified a batch size of 128 which will be split

Solution 1:

if you use the ModelCheckpoint function in the callbacks, you should add the para 'save_weights_only=True' in the ModelCheckpoint function:

 from keras.callbacks import ModelCheckpoint

 callbacks_list = [ModelCheckpoint(top_weights_path, monitor='val_loss',
                              verbose=1, save_best_only=True, save_weights_only=True)]

hope useful


Post a Comment for "Keras Multiple_gpu_model Causes "Can't Pickle Module Object" Error"