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

run 'python main.py --netType stackedHGB --GPUs 0 --LR 0.001 --testOnly t ' error! #23

Open
jxhno1 opened this issue Mar 22, 2021 · 0 comments

Comments

@jxhno1
Copy link

jxhno1 commented Mar 22, 2021

#Val images: 462
=> Checking checkpoints
=> Loading the latest checkpoint ../result/linepx/latest.pth.tar
=> Creating model from file: models/stackedHGB.py
=> Resuming model state from ../result/linepx/model_200.pth.tar
=> Resuming optimizer state from ../result/linepx/optimState_200.pth.tar
=> Resuming criterion from ../result/linepx/criterion_200.pth.tar
Traceback (most recent call last):
File "main.py", line 85, in
main()
File "main.py", line 52, in main
loss = trainer.test(valLoader, 0)
File "/home/xh/wireframe/linepx/models/stackedHGB-train.py", line 85, in test
for i, (inputData, line, imgids) in enumerate(valLoader):
File "/usr/lib/anaconda3/lib/python3.6/site-packages/torch/utils/data/dataloader.py", line 345, in next
data = self._next_data()
File "/usr/lib/anaconda3/lib/python3.6/site-packages/torch/utils/data/dataloader.py", line 385, in _next_data
data = self._dataset_fetcher.fetch(index) # may raise StopIteration
File "/usr/lib/anaconda3/lib/python3.6/site-packages/torch/utils/data/_utils/fetch.py", line 47, in fetch
return self.collate_fn(data)
File "/usr/lib/anaconda3/lib/python3.6/site-packages/torch/utils/data/_utils/collate.py", line 79, in default_collate
return [default_collate(samples) for samples in transposed]
File "/usr/lib/anaconda3/lib/python3.6/site-packages/torch/utils/data/_utils/collate.py", line 79, in
return [default_collate(samples) for samples in transposed]
File "/usr/lib/anaconda3/lib/python3.6/site-packages/torch/utils/data/_utils/collate.py", line 55, in default_collate
return torch.stack(batch, 0, out=out)
RuntimeError: invalid argument 0: Sizes of tensors must match except in dimension 0. Got 335 and 500 in dimension 2 at /pytorch/aten/src/TH/generic/THTensor.cpp:612

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