I always get this kind of errors every time I train. How do I resolve this? If you can help me solve this problem, I will be very grateful.
create web directory ./checkpoints/enlightening/web...
/home/a706/anaconda3/lib/python3.7/site-packages/torch/nn/functional.py:2390: UserWarning: nn.functional.upsample is deprecated. Use nn.functional.interpolate instead. warnings.warn("nn.functional.upsample is deprecated. Use nn.functional.interpolate instead.")
/home/a706/anaconda3/lib/python3.7/site-packages/torch/nn/functional.py:2479: UserWarning: Default upsampling behavior when mode=bilinear is changed to align_corners=False since 0.4.0. Please specify align_corners=True if the old behavior is desired. See the documentation of nn.Upsample for details.
"See the documentation of nn.Upsample for details.".format(mode))
Traceback (most recent call last):
File "train.py", line 37, in
errors = model.get_current_errors(epoch)
File "/home/a706/ys/imageEnhancement/EnlightenGAN-master-gpu/models/single_model.py", line 413, in get_current_errors
D_A = self.loss_D_A.data[0]
IndexError: invalid index of a 0-dim tensor. Use tensor.item() to convert a 0-dim tensor to a Python number
I always get this kind of errors every time I train. How do I resolve this? If you can help me solve this problem, I will be very grateful.
create web directory ./checkpoints/enlightening/web...
/home/a706/anaconda3/lib/python3.7/site-packages/torch/nn/functional.py:2390: UserWarning: nn.functional.upsample is deprecated. Use nn.functional.interpolate instead. warnings.warn("nn.functional.upsample is deprecated. Use nn.functional.interpolate instead.")
/home/a706/anaconda3/lib/python3.7/site-packages/torch/nn/functional.py:2479: UserWarning: Default upsampling behavior when mode=bilinear is changed to align_corners=False since 0.4.0. Please specify align_corners=True if the old behavior is desired. See the documentation of nn.Upsample for details.
"See the documentation of nn.Upsample for details.".format(mode))
Traceback (most recent call last): File "train.py", line 37, in
errors = model.get_current_errors(epoch)
File "/home/a706/ys/imageEnhancement/EnlightenGAN-master-gpu/models/single_model.py", line 413, in get_current_errors
D_A = self.loss_D_A.data[0]
IndexError: invalid index of a 0-dim tensor. Use tensor.item() to convert a 0-dim tensor to a Python number