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

Error when running job_train.sh #20

Open
TuanHAnhVN opened this issue Feb 14, 2019 · 7 comments
Open

Error when running job_train.sh #20

TuanHAnhVN opened this issue Feb 14, 2019 · 7 comments

Comments

@TuanHAnhVN
Copy link

I have met the following error when running job_train.sh:

File "train.py", line 173, in main
for i_iter, batch in enumerate(trainloader):
File "/home/tuanha/.virtualenvs/dmp_workspace/lib/python3.6/site-packages/torch/utils/data/dataloader.py", line 281, in next
return self._process_next_batch(batch)
File "/home/tuanha/.virtualenvs/dmp_workspace/lib/python3.6/site-packages/torch/utils/data/dataloader.py", line 301, in _process_next_batch
raise batch.exc_type(batch.exc_msg)
RuntimeError: Traceback (most recent call last):
File "/home/tuanha/.virtualenvs/dmp_workspace/lib/python3.6/site-packages/torch/utils/data/dataloader.py", line 55, in _worker_loop
samples = collate_fn([dataset[i] for i in batch_indices])
File "/home/tuanha/.virtualenvs/dmp_workspace/lib/python3.6/site-packages/torch/utils/data/dataloader.py", line 135, in default_collate
return [default_collate(samples) for samples in transposed]
File "/home/tuanha/.virtualenvs/dmp_workspace/lib/python3.6/site-packages/torch/utils/data/dataloader.py", line 135, in
return [default_collate(samples) for samples in transposed]
File "/home/tuanha/.virtualenvs/dmp_workspace/lib/python3.6/site-packages/torch/utils/data/dataloader.py", line 121, in default_collate
return torch.stack([torch.from_numpy(b) for b in batch], 0)
File "/home/tuanha/.virtualenvs/dmp_workspace/lib/python3.6/site-packages/torch/functional.py", line 64, in stack
return torch.cat(inputs, dim)
RuntimeError: invalid argument 0: Sizes of tensors must match except in dimension 0. Got 473 and 467 in dimension 1 at /pytorch/torch/lib/TH/generic/THTensorMath.c:2897

Help me, please!
Thank you so much!

@TuanHAnhVN
Copy link
Author

TuanHAnhVN commented Feb 15, 2019

I passed this error. I think caused by loading data in the wrong way. I edited code by my way.

@huangxi6
Copy link

@hoanganhtuanfsoft I also met a error similar to yours, so I want to know how you edited it, thank you!

@TuanHAnhVN
Copy link
Author

TuanHAnhVN commented Feb 17, 2019

@huangxi6 you must resize edge’s image before returning. I don’t know what problem if use it but i pass it and train successfully

@huangxi6
Copy link

@hoanganhtuanfsoft Thank you, I'll try that.

@TuanHAnhVN
Copy link
Author

@huangxi6 can you show result after running successfully?

@huangxi6
Copy link

@hoanganhtuanfsoft Due to the relocation of our laboratory, I can not run this code now. But I can show result if I run it successfully. Then, I want to know how many GPUs you use, and are your results the same as the author's?

@liutinglt
Copy link
Owner

@hoanganhtuanfsoft @huangxi6 Please use the updated code, the edge is generated automatically.

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

3 participants