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

AttributeError: 'SparseConvolutionQunat' object has no attribute '_conv_forward' #214

Open
wugoukanle opened this issue Nov 11, 2023 · 1 comment

Comments

@wugoukanle
Copy link

wugoukanle commented Nov 11, 2023

log info as follow:
Traceback (most recent call last):
File "tools/centerpoint_eval.py", line 226, in
quant_sensitivity_profile(args.nuScense_config, args.calibrate_batch, args.eval_origin, args.weight)
File "tools/centerpoint_eval.py", line 194, in quant_sensitivity_profile
quantize.calibrate_model(model_original, data_loader_train, 0, batch_processor, calibrate_batch)
File "/mnt/volumes/code-share/CenterPoint/tools/sparseconv_quantization.py", line 210, in calibrate_model
collect_stats(model, dataloader, device, num_batch=num_batch)
File "/mnt/volumes/code-share/CenterPoint/tools/sparseconv_quantization.py", line 197, in collect_stats
batch_processor_callback(model, datas, train_mode=False, return_preds=True, local_rank=0)
File "/mnt/volumes/code-share/CenterPoint/det3d/torchie/apis/train.py", line 135, in batch_processor
return model(example, return_loss=False, return_preds=return_preds)
File "/home/jovyan/.local/lib/python3.8/site-packages/torch/nn/modules/module.py", line 1194, in _call_impl
return forward_call(*input, **kwargs)
File "/mnt/volumes/code-share/CenterPoint/det3d/models/detectors/voxelnet.py", line 56, in forward
x, _ = self.extract_feat(example)
File "/mnt/volumes/code-share/CenterPoint/det3d/models/detectors/voxelnet.py", line 46, in extract_feat
x, voxel_feature = self.backbone(
File "/home/jovyan/.local/lib/python3.8/site-packages/torch/nn/modules/module.py", line 1194, in _call_impl
return forward_call(*input, **kwargs)
File "/mnt/volumes/code-share/CenterPoint/det3d/models/backbones/scn.py", line 170, in forward
x = self.conv_input(ret)
File "/home/jovyan/.local/lib/python3.8/site-packages/torch/nn/modules/module.py", line 1194, in _call_impl
return forward_call(*input, **kwargs)
File "/home/jovyan/.local/lib/python3.8/site-packages/spconv/pytorch/modules.py", line 137, in forward
input = module(input)
File "/home/jovyan/.local/lib/python3.8/site-packages/torch/nn/modules/module.py", line 1194, in _call_impl
return forward_call(*input, **kwargs)
File "/mnt/volumes/code-share/CenterPoint/tools/sparseconv_quantization.py", line 136, in forward
return self._conv_forward(self.training, input, quant_weight, self.bias, add_input,
File "/home/jovyan/.local/lib/python3.8/site-packages/torch/nn/modules/module.py", line 1269, in getattr
raise AttributeError("'{}' object has no attribute '{}'".format(
AttributeError: 'SparseConvolutionQunat' object has no attribute '_conv_forward'

it maybe is version problem:
pytorch,for me, torch==2.0.1
spconv, for me, spconv-cu114==2.2.6
pytorch-quantization, for me, pytorch-quantization==2.1.0

can you help me to check position of '_conv_forward' ?

@wugoukanle
Copy link
Author

I have solved my problem:spconv-cu114==2.3.6

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

1 participant