Open MorchelPeng opened 2 years ago
parameters are not passed in correctly
Was facing the same issue. Replacing self.hparams = hparams
with self.save_hyperparameters(hparams)
solved it https://github.com/magicleap/Atlas/blob/bee3ddbdb0935cf9aa9fc810e829115c6ab74dc5/atlas/model.py#L93
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