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

codes issue #7

Closed
Z-Lee-corder opened this issue Apr 19, 2022 · 1 comment
Closed

codes issue #7

Z-Lee-corder opened this issue Apr 19, 2022 · 1 comment

Comments

@Z-Lee-corder
Copy link

Hi, I tried to run your code, but some error occurred:
Traceback (most recent call last):
File "/media/lizheng/datum/codes/VoxSeT/tools/train.py", line 203, in
main()
File "/media/lizheng/datum/codes/VoxSeT/tools/train.py", line 117, in main
model = build_network(model_cfg=cfg.MODEL, num_class=len(cfg.CLASS_NAMES), dataset=train_set)
File "../pcdet/models/init.py", line 18, in build_network
model_cfg=model_cfg, num_class=num_class, dataset=dataset
File "../pcdet/models/detectors/init.py", line 30, in build_detector
model_cfg=model_cfg, num_class=num_class, dataset=dataset
File "../pcdet/models/detectors/pointpillar.py", line 7, in init
self.module_list = self.build_networks()
File "../pcdet/models/detectors/detector3d_template.py", line 47, in build_networks
model_info_dict=model_info_dict
File "../pcdet/models/detectors/detector3d_template.py", line 62, in build_vfe
depth_downsample_factor=model_info_dict['depth_downsample_factor']
File "../pcdet/models/backbones_3d/vfe/voxset.py", line 41, in init
self.mlp_vsa_layer_0 = MLP_VSA_Layer(self.input_dim * 1, self.num_latents[0])
File "../pcdet/models/backbones_3d/vfe/voxset.py", line 168, in init
self.mhsa = nn.MultiheadAttention(dim, num_heads=1, batch_first=True)
TypeError: init() got an unexpected keyword argument 'batch_first'

my environment : python==3.8, torch=1.7.1
Is the problem caused by the low version of torch or something else?

@skyhehe123
Copy link
Owner

Hi, I tried to run your code, but some error occurred: Traceback (most recent call last): File "/media/lizheng/datum/codes/VoxSeT/tools/train.py", line 203, in main() File "/media/lizheng/datum/codes/VoxSeT/tools/train.py", line 117, in main model = build_network(model_cfg=cfg.MODEL, num_class=len(cfg.CLASS_NAMES), dataset=train_set) File "../pcdet/models/init.py", line 18, in build_network model_cfg=model_cfg, num_class=num_class, dataset=dataset File "../pcdet/models/detectors/init.py", line 30, in build_detector model_cfg=model_cfg, num_class=num_class, dataset=dataset File "../pcdet/models/detectors/pointpillar.py", line 7, in init self.module_list = self.build_networks() File "../pcdet/models/detectors/detector3d_template.py", line 47, in build_networks model_info_dict=model_info_dict File "../pcdet/models/detectors/detector3d_template.py", line 62, in build_vfe depth_downsample_factor=model_info_dict['depth_downsample_factor'] File "../pcdet/models/backbones_3d/vfe/voxset.py", line 41, in init self.mlp_vsa_layer_0 = MLP_VSA_Layer(self.input_dim * 1, self.num_latents[0]) File "../pcdet/models/backbones_3d/vfe/voxset.py", line 168, in init self.mhsa = nn.MultiheadAttention(dim, num_heads=1, batch_first=True) TypeError: init() got an unexpected keyword argument 'batch_first'

my environment : python==3.8, torch=1.7.1 Is the problem caused by the low version of torch or something else?

This is because pytorch1.7 does not support this argument. I suggest a updated version of pytorch, e.g. 1.9

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