goutamyg / MVT

[BMVC 2023] Mobile Vision Transformer-based Visual Object Tracking
Apache License 2.0
20 stars 3 forks source link

UserWarning #4

Open goodnight111111111 opened 8 months ago

goodnight111111111 commented 8 months ago

./lib/train/data/loader.py:87: UserWarning: An output with one or more elements was resized since it had shape [1572864], which does not match the required output shape [1, 96, 128, 128]. This behavior is deprecated, and in a future PyTorch release outputs will not be resized unless they have zero elements. You can explicitly reuse an out tensor t by resizing it, inplace, to zero elements with t.resize_(0). (Triggered internally at /opt/conda/conda-bld/pytorch_1656352464346/work/aten/src/ATen/native/Resize.cpp:17.) return torch.stack(batch, 1, out=out)

goutamyg commented 8 months ago

Hi,

Thank you for your interest in our work. Regarding the warning you encountered, it seems to be related to an older version of PyTorch, which has been addressed in the latest release. Since I conduct model training on a remote server, I haven't attempted to resolve or suppress this warning (although I acknowledge that it is annoying).

goodnight111111111 commented 8 months ago

Thanks for your help, I got an error at epoch 10 when reproducing your code: RuntimeError:Given group=1, weight of size [16,3,3,3],expected input[1,64,32,32] to have 3 channels ,but got 64 channels instead.

goutamyg commented 7 months ago

Sorry for the delayed reply. Comment these lines and replace with self.z_dict1 = template.tensors. I hope this fixes the error.

goodnight111111111 commented 7 months ago

Thank you for your reply, but the problem is still not solved

goutamyg commented 7 months ago

With the above modification, the training code has no issues at my end, esp. after the 10th epoch. I hope you have modified the mobilevit_track.py file as follows:

Screenshot from 2024-04-24 11-49-40

Can you please share more info regarding the error message?

goodnight111111111 commented 7 months ago

./lib/train/data/loader.py:87: UserWarning: An output with one or more elements was resized since it had shape [7340032], which does not match the required output shape [1, 112, 256, 256]. This behavior is deprecated, and in a future PyTorch release outputs will not be resized unless they have zero elements. You can explicitly reuse an out tensor t by resizing it, inplace, to zero elements with t.resize_(0). (Triggered internally at /opt/conda/conda-bld/pytorch_1656352464346/work/aten/src/ATen/native/Resize.cpp:17.) return torch.stack(batch, 1, out=out) ./lib/models/mobilevit_track/layers/head.py:144: UserWarning: floordiv is deprecated, and its behavior will change in a future version of pytorch. It currently rounds toward 0 (like the 'trunc' function NOT 'floor'). This results in incorrect rounding for negative values. To keep the current behavior, use torch.div(a, b, rounding_mode='trunc'), or for actual floor division, use torch.div(a, b, rounding_mode='floor'). idx_y = idx // self.feat_sz

goutamyg commented 7 months ago

It looks like a warning message and should not halt the model training code. Please confirm.

goodnight111111111 commented 6 months ago

Thanks for your help, which script should I run when I need.zip file when evaluating got10k

goutamyg commented 6 months ago

This script will re-organize the GOT10k results into a folder suitable for their server evaluation (make sure you change the paths appropriately). Then you need to zip the resulting folder and submit it to the GOT10k eval server.