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

Code is not runnig #181

Open
izadi0018 opened this issue May 3, 2024 · 1 comment
Open

Code is not runnig #181

izadi0018 opened this issue May 3, 2024 · 1 comment

Comments

@izadi0018
Copy link

I have the following problem
AttributeError: Caught AttributeError in DataLoader worker process 0.
Original Traceback (most recent call last):
 File "/share/apps/eb/PyTorch/2.2.0-Py3.10.8/lib/python3.10/site-packages/torch/utils/data/_utils/worker.py", line 308, in _worker_loop
  data = fetcher.fetch(index)
 File "/share/apps/eb/PyTorch/2.2.0-Py3.10.8/lib/python3.10/site-packages/torch/utils/data/_utils/fetch.py", line 51, in fetch
  data = [self.dataset[idx] for idx in possibly_batched_index]
 File "/share/apps/eb/PyTorch/2.2.0-Py3.10.8/lib/python3.10/site-packages/torch/utils/data/_utils/fetch.py", line 51, in
  data = [self.dataset[idx] for idx in possibly_batched_index]
 File "/home/u111197/codes/data/dataset_sr.py", line 42, in getitem
  img_H = util.imread_uint(H_path, self.n_channels)
 File "/home/u111197/codes/utils/utils_image.py", line 197, in imread_uint
  if img.ndim == 2:
AttributeError: 'NoneType' object has no attribute 'ndim

@schaoyang340
Copy link

schaoyang340 commented May 16, 2024

I have the following problem
AttributeError: Caught AttributeError in DataLoader worker process 0.
Original Traceback (most recent call last):
File "/share/apps/eb/PyTorch/2.2.0-Py3.10.8/lib/python3.10/site-packages/torch/utils/data/_utils/worker.py", line 308, in _worker_loop
data = fetcher.fetch(index)
File "/share/apps/eb/PyTorch/2.2.0-Py3.10.8/lib/python3.10/site-packages/torch/utils/data/_utils/fetch.py", line 51, in fetch
data = [self.dataset[idx] for idx in possibly_batched_index]
File "/share/apps/eb/PyTorch/2.2.0-Py3.10.8/lib/python3.10/site-packages/torch/utils/data/_utils/fetch.py", line 51, in
data = [self.dataset[idx] for idx in possibly_batched_index]
File "/home/u111197/codes/data/dataset_sr.py", line 42, in getitem
img_H = util.imread_uint(H_path, self.n_channels)
File "/home/u111197/codes/utils/utils_image.py", line 197, in imread_uint
if img.ndim == 2:
AttributeError: 'NoneType' object has no attribute 'ndim

Friend, your problem seems to be that the path of the test data is not set correctly. In the KAIR project, the names of the test data files used by different methods are different.

You can view the testset_name attribute in the running code to see which data file name is used by default.

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

2 participants