When I first ran "python create_train.py " and I got the "train" folder,it contains some ".h5" files.And I wanted to test these data by using the "python demo.py --dataroot ./facades/test512 --valDataroot ./facades/train --netG ./checkpoints_new/netG_epoch_8.pth" . But I got the following error:
Traceback (most recent call last):
File "demo.py", line 217, in
for i, data in enumerate(valDataloader, 0):
File "/usr/local/lib/python3.5/dist-packages/torch/utils/data/dataloader.py", line 188, in next
batch = self.collate_fn([self.dataset[i] for i in indices])
File "/usr/local/lib/python3.5/dist-packages/torch/utils/data/dataloader.py", line 188, in
batch = self.collate_fn([self.dataset[i] for i in indices])
File "/home/lijunnian/Desktop/image dehaze/DCPDN-master/datasets/pix2pix_val.py", line 64, in getitem
ato_map=f['ato'][:]
File "h5py/_objects.pyx", line 54, in h5py._objects.with_phil.wrapper
File "h5py/_objects.pyx", line 55, in h5py._objects.with_phil.wrapper
File "/usr/local/lib/python3.5/dist-packages/h5py/_hl/group.py", line 177, in getitem
oid = h5o.open(self.id, self._e(name), lapl=self._lapl)
File "h5py/_objects.pyx", line 54, in h5py._objects.with_phil.wrapper
File "h5py/_objects.pyx", line 55, in h5py._objects.with_phil.wrapper
File "h5py/h5o.pyx", line 190, in h5py.h5o.open
KeyError: "Unable to open object (object 'ato' doesn't exist)"
I think the author makes a slip in writing in create_train.py
create_train.py saves the atom_map as 'atom',but we find it with 'ato'
118 lineh5f.create_dataset('ato',data=rep_atmosphere)
When I first ran "python create_train.py " and I got the "train" folder,it contains some ".h5" files.And I wanted to test these data by using the "python demo.py --dataroot ./facades/test512 --valDataroot ./facades/train --netG ./checkpoints_new/netG_epoch_8.pth" . But I got the following error: Traceback (most recent call last): File "demo.py", line 217, in
for i, data in enumerate(valDataloader, 0):
File "/usr/local/lib/python3.5/dist-packages/torch/utils/data/dataloader.py", line 188, in next
batch = self.collate_fn([self.dataset[i] for i in indices])
File "/usr/local/lib/python3.5/dist-packages/torch/utils/data/dataloader.py", line 188, in
batch = self.collate_fn([self.dataset[i] for i in indices])
File "/home/lijunnian/Desktop/image dehaze/DCPDN-master/datasets/pix2pix_val.py", line 64, in getitem
ato_map=f['ato'][:]
File "h5py/_objects.pyx", line 54, in h5py._objects.with_phil.wrapper
File "h5py/_objects.pyx", line 55, in h5py._objects.with_phil.wrapper
File "/usr/local/lib/python3.5/dist-packages/h5py/_hl/group.py", line 177, in getitem
oid = h5o.open(self.id, self._e(name), lapl=self._lapl)
File "h5py/_objects.pyx", line 54, in h5py._objects.with_phil.wrapper
File "h5py/_objects.pyx", line 55, in h5py._objects.with_phil.wrapper
File "h5py/h5o.pyx", line 190, in h5py.h5o.open
KeyError: "Unable to open object (object 'ato' doesn't exist)"
My OS is ubuntu 16.04 torch 0.3.0 CUDA 9.0
Look forward to your reply!