Skip to content

Commit

Permalink
save model at every training batch
Browse files Browse the repository at this point in the history
  • Loading branch information
JinZhuXing committed Mar 5, 2021
1 parent 0469dfb commit e6e6b5d
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions source/04_generalized_model/train.py
Original file line number Diff line number Diff line change
Expand Up @@ -293,6 +293,10 @@ def main(args):
# training model
model.fit(train_gen, epochs = train_epoch, validation_data = val_gen, callbacks = [cp_callback])

# save model
model_path = save_model_path + 'fp' + str(image_width) + '_' + str(image_height) + '.h5'
model.save(model_path)


# argument parser
def parse_arguments(argv):
Expand Down

0 comments on commit e6e6b5d

Please sign in to comment.