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 load file containing pickled data when allow_pickle=False #79

Open
Kamin90 opened this issue Oct 10, 2022 · 1 comment

Comments

@Kamin90
Copy link

Kamin90 commented Oct 10, 2022

I got this error while training the model using my own dataset:

F:\DASR-main\dataset\benchmark\Set14\HR
F:\DASR-main\dataset\benchmark\Set14\LR_bicubic
Making model...
Preparing loss function:
1.000 * L1
[Epoch 1] Learning rate: 1.00e-3
Traceback (most recent call last):
File "main.py", line 19, in
t.train()
File "F:\DASR-main\trainer.py", line 63, in train
for batch, (hr, _, idx_scale) in enumerate(self.loader_train):
File "C:\Users\anaconda3\envs\DASR\lib\site-packages\torch\utils\data\dataloader.py", line 582, in next
return self._process_next_batch(batch)
File "C:\Users\anaconda3\envs\DASR\lib\site-packages\torch\utils\data\dataloader.py", line 608, in _process_next_batch
raise batch.exc_type(batch.exc_msg)
ValueError: Traceback (most recent call last):
File "F:\DASR-main\dataloader.py", line 38, in _ms_loop
samples = collate_fn([dataset[i] for i in batch_indices])
File "F:\DASR-main\dataloader.py", line 38, in
samples = collate_fn([dataset[i] for i in batch_indices])
File "F:\DASR-main\data\multiscalesrdata.py", line 120, in getitem
hr, filename = self._load_file(idx)
File "F:\DASR-main\data\multiscalesrdata.py", line 154, in _load_file
hr = np.load(_f)[0]['image']
File "C:\Users\anaconda3\envs\DASR\lib\site-packages\numpy\lib\npyio.py", line 444, in load
raise ValueError("Cannot load file containing pickled data "
ValueError: Cannot load file containing pickled data when allow_pickle=False

@para997
Copy link

para997 commented Apr 4, 2023

hr = np.load(_f, allow_pickle=True)[0]['image']

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