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

stack expects each tensor to be equal size #7

Open
uuzzmaa opened this issue Apr 28, 2023 · 0 comments
Open

stack expects each tensor to be equal size #7

uuzzmaa opened this issue Apr 28, 2023 · 0 comments

Comments

@uuzzmaa
Copy link

uuzzmaa commented Apr 28, 2023

I got this error while running the train.py. How can i get the equal sizes?

File "/home/uzma/.local/lib/python3.6/site-packages/torch/_utils.py", line 434, in reraise
raise exception
RuntimeError: Caught RuntimeError in DataLoader worker process 0.
Original Traceback (most recent call last):
File "/home/uzma/.local/lib/python3.6/site-packages/torch/utils/data/_utils/worker.py", line 287, in _worker_loop
data = fetcher.fetch(index)
File "/home/uzma/.local/lib/python3.6/site-packages/torch/utils/data/_utils/fetch.py", line 52, in fetch
return self.collate_fn(data)
File "/home/uzma/TR-MISR/src/utils.py", line 65, in call
return self.collateFunction(batch)
File "/home/uzma/TR-MISR/src/utils.py", line 114, in collateFunction
padded_lr_batch = torch.stack(lr_batch, dim=0)
RuntimeError: stack expects each tensor to be equal size, but got [24, 32, 32] at entry 0 and [24, 32, 64] at entry 1

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

1 participant