openvinotoolkit / training_extensions

Train, Evaluate, Optimize, Deploy Computer Vision Models via OpenVINO™
https://openvinotoolkit.github.io/training_extensions/
Apache License 2.0
1.14k stars 443 forks source link

Issue with YOLOX-Tiny: Variable Input Size Not Functioning #4108

Open eugene123tw opened 1 week ago

eugene123tw commented 1 week ago

Describe the bug

Variable input size with YOLOX-tiny variant not working

Steps to Reproduce

otx train --config src/otx/recipe/detection/yolox_tiny.yaml
            --data.input_size 640
            --data_root tests/assets/car_tree_bug
            --engine.device gpu

Environment:

Exception has occurred: RuntimeError       (note: full exception trace is shown but execution is paused at: _run_module_as_main)
Sizes of tensors must match except in dimension 1. Expected size 124 but got size 123 for tensor number 1 in the list.
  File "/home/yuchunli/git/otx-2x/src/otx/algo/detection/necks/yolox_pafpn.py", line 158, in forward
    inner_out = self.top_down_blocks[len(self.in_channels) - 1 - idx](torch.cat([upsample_feat, feat_low], 1))
                                                                      ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^