Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

UserWarning #4

Open
goodnight111111111 opened this issue Mar 20, 2024 · 9 comments
Open

UserWarning #4

goodnight111111111 opened this issue Mar 20, 2024 · 9 comments

Comments

@goodnight111111111
Copy link

./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
Copy link
Owner

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
Copy link
Author

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
Copy link
Owner

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

@goodnight111111111
Copy link
Author

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

@goutamyg
Copy link
Owner

goutamyg commented Apr 24, 2024

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
Copy link
Author

./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
Copy link
Owner

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

@goodnight111111111
Copy link
Author

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

@goutamyg
Copy link
Owner

goutamyg commented May 7, 2024

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants