Replies: 2 comments 2 replies
-
|
Beta Was this translation helpful? Give feedback.
2 replies
Answer selected by
wyli
-
I have found the problem. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
ValueError Traceback (most recent call last)
f:\jupyterlab\Project pipeline\mulStage.ipynb Cell 5 in <cell line: 2>()
3 loss, step = 0, 0
4 model.train()
----> 6 for img, lab in loader_train:
7 print(img.shape)
File f:\Python310\lib\site-packages\torch\utils\data\dataloader.py:530, in _BaseDataLoaderIter.next(self)
528 if self._sampler_iter is None:
529 self._reset()
--> 530 data = self._next_data()
531 self._num_yielded += 1
532 if self._dataset_kind == _DatasetKind.Iterable and
533 self._IterableDataset_len_called is not None and
534 self._num_yielded > self._IterableDataset_len_called:
File f:\Python310\lib\site-packages\torch\utils\data\dataloader.py:570, in _SingleProcessDataLoaderIter._next_data(self)
568 def _next_data(self):
569 index = self._next_index() # may raise StopIteration
--> 570 data = self._dataset_fetcher.fetch(index) # may raise StopIteration
571 if self._pin_memory:
572 data = _utils.pin_memory.pin_memory(data)
File f:\Python310\lib\site-packages\torch\utils\data_utils\fetch.py:49, in _MapDatasetFetcher.fetch(self, possibly_batched_index)
...
151 if len(tup) == dim:
152 return tuple(tup)
--> 154 raise ValueError(f"Sequence must have length {dim}, got {len(tup)}.")
ValueError: Sequence must have length 1, got 3.
How to address this error? thanks
Beta Was this translation helpful? Give feedback.
All reactions