You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi, I am tryiuse using fp16 in BEVDet (actually the BEVDepth implemented with the BEVDet codebase) with mmcv==1.4.0, torch=1.9, torchvision=0.10.0. However, I encountered this problem:
Traceback (most recent call last):
File "./tools/train.py", line 224, in <module>
main()
File "./tools/train.py", line 220, in main
meta=meta)
File "/nfs/chenzehui/code/BEVDet/mmdet3d/apis/train.py", line 208, in train_model
meta=meta)
File "/nfs/chenzehui/code/BEVDet/mmdet3d/apis/train.py", line 177, in train_detector
runner.run(data_loaders, cfg.workflow)
File "/nfs/chenzehui/others/miniconda3/envs/bevdet/lib/python3.7/site-packages/mmcv/runner/epoch_based_runner.py", line 127, in run
epoch_runner(data_loaders[i], **kwargs)
File "/nfs/chenzehui/others/miniconda3/envs/bevdet/lib/python3.7/site-packages/mmcv/runner/epoch_based_runner.py", line 51, in train
self.call_hook('after_train_iter')
File "/nfs/chenzehui/others/miniconda3/envs/bevdet/lib/python3.7/site-packages/mmcv/runner/base_runner.py", line 307, in call_hook
getattr(hook, fn_name)(self)
File "/nfs/chenzehui/others/miniconda3/envs/bevdet/lib/python3.7/site-packages/mmcv/runner/hooks/optimizer.py", line 224, in after_train_iter
self.loss_scaler.scale(runner.outputs['loss']).backward()
File "/nfs/chenzehui/others/miniconda3/envs/bevdet/lib/python3.7/site-packages/torch/_tensor.py", line 255, in backward
torch.autograd.backward(self, gradient, retain_graph, create_graph, inputs=inputs)
File "/nfs/chenzehui/others/miniconda3/envs/bevdet/lib/python3.7/site-packages/torch/autograd/__init__.py", line 149, in backward
allow_unreachable=True, accumulate_grad=True) # allow_unreachable flag
File "/nfs/chenzehui/others/miniconda3/envs/bevdet/lib/python3.7/site-packages/torch/autograd/function.py", line 87, in apply
return self._forward_cls.backward(self, *args) # type: ignore[attr-defined]
File "/nfs/chenzehui/others/miniconda3/envs/bevdet/lib/python3.7/site-packages/torch/autograd/function.py", line 204, in wrapper
outputs = fn(ctx, *args)
File "/nfs/chenzehui/others/miniconda3/envs/bevdet/lib/python3.7/site-packages/mmcv/ops/modulated_deform_conv.py", line 129, in backward
with_bias=ctx.with_bias)
RuntimeError: expected scalar type Float but found Half
There are some related issues #1004 about DCN in fp16 but I noticed that they are all accur in the forward phase, not in the backward function.
The text was updated successfully, but these errors were encountered:
Hi, I am tryiuse using fp16 in BEVDet (actually the BEVDepth implemented with the BEVDet codebase) with mmcv==1.4.0, torch=1.9, torchvision=0.10.0. However, I encountered this problem:
There are some related issues #1004 about DCN in fp16 but I noticed that they are all accur in the forward phase, not in the backward function.
The text was updated successfully, but these errors were encountered: