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

TypeError:list indices must be integers or slices, not tuple #343

Open
Hsssy opened this issue Dec 21, 2022 · 0 comments
Open

TypeError:list indices must be integers or slices, not tuple #343

Hsssy opened this issue Dec 21, 2022 · 0 comments

Comments

@Hsssy
Copy link

Hsssy commented Dec 21, 2022

please help me, i am a beginner and i have no idea about this error!!! Thank you for you to give me some information

Traceback (most recent call last):
File "/home/Husiyu2022/PycharmProjects/EDSR-PyTorch/src/main.py", line 33, in
main()
File "/home/Husiyu2022/PycharmProjects/EDSR-PyTorch/src/main.py", line 27, in main
t.train()
File "/home/Husiyu2022/PycharmProjects/EDSR-PyTorch/src/trainer.py", line 42, in train
for batch, (lr, hr, _,) in enumerate(self.loader_train):
File "/home/Husiyu2022/anaconda3/envs/pytorch/lib/python3.9/site-packages/torch/utils/data/dataloader.py", line 435, in next
data = self._next_data()
File "/home/Husiyu2022/anaconda3/envs/pytorch/lib/python3.9/site-packages/torch/utils/data/dataloader.py", line 1085, in _next_data
return self._process_data(data)
File "/home/Husiyu2022/anaconda3/envs/pytorch/lib/python3.9/site-packages/torch/utils/data/dataloader.py", line 1111, in _process_data
data.reraise()
File "/home/Husiyu2022/anaconda3/envs/pytorch/lib/python3.9/site-packages/torch/_utils.py", line 428, in reraise
raise self.exc_type(msg)
TypeError: Caught TypeError in DataLoader worker process 0.
Original Traceback (most recent call last):
File "/home/Husiyu2022/anaconda3/envs/pytorch/lib/python3.9/site-packages/torch/utils/data/_utils/worker.py", line 198, in _worker_loop
data = fetcher.fetch(index)
File "/home/Husiyu2022/anaconda3/envs/pytorch/lib/python3.9/site-packages/torch/utils/data/_utils/fetch.py", line 44, in fetch
data = [self.dataset[idx] for idx in possibly_batched_index]
File "/home/Husiyu2022/anaconda3/envs/pytorch/lib/python3.9/site-packages/torch/utils/data/_utils/fetch.py", line 44, in
data = [self.dataset[idx] for idx in possibly_batched_index]
File "/home/Husiyu2022/anaconda3/envs/pytorch/lib/python3.9/site-packages/torch/utils/data/dataset.py", line 218, in getitem
return self.datasets[dataset_idx][sample_idx]
File "/home/Husiyu2022/PycharmProjects/EDSR-PyTorch/src/data/srdata.py", line 100, in getitem
pair = self.get_patch(lr, hr)
File "/home/Husiyu2022/PycharmProjects/EDSR-PyTorch/src/data/srdata.py", line 138, in get_patch
lr, hr = common.get_patch(
File "/home/Husiyu2022/PycharmProjects/EDSR-PyTorch/src/data/common.py", line 29, in get_patch
*[a[ty:ty + tp, tx:tx + tp, :] for a in args[1:]]
File "/home/Husiyu2022/PycharmProjects/EDSR-PyTorch/src/data/common.py", line 29, in
*[a[ty:ty + tp, tx:tx + tp, :] for a in args[1:]]
TypeError: list indices must be integers or slices, not tuple

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