Open Trueman1997 opened 2 years ago
I have set absolute path to solve “ZeroDivisionError” problem。 but another problem happened:
Making model... Making model... Making model...
Evaluation:
0%| | 0/200 [00:00<?, ?it/s]Traceback (most recent call last):
File "main_test.py", line 34, in
it looks like a dataloader problem。but i have replaced a new dataloader which supportted pytorch1.1.0,so i have no idea to solve this problem。anyone helps me
I think the issue from the len(self.images_lrr)-1 is less than 1. Maybe you can check whether self.images_lrr loads the files from the directory you desire normally.
I think the issue from the len(self.images_lrr)-1 is less than 1. Maybe you can check whether self.images_lrr loads the files from the directory you desire normally.
Making model... Making model... Making model...
Evaluation:
0%| | 0/44 [00:00<?, ?it/s]Traceback (most recent call last):
File "main_test.py", line 34, in
Yeah, the first issue has been addressed.
I did not come across the second issue when I run the code. It works well from my side. It seems that (lr, hr, lrr, hq, filename, _) does not match the one-batch output of the dataloader. You might consider first using a single variable (e.g. var_tmp) to get the whole output of the dataload, see what component var_tmp includes and then remap var_tmp to lr, hr, lrr, hq.
As I did not meet the error, I could not provide a very direct solution. Could you look into the code logic more in detail and figure out it?
I have set absolute path to solve “ZeroDivisionError” problem。 but another problem happened:
Making model... Making model... Making model...
Evaluation: 0%| | 0/200 [00:00<?, ?it/s]Traceback (most recent call last): File "main_test.py", line 34, in while not t.terminate(): File "/gaoren/DRBN/DRBL-stage2-other-datasets/src/trainer_test.py", line 292, in terminate self.test() File "/gaoren/DRBN/DRBL-stage2-other-datasets/src/trainer_test.py", line 205, in test for idximg, (lr, hr, lrr, hq, filename, ) in enumerate(tqdm_test): File "/usr/local/lib/python3.6/dist-packages/tqdm/std.py", line 1081, in iter for obj in iterable: File "/usr/local/lib/python3.6/dist-packages/torch/utils/data/dataloader.py", line 560, in next batch = self.collate_fn([self.dataset[i] for i in indices]) File "/usr/local/lib/python3.6/dist-packages/torch/utils/data/dataloader.py", line 560, in batch = self.collate_fn([self.dataset[i] for i in indices]) File "/gaoren/DRBN/DRBL-stage2-other-datasets/src/data/srdata.py", line 207, in getitem lr, hr, lrr, hq, filename = self._load_file(idx) File "/gaoren/DRBN/DRBL-stage2-other-datasets/src/data/srdata.py", line 236, in _load_file idx_lrr = np.random.randint(1, len(self.images_lrr)-1)-1 File "mtrand.pyx", line 630, in numpy.random.mtrand.RandomState.randint File "bounded_integers.pyx", line 1228, in numpy.random.bounded_integers._rand_int64 ValueError: low >= high 0%| | 0/200 [00:00<?, ?it/s]
it looks like a dataloader problem。but i have replaced a new dataloader which supportted pytorch1.1.0,so i have no idea to solve this problem。anyone helps me
How did you set the absolute path? in which py file? and how did you set the dataset for test only? THX!!
How did you solve your first problem?
When running stage2-otherdatasets, test what path the image should be placed in?
when I run test.sh in stage2-otherdatasets,some questions happerned:
Making model... Making model... Making model...
Evaluation: 0it [00:00, ?it/s] Traceback (most recent call last): File "main_test.py", line 34, in
while not t.terminate():
File "/DRBN/DRBL-stage2-other-datasets/src/trainer_test.py", line 292, in terminate
self.test()
File "/DRBN/DRBL-stage2-other-datasets/src/trainer_test.py", line 264, in test
self.ckp.log[-1, idx_scale] = eval_acc / len(self.loader_test)
ZeroDivisionError: division by zero