Atlas icon indicating copy to clipboard operation
Atlas copied to clipboard

About inference.py

Open MorchelPeng opened this issue 3 years ago • 2 comments

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

MorchelPeng avatar Dec 16 '21 07:12 MorchelPeng

parameters are not passed in correctly

HaFred avatar Jan 03 '22 09:01 HaFred

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

rakeshshrestha31 avatar Jun 03 '22 19:06 rakeshshrestha31