Skip to content

IndexError: index X is out of bounds during inference when using reduced chunk size (Nvidia Titan X Pascal GPU, 12GB) #13

@anloganathan

Description

@anloganathan

Hi,
I encountered an IndexError during inference when using a trained model on a Nvidia Titan X Pascal GPU (12GB). Because of memory limitations, I reduced the chunk size to 5000, but inference crashes with an out-of-bounds index inside unified_metric.py.

Command used:
CUDA_VISIBLE_DEVICES=1 python tools/test.py \ configs/oneformer3d_qs_radius16_qp300_2many.py \ work_dirs/clean_forestformer/epoch_3000_fix.pth

Exception has occurred: IndexError index 130170 is out of bounds for axis 0 with size 130170 File "oneformer3d/unified_metric.py", line 96, in compute_metrics gt_l, pred_l = int(sem_gt_i[j]), int(sem_pre_i[j]) File "tools/test.py", line 173, in main runner.test() File "tools/test.py", line 180, in <module> main() IndexError: index 130170 is out of bounds for axis 0 with size 130170

Could you please advise whether changing the chunk size requires additional modifications elsewhere? I added chunk = chunk in the model dict in the config file.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions