Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

About inference.py #58

Open
MorchelPeng opened this issue Dec 16, 2021 · 2 comments
Open

About inference.py #58

MorchelPeng opened this issue Dec 16, 2021 · 2 comments

Comments

@MorchelPeng
Copy link

I run the inference.py and have an error:

Traceback (most recent call last):
File "inference.py", line 149, in
main()
File "inference.py", line 127, in main
model = VoxelNet.load_from_checkpoint(args.model)
File "/home/mxp/anaconda3/lib/python3.7/site-packages/pytorch_lightning/core/saving.py", line 156, in load_from_checkpoint
model = cls._load_model_state(checkpoint, strict=strict, kwargs)
File "/home/mxp/anaconda3/lib/python3.7/site-packages/pytorch_lightning/core/saving.py", line 198, in _load_model_state
model = cls(
_cls_kwargs)
File "/home/mxp/atlas/Atlas-master/atlas/model.py", line 93, in init
self.hparams = hparams
File "/home/mxp/anaconda3/lib/python3.7/site-packages/torch/nn/modules/module.py", line 1178, in setattr
object.setattr(self, name, value)
AttributeError: can't set attribute

@HaFred
Copy link

HaFred commented Jan 3, 2022

parameters are not passed in correctly

@rakeshshrestha31
Copy link

Was facing the same issue. Replacing self.hparams = hparams with self.save_hyperparameters(hparams) solved it

self.hparams = hparams

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants