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

working train.py Error! #10

Open
leyangxing opened this issue Apr 23, 2022 · 0 comments
Open

working train.py Error! #10

leyangxing opened this issue Apr 23, 2022 · 0 comments

Comments

@leyangxing
Copy link

The amount of parameters is 10.132802 million.
============== 1 epoch ==============
[0 seconds] Begin training...
Traceback (most recent call last):
File "train.py", line 64, in
main(configuration, resume=args.resume)
File "train.py", line 51, in main
trainer.train().cuda()
File "/root/autodl-tmp/trainer/base_trainer.py", line 194, in train
self._train_epoch(epoch)
File "/root/autodl-tmp/trainer/trainer.py", line 30, in _train_epoch
for i, (mixture, clean, name) in enumerate(self.train_data_loader):
File "/root/miniconda3/lib/python3.8/site-packages/torch/utils/data/dataloader.py", line 521, in next
data = self._next_data()
File "/root/miniconda3/lib/python3.8/site-packages/torch/utils/data/dataloader.py", line 1203, in _next_data
return self._process_data(data)
File "/root/miniconda3/lib/python3.8/site-packages/torch/utils/data/dataloader.py", line 1229, in _process_data
data.reraise()
File "/root/miniconda3/lib/python3.8/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 "/root/miniconda3/lib/python3.8/site-packages/torch/utils/data/_utils/worker.py", line 287, in _worker_loop
data = fetcher.fetch(index)
File "/root/miniconda3/lib/python3.8/site-packages/torch/utils/data/_utils/fetch.py", line 52, in fetch
return self.collate_fn(data)
File "/root/miniconda3/lib/python3.8/site-packages/torch/utils/data/_utils/collate.py", line 84, in default_collate
return [default_collate(samples) for samples in transposed]
File "/root/miniconda3/lib/python3.8/site-packages/torch/utils/data/_utils/collate.py", line 84, in
return [default_collate(samples) for samples in transposed]
File "/root/miniconda3/lib/python3.8/site-packages/torch/utils/data/_utils/collate.py", line 64, in default_collate
return default_collate([torch.as_tensor(b) for b in batch])
File "/root/miniconda3/lib/python3.8/site-packages/torch/utils/data/_utils/collate.py", line 56, in default_collate
return torch.stack(batch, 0, out=out)
RuntimeError: stack expects each tensor to be equal size, but got [1, 16384] at entry 0 and [1, 11293] at entry 3

There are two problems:
1.RuntimeError: Caught RuntimeError in DataLoader worker process 0.
2.RuntimeError: stack expects each tensor to be equal size, but got [1, 16384] at entry 0 and [1, 11293] at entry 3

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