Open zhangjinyangnwpu opened 2 years ago
I have a little confuse about line 302 in util.py
lr_blured = torch.clamp(lr_blured.round(), 0, 255)
is that right for a (0,1) tensor? when we use degrade for training, dose tensor value between (0,255)?
maybe the following code is more suitable?
lr_blured = torch.clamp(lr_blured, 0, 1)
Hi @zhangjinyangnwpu, input LR images with ranges [0, 1] and [0, 255] are both okay for SR networks. In this work, we follow EDSR and RCAN to use images with range [0, 255] as the input of our network.
I have a little confuse about line 302 in util.py
lr_blured = torch.clamp(lr_blured.round(), 0, 255)
is that right for a (0,1) tensor? when we use degrade for training, dose tensor value between (0,255)?
maybe the following code is more suitable?
lr_blured = torch.clamp(lr_blured, 0, 1)