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

ValueError: cannot reshape array of size 86400 into shape (360,355,1) #4

Open
Gi-gigi opened this issue Dec 16, 2023 · 0 comments
Open

Comments

@Gi-gigi
Copy link

Gi-gigi commented Dec 16, 2023

where:
label = np.reshape(label, (h, w, 1))
edge = np.reshape(edge, (h, w, 1))

question:
Traceback (most recent call last):
File "/home/PAKRN/main_SGL_KRN.py", line 556, in
main(config)
File "/home/PAKRN/main_SGL_KRN.py", line 498, in main
train.train()
File "/home/main_SGL_KRN.py", line 388, in train
for i, data_batch in enumerate(self.train_loader):
File "/home/utils/data/dataloader.py", line 521, in next
data = self._next_data()
File "/home/utils/data/dataloader.py", line 1203, in _next_data
return self._process_data(data)
File "/home//utils/data/dataloader.py", line 1229, in _process_data
data.reraise()
File "/home//anaconda3//_utils.py", line 434, in reraise
raise exception
ValueError: Caught ValueError in DataLoader worker process 0.
Original Traceback (most recent call last):
File "/home///utils/data/_utils/worker.py", line 287, in _worker_loop
data = fetcher.fetch(index)
File "/home//a/fetch.py", line 49, in fetch
data = [self.dataset[idx] for idx in possibly_batched_index]
File "/home//a/_utils/fetch.py", line 49, in
data = [self.dataset[idx] for idx in possibly_batched_index]
File "/home//PAKRN/dataset/dataset_edge_augment.py", line 48, in getitem
sal_image, sal_label, sal_edge = generate_scale_label(sal_image, sal_label, sal_edge)
File "/home/PAKRN/dataset/dataset_edge_augment.py", line 151, in generate_scale_label
label = np.reshape(label, (h, w, 1))
File "<array_function internals>", line 5, in reshape
File "/home//fromnumeric.py", line 298, in reshape
return _wrapfunc(a, 'reshape', newshape, order=order)
File "/home//numpy/core/fromnumeric.py", line 57, in _wrapfunc
return bound(*args, **kwds)
ValueError: cannot reshape array of size 86400 into shape (360,355,1)

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