Xharlie / BtcDet

Behind the Curtain: Learning Occluded Shapes for 3D Object Detection
Apache License 2.0
195 stars 42 forks source link

AttributeError: module 'torch' has no attribute 'minimum' #17

Closed pummi823 closed 2 years ago

pummi823 commented 2 years ago

Hello!author, i finally succesfully install the spconv, and my environment is torch1.4, when i run the train.py, it raise: File "/data1/hx/BtcDet/btcdet/models/occ_pnt/occ_training_targets/occ_targets_template.py", line 88, in point2coords_inrange coords = torch.minimum(coords, max_grid_tensor) AttributeError: module 'torch' has no attribute 'minimum' why??? is the torch version wrong??(i also use torch1.3, it raise the same wrong)

pummi823 commented 2 years ago

Besides, it also raise another wrong :"module 'torch' has no attribute 'square", and i change the code to "torch.pow(x,2)" to solve it

Xharlie commented 2 years ago

hi, starting torch 1.70, torch has minimum, see: https://pytorch.org/docs/1.7.0/generated/torch.minimum.html?highlight=minimum#torch.minimum

Please check your cuda version and closely follow the README instruction.

pummi823 commented 2 years ago

you are really a very kind author!thanks for your answer!