cleaned up some if statements

This commit is contained in:
William Falcon
2019-07-25 17:14:33 -04:00
parent 7e728d97e7
commit 7e52f6ea97
+1 -1
View File
@@ -885,6 +885,6 @@ class Trainer(TrainerIO):
self.prog_bar.set_postfix(**tqdm_metrics)
# model checkpointing
if self.proc_rank == 0 and self.checkpoint_callback:
if self.proc_rank == 0 and self.checkpoint_callback is not None:
print('save callback...')
self.checkpoint_callback.on_epoch_end(epoch=self.current_epoch, logs=self.__tng_tqdm_dic)