mit-han-lab / pvcnn

[NeurIPS 2019, Spotlight] Point-Voxel CNN for Efficient 3D Deep Learning
https://pvcnn.mit.edu/
MIT License
636 stars 129 forks source link

test error. #2

Closed amiltonwong closed 4 years ago

amiltonwong commented 4 years ago

Hi, authors,

After input the command python train.py --devices 0 --evaluate --configs.train.best_checkpoint_path /data/code11/pvcnn/trained_models/s3dis.pvcnn.area5.pth.tar, I got the following error :

(pytorch1.0) root@milton-ThinkCentre-M93p:/data/code11/pvcnn# python train.py --devices 0 --evaluate --configs.train.best_checkpoint_path /data/code11/pvcnn/trained_models/s3dis.pvcnn.area5.pth.tar
==> loading configs from ['/data/code11/pvcnn/trained_models/s3dis.pvcnn.area5.pth.tar']
Traceback (most recent call last):
  File "train.py", line 213, in <module>
    main()
  File "train.py", line 52, in main
    configs = prepare()
  File "train.py", line 24, in prepare
    configs.update_from_modules(*args.configs)
  File "/data/code11/pvcnn/utils/config.py", line 118, in update_from_modules
    importlib.import_module(module)
  File "/root/anaconda3/envs/pytorch1.0/lib/python3.6/importlib/__init__.py", line 121, in import_module
    raise TypeError(msg.format(name))
TypeError: the 'package' argument is required to perform a relative import for '.data.code11.pvcnn.trained_models.s3dis.pvcnn.area5.pth.tar'

Is there something wrong with the command I used or something wrong with the relative import?

THX!

synxlin commented 4 years ago

Hi, you have to specify a config file to build the model before loading the checkpoint:

python train.py [config file in configs/] --devices [gpu id] [other options]

Please run the following command,

python train.py configs/s3dis/pvcnn/area5.py --devices 0 --evaluate --configs.train.best_checkpoint_path /data/code11/pvcnn/trained_models/s3dis.pvcnn.area5.pth.tar
amiltonwong commented 4 years ago

Hi, @synxlin ,

Thanks for your reply. I use the command your mentioned: python train.py configs/s3dis/pvcnn/area5.py --devices 0 --evaluate --configs.train.best_checkpoint_path /data/code11/pvcnn/trained_models/s3dis.pvcnn.area5.pth.tar. However, I got this error. It seems the error comes from c++ extention or Ninja package.

My system is pytorch 1.0 and Ninja-1.9.0 installed.

Any suggestion to solve this issue?

THX!

synxlin commented 4 years ago

Hi, You need Pytorch >= 1.3. I will update the README.md.