Zj-BinXia / ENLCA

This project is official implementation of 'Efficient Non-Local Contrastive Attention for Image Super-Resolution', AAAI2022
86 stars 7 forks source link

ValueError: too many values to unpack (expected 2) #4

Closed xuanyi-li closed 2 years ago

xuanyi-li commented 2 years ago

File "/data2/cnu_lxy001/ENLCA-master/src/trainer.py", line 49, in train sr, comparative_loss = self.model(lr, 0) ValueError: too many values to unpack (expected 2) I also read this code : https://github.com/sanghyun-son/EDSR-PyTorch/blob/master/src/trainer.py loss = self.loss(sr, hr) It is different ,why? and how to solve this problem?

Zj-BinXia commented 2 years ago

yes, except the L1 loss, we also introduce the contrastive loss.

xuanyi-li commented 2 years ago

File "/data2/cnu_lxy001/ENLCA-master/src/trainer.py", line 49, in train sr, comparative_loss = self.model(lr, 0) ValueError: too many values to unpack (expected 2)

This question has been solved.by the way of writting them separately.

sr = self.model(lr, 0) comparative_loss = self.model(lr, 0)