swz30 / MIRNet

[ECCV 2020] Learning Enriched Features for Real Image Restoration and Enhancement. SOTA results for image denoising, super-resolution, and image enhancement.
Other
667 stars 96 forks source link

General query in MIRNet_model.py . #17

Closed nanmehta closed 3 years ago

nanmehta commented 3 years ago

thanks for your great work sir!

I have one doubt in lines 296-297 of this file(MIRNet_model.py). for j in range(self.height): blocks_out[j] = self.blocks[j]i

Why have you used a for loop over here, according to the architecture as per my understanding, we could simply pass the temp(selective_kernel_fusion) output to the DAU(or blocks variable). I mean to say, couldn't we have just written, blocks_out[j] = self.blocksj. Kindly help.

adityac8 commented 3 years ago

Hi @nan-rock

Our self.blocks contains DAU in a 2D grid. Hence, we index them using blocks_out[j] = self.blocks[j][i](tmp[j]). This gives us flexibility in case we want to increase our height or width.

Thanks