Why do you swap axis?
Hi, thank you for sharing the code!
It seems that you first swap the axis first in the generator. Could you tell me why do you swap axis? More efficient, fewer parameters, or other reasons? Thanks.
################# def forward(self, input_tensor): # Swap axis of RGB image for the network to get a "batch" of size = 3 rather the 3 channels input_tensor = swap_axis(input_tensor) downscaled = self.first_layer(input_tensor) features = self.feature_block(downscaled) output = self.final_layer(features) return swap_axis(output) ###########################
I change the dimensions from 1,3,H,W to 3,1,H,W because this way the first layer is 1,Cout,k,k rather then 3,Cout,k,k`. The reason this is important is because I want a single SR kernel for the entire image and not a different kernel per channel.
LMK if this is unclear
I change the dimensions from
1,3,H,Wto3,1,H,Wbecause this way the first layer is1,Cout,k,k rather then3,Cout,k,k`. The reason this is important is because I want a single SR kernel for the entire image and not a different kernel per channel. LMK if this is unclear
I see. Thanks.