Lightning-AI/pytorch-lightning

the example that shows "The LightningModule also has access to the Hyperparameters" is not correct

XinleiRen opened this issue ยท 0 comments

๐Ÿ“š Documentation

On the page https://lightning.ai/docs/pytorch/stable/common/checkpointing_basic.html, the example that shows "The LightningModule also has access to the Hyperparameters" is not correct, the example is as follow:

model = MyLightningModule.load_from_checkpoint("/path/to/checkpoint.ckpt")
print(model.learning_rate)

it should be:

model = MyLightningModule.load_from_checkpoint("/path/to/checkpoint.ckpt")
print(model.hparams["learning_rate"])

cc @Borda