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

参数r50_nuimg_704x256_8f_openocc.py的训练报错 #59

Open
TJW2410 opened this issue Oct 21, 2024 · 1 comment
Open

参数r50_nuimg_704x256_8f_openocc.py的训练报错 #59

TJW2410 opened this issue Oct 21, 2024 · 1 comment

Comments

@TJW2410
Copy link

TJW2410 commented Oct 21, 2024

[2024-10-21 09:36:33,704][INFO] - workflow: [('train', 1)], max: 24 epochs
[2024-10-21 09:36:33,704][INFO] - Checkpoints will be saved to /home/zpj/SparseOcc-main/SparseOcc-main/outputs/SparseOcc/2 by HardDiskBackend.
Traceback (most recent call last):
File "train.py", line 181, in
main()
File "train.py", line 177, in main
runner.run([train_loader], [('train', 1)])
File "/home/zpj/anaconda3/envs/sparseocc/lib/python3.8/site-packages/mmcv/runner/epoch_based_runner.py", line 136, in run
epoch_runner(data_loaders[i], **kwargs)
File "/home/zpj/anaconda3/envs/sparseocc/lib/python3.8/site-packages/mmcv/runner/epoch_based_runner.py", line 53, in train
self.run_iter(data_batch, train_mode=True, **kwargs)
File "/home/zpj/anaconda3/envs/sparseocc/lib/python3.8/site-packages/mmcv/runner/epoch_based_runner.py", line 31, in run_iter
outputs = self.model.train_step(data_batch, self.optimizer,
File "/home/zpj/anaconda3/envs/sparseocc/lib/python3.8/site-packages/mmcv/parallel/data_parallel.py", line 77, in train_step
return self.module.train_step(*inputs[0], **kwargs[0])
File "/home/zpj/anaconda3/envs/sparseocc/lib/python3.8/site-packages/mmdet/models/detectors/base.py", line 248, in train_step
losses = self(**data)
File "/home/zpj/anaconda3/envs/sparseocc/lib/python3.8/site-packages/torch/nn/modules/module.py", line 1110, in _call_impl
return forward_call(*input, **kwargs)
File "/home/zpj/SparseOcc-main/SparseOcc-main/models/sparseocc.py", line 121, in forward
return self.forward_train(**kwargs)
File "/home/zpj/anaconda3/envs/sparseocc/lib/python3.8/site-packages/mmcv/runner/fp16_utils.py", line 205, in new_func
return old_func(*args, **kwargs)
File "/home/zpj/SparseOcc-main/SparseOcc-main/models/sparseocc.py", line 128, in forward_train
return self.forward_pts_train(img_feats, voxel_semantics, voxel_instances, instance_class_ids, mask_camera, img_metas)
File "/home/zpj/SparseOcc-main/SparseOcc-main/models/sparseocc.py", line 117, in forward_pts_train
return self.pts_bbox_head.loss(*loss_inputs)
File "/home/zpj/anaconda3/envs/sparseocc/lib/python3.8/site-packages/mmcv/runner/fp16_utils.py", line 205, in new_func
return old_func(*args, **kwargs)
File "/home/zpj/SparseOcc-main/SparseOcc-main/models/sparseocc_head.py", line 60, in loss
return self.loss_single(voxel_semantics, voxel_instances, instance_class_ids, preds_dicts, mask_camera)
File "/home/zpj/SparseOcc-main/SparseOcc-main/models/sparseocc_head.py", line 89, in loss_single
loss_dict_i_b['loss_geo_scal'] = self.criterions['loss_geo_scal'](seg_pred_i_sparse, voxel_semantics_sparse)
File "/home/zpj/anaconda3/envs/sparseocc/lib/python3.8/site-packages/torch/nn/modules/module.py", line 1110, in _call_impl
return forward_call(*input, **kwargs)
File "/home/zpj/SparseOcc-main/SparseOcc-main/models/loss_utils.py", line 97, in forward
loss, _ = compute_scal_loss(pred, gt, self.num_classes - 1, reverse=True)
File "/home/zpj/SparseOcc-main/SparseOcc-main/models/loss_utils.py", line 35, in compute_scal_loss
p = pred[:, class_id, :]
IndexError: index 17 is out of bounds for dimension 1 with size 17

@afterthat97
Copy link
Collaborator

别用openocc的那个config了,那个有bug,我也懒得修了,用occ3d吧

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

2 participants