cheind / pytorch-debayer

Convolutional PyTorch debayering / demosaicing layers
MIT License
79 stars 10 forks source link

Backward support? #2

Closed QiuJueqin closed 4 years ago

QiuJueqin commented 4 years ago

Hi, have you ever tried to integrate this debayer module with other trainable module (nn.Module)? Will the back propagation work well for the debayer module?

cheind commented 4 years ago

Hey! At least for the 2x2 and 3x3 I don't see why gradient flow should be blocked. Note however, the parameters of debayer layer are not learnable per se.

QiuJueqin commented 4 years ago

Yes, making kernel in demosaic unaltered is reasonable. Thanks!