`Traceback (most recent call last):
File "/opt/data/private/starganv2/stargan-v2-master/metrics/eval.py", line 76, in calculate_metrics
x_ref = next(iter_ref).to(device)
UnboundLocalError: local variable 'iter_ref' referenced before assignment
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "main.py", line 182, in
main(args)
File "main.py", line 59, in main
solver.train(loaders)
File "/opt/data/private/starganv2/stargan-v2-master/core/solver.py", line 171, in train
calculate_metrics(nets_ema, args, i+1, mode='reference')
File "/root/anaconda3/envs/stargan-v2/lib/python3.6/site-packages/torch/autograd/grad_mode.py", line 49, in decorate_no_grad
return func(*args, **kwargs)
File "/opt/data/private/starganv2/stargan-v2-master/metrics/eval.py", line 79, in calculate_metrics
x_ref = next(iter_ref).to(device)
File "/root/anaconda3/envs/stargan-v2/lib/python3.6/site-packages/torch/utils/data/dataloader.py", line 345, in next
data = self._next_data()
File "/root/anaconda3/envs/stargan-v2/lib/python3.6/site-packages/torch/utils/data/dataloader.py", line 831, in _next_data
raise StopIteration
StopIteration
`
this error has happened .i use the lattest version of eval.py.
`Traceback (most recent call last): File "/opt/data/private/starganv2/stargan-v2-master/metrics/eval.py", line 76, in calculate_metrics x_ref = next(iter_ref).to(device) UnboundLocalError: local variable 'iter_ref' referenced before assignment
During handling of the above exception, another exception occurred:
Traceback (most recent call last): File "main.py", line 182, in
main(args)
File "main.py", line 59, in main
solver.train(loaders)
File "/opt/data/private/starganv2/stargan-v2-master/core/solver.py", line 171, in train
calculate_metrics(nets_ema, args, i+1, mode='reference')
File "/root/anaconda3/envs/stargan-v2/lib/python3.6/site-packages/torch/autograd/grad_mode.py", line 49, in decorate_no_grad
return func(*args, **kwargs)
File "/opt/data/private/starganv2/stargan-v2-master/metrics/eval.py", line 79, in calculate_metrics
x_ref = next(iter_ref).to(device)
File "/root/anaconda3/envs/stargan-v2/lib/python3.6/site-packages/torch/utils/data/dataloader.py", line 345, in next
data = self._next_data()
File "/root/anaconda3/envs/stargan-v2/lib/python3.6/site-packages/torch/utils/data/dataloader.py", line 831, in _next_data
raise StopIteration
StopIteration
`
this error has happened .i use the lattest version of eval.py.
the command is "nohup python main.py --mode train --num_domains 4 --w_hpf 1 --lambda_reg 1 --lambda_sty 1 --lambda_ds 1 --lambda_cyc 1 --train_img_dir data/Chinese-Landscape-Painting-Dataset-main/train --val_img_dir data/Chinese-Landscape-Painting-Dataset-main/val --num_workers 0 --batch_size 4 > /opt/data/private/starganv2/mylog 2>&1 &"