-
Notifications
You must be signed in to change notification settings - Fork 3.6k
Closed
Labels
bugSomething isn't workingSomething isn't workingquestionFurther information is requestedFurther information is requested
Description
I've trained a system as follows:
model = CoolSystem(hparams)
checkpoint_callback = pl.callbacks.ModelCheckpoint(
filepath=os.path.join(os.getcwd(), 'checkpoints'),
verbose=True,
monitor='val_acc',
mode='max',
prefix='try',
save_top_k=-1,
period=1
)
trainer = pl.Trainer(
max_epochs=hparams.epochs,
checkpoint_callback=checkpoint_callback)
trainer.fit(model)
trainer.test()
And with the above, the test accuracy is 0.7975
However, when I load the checkpoints separately instead:
model_test = CoolSystem(hyperparams)
model_test.load_from_checkpoint('checkpoints/try_ckpt_epoch_1.ckpt')
trainer = pl.Trainer()
trainer.test(model_test)
The accuracy returned is 0.5705
Am I loading the checkpoints wrongly?
Inspirateur, yikuanli, EvyW, shim94kr, Yevgnen and 9 more
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't workingquestionFurther information is requestedFurther information is requested