dvlab-research / Stratified-Transformer

Stratified Transformer for 3D Point Cloud Segmentation (CVPR 2022)
MIT License
376 stars 40 forks source link

Modify the code for computing relative_position_index to fix the AssertionError #79

Closed jxl152 closed 8 months ago

jxl152 commented 1 year ago
  1. Remove "include THC.h" for PyTorch 1.10+. It is the same as this pull request.
  2. Modify the code for computing relative_position_index. As described in this issue, the code    relative_position_index = (relative_position + 2 * self.window_size - 0.0001) // self.quant_size can guarantee all the values of relative_position_index do not exceed the upper bound (63) but cannot ensure that any of them is less than the lower bound (0).
  3. The test.py for evaluating the pre-trained model is successful.
DominikVincent commented 1 year ago

Made the same observations independently. Using your code snippet for relative_position_index works for me. Thanks