mit-han-lab / spvnas

[ECCV 2020] Searching Efficient 3D Architectures with Sparse Point-Voxel Convolution
http://spvnas.mit.edu/
MIT License
585 stars 109 forks source link

AttributeError: 'RandomDepth' object has no attribute 'depth' #117

Closed Liury99 closed 1 year ago

Liury99 commented 1 year ago

Hello,

I've encountered an issue while training SPVNAS on the SemanticKITTI dataset. It seems like there is an AttributeError arising from the RandomDepth module, specifically saying that the 'RandomDepth' object has no attribute 'depth'.

Here's the stack trace for the error:

[2023-10-13 11:49:18.602] /home/liury21/.conda/envs/openmmlab/bin/python /home/data/liury21/spvnas/train.py configs/semantic_kitti/spvnas/default.yaml --distributed False [2023-10-13 11:49:18.603] Experiment started: "runs/run-08570cf6-5c4d034b". workers_per_gpu: 8 distributed: False amp_enabled: True data: num_classes: 19 ignore_label: 255 training_size: 19132 macro_depth_constraint: 1 train: seed: 1588147245 deterministic: False dataset: name: semantic_kitti root: /home/data/liury21/dataset/OpenDataLab_SemanticKITTI/raw/dataset/sequences num_points: 80000 voxel_size: 0.05 num_epochs: 15 batch_size: 2 criterion: name: cross_entropy ignore_index: 255 optimizer: name: sgd lr: 0.24 weight_decay: 0.0001 momentum: 0.9 nesterov: True scheduler: name: cosine_warmup model: name: spvnas [2023-10-13 11:49:21.154] Epoch 1/15 started. 0% 0/9565 [00:00<?, ?it/s]/home/data/liury21/spvnas/core/modules/dynamic_sparseop.py:84: UserWarning: floordiv is deprecated, and its behavior will change in a future version of pytorch. It currently rounds toward 0 (like the 'trunc' function NOT 'floor'). This results in incorrect rounding for negative values. To keep the current behavior, use torch.div(a, b, rounding_mode='trunc'), or for actual floor division, use torch.div(a, b, rounding_mode='floor'). return spf.conv3d(inputs, cur_kernel, self.ks, None, stride=self.s, dilation=self.d, transposed=self.t) Traceback (most recent call last): File "/home/liury21/.conda/envs/openmmlab/lib/python3.7/runpy.py", line 193, in _run_module_as_main "main", mod_spec) File "/home/liury21/.conda/envs/openmmlab/lib/python3.7/runpy.py", line 85, in _run_code exec(code, run_globals) File "/home/liury21/.vscode-server/extensions/ms-python.python-2023.18.0/pythonFiles/lib/python/debugpy/adapter/../../debugpy/launcher/../../debugpy/main.py", line 39, in cli.main() File "/home/liury21/.vscode-server/extensions/ms-python.python-2023.18.0/pythonFiles/lib/python/debugpy/adapter/../../debugpy/launcher/../../debugpy/../debugpy/server/cli.py", line 430, in main run() File "/home/liury21/.vscode-server/extensions/ms-python.python-2023.18.0/pythonFiles/lib/python/debugpy/adapter/../../debugpy/launcher/../../debugpy/../debugpy/server/cli.py", line 284, in run_file runpy.run_path(target, run_name="main") File "/home/liury21/.vscode-server/extensions/ms-python.python-2023.18.0/pythonFiles/lib/python/debugpy/_vendored/pydevd/_pydevd_bundle/pydevd_runpy.py", line 322, in run_path pkg_name=pkg_name, script_name=fname) File "/home/liury21/.vscode-server/extensions/ms-python.python-2023.18.0/pythonFiles/lib/python/debugpy/_vendored/pydevd/_pydevd_bundle/pydevd_runpy.py", line 136, in _run_module_code mod_name, mod_spec, pkg_name, script_name) File "/home/liury21/.vscode-server/extensions/ms-python.python-2023.18.0/pythonFiles/lib/python/debugpy/_vendored/pydevd/_pydevd_bundle/pydevd_runpy.py", line 124, in _run_code exec(code, run_globals) File "/home/data/liury21/spvnas/train.py", line 111, in main() File "/home/data/liury21/spvnas/train.py", line 106, in main Saver(), File "/home/liury21/.conda/envs/openmmlab/lib/python3.7/site-packages/torchpack/train/trainer.py", line 39, in train_with_defaults callbacks=callbacks) File "/home/liury21/.conda/envs/openmmlab/lib/python3.7/site-packages/torchpack/train/trainer.py", line 79, in train output_dict = self.run_step(feed_dict) File "/home/liury21/.conda/envs/openmmlab/lib/python3.7/site-packages/torchpack/train/trainer.py", line 125, in run_step output_dict = self._run_step(feed_dict) File "/home/data/liury21/spvnas/core/trainers.py", line 50, in _run_step outputs = self.model(inputs) File "/home/liury21/.conda/envs/openmmlab/lib/python3.7/site-packages/torch/nn/modules/module.py", line 1130, in _call_impl return forward_call(*input, kwargs) File "/home/data/liury21/spvnas/core/models/semantic_kitti/spvnas.py", line 320, in forward x1 = self.downsample0 File "/home/liury21/.conda/envs/openmmlab/lib/python3.7/site-packages/torch/nn/modules/module.py", line 1130, in _call_impl return forward_call(*input, *kwargs) File "/home/liury21/.conda/envs/openmmlab/lib/python3.7/site-packages/torch/nn/modules/container.py", line 139, in forward input = module(input) File "/home/liury21/.conda/envs/openmmlab/lib/python3.7/site-packages/torch/nn/modules/module.py", line 1130, in _call_impl return forward_call(input, kwargs) File "/home/data/liury21/spvnas/core/modules/modules.py", line 84, in forward for k in range(self.depth): File "/home/liury21/.conda/envs/openmmlab/lib/python3.7/site-packages/torch/nn/modules/module.py", line 1208, in getattr type(self).name__, name)) AttributeError: 'RandomDepth' object has no attribute 'depth'

phani6919 commented 8 months ago

Can you please tell me how you solved this issue? I am also facing the same exact error :(