alterzero / DBPN-Pytorch

The project is an official implement of our CVPR2018 paper "Deep Back-Projection Networks for Super-Resolution" (Winner of NTIRE2018 and PIRM2018)
https://alterzero.github.io/projects/DBPN.html
MIT License
565 stars 164 forks source link

question about bicubic #40

Closed NeverMoreLCH closed 5 years ago

NeverMoreLCH commented 5 years ago

Hello, thanks for your excellent work!

I am a rookie, and I have a very simple question when trianing the network. In your train code, the bicubic is added to predict before calculate the loss. I thought it means the network want to learn the residual. But in your test code (calculate the pnsr), you use predict without adding bicubic to calculate the mse. This makes me confused. In my oponion, the predict should mean residual, and why don't add the bicubic to the predict during testing.

Thanks for your reply!

NeverMoreLCH commented 5 years ago

@alterzero

alterzero commented 5 years ago

Hi,

The same setting should be applied the same both on training and testing. The bicubic image is only used on the new model (DBPN-RES-MR64-3). Sorry for my mistakes, but don't rely on the default parameters in this repository.

yangyingni commented 5 years ago

The same setting should be applied the same both on training and testing. The bicubic image is only used on the new model (DBPN-RES-MR64-3). Sorry for my mistakes, but don't rely on the default parameters in this repository.

Hello,thank you for sharing.I have a question about a word in main.py. def train(epoch): epoch_loss = 0 model.train() for iteration, batch in enumerate(training_data_loader, 1): input, target, bicubic = Variable(batch[0]), Variable(batch[1]), Variable(batch[2]),

What does 'input, target, bicubic = Variable(batch[0]), Variable(batch[1]), Variable(batch[2])' mean? I tried to add some layers in your model,But it shows 'RuntimeError:The size of Tensor a(160) must match the size of tensor b(80) at non-singleton dimension 3'.I am confused.I will be thankful if you can answer me.Thanks.