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

AttributeError: module 'collections' has no attribute 'Iterable' #80

Open
v0vanch0 opened this issue Apr 9, 2024 · 1 comment
Open

Comments

@v0vanch0
Copy link

v0vanch0 commented Apr 9, 2024

Traceback (most recent call last):
File "D:\PycharmProjects\traiNNer\codes\train.py", line 500, in
main()
File "D:\PycharmProjects\traiNNer\codes\train.py", line 496, in main
fit(model, opt, dataloaders, steps_states, data_params, loggers)
File "D:\PycharmProjects\traiNNer\codes\train.py", line 224, in fit
for n, train_data in enumerate(dataloaders['train'], start=1):
File "D:\venvs\AI\Lib\site-packages\torch\utils\data\dataloader.py", line 631, in next
data = self._next_data()
^^^^^^^^^^^^^^^^^
File "D:\venvs\AI\Lib\site-packages\torch\utils\data\dataloader.py", line 1346, in _next_data
return self._process_data(data)
^^^^^^^^^^^^^^^^^^^^^^^^
File "D:\venvs\AI\Lib\site-packages\torch\utils\data\dataloader.py", line 1372, in _process_data
data.reraise()
File "D:\venvs\AI\Lib\site-packages\torch_utils.py", line 722, in reraise
raise exception
AttributeError: Caught AttributeError in DataLoader worker process 0.
Original Traceback (most recent call last):
File "D:\venvs\AI\Lib\site-packages\torch\utils\data_utils\worker.py", line 308, in _worker_loop
data = fetcher.fetch(index)
^^^^^^^^^^^^^^^^^^^^
File "D:\venvs\AI\Lib\site-packages\torch\utils\data_utils\fetch.py", line 51, in fetch
data = [self.dataset[idx] for idx in possibly_batched_index]
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "D:\venvs\AI\Lib\site-packages\torch\utils\data_utils\fetch.py", line 51, in
data = [self.dataset[idx] for idx in possibly_batched_index]
~~~~~~~~~~~~^^^^^
File "D:\PycharmProjects\traiNNer\codes\data\aligned_dataset.py", line 126, in getitem
A_transform = get_transform(
^^^^^^^^^^^^^^
File "D:\PycharmProjects\traiNNer\codes\dataops\augmentations.py", line 573, in get_transform
transform_list.append(transforms.Resize(osize, method))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "D:\PycharmProjects\traiNNer\codes\dataops\augmennt\augmennt\transforms.py", line 175, in init
elif isinstance(size, collections.Iterable) and len(size) == 2:
^^^^^^^^^^^^^^^^^^^^
AttributeError: module 'collections' has no attribute 'Iterable'

@v0vanch0
Copy link
Author

Have python 3.11

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