Skip to content

Loading model for prediction yields RuntimeError: Error(s) in loading state_dict #12621

Discussion options

You must be logged in to vote

should be:

model = ImageRegressor.load_from_checkpoint(path, pretrained=True, tune_fc_only=True, model='densenet')

check out the examples and description here: https://pytorch-lightning.readthedocs.io/en/latest/common/lightning_module.html#load-from-checkpoint

slightly similar discussion: #12399

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@stillsen
Comment options

Answer selected by stillsen
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment