Question about the forward method
antonelse opened this issue · 3 comments
Hi, I'm trying using the HAT network outside the basicSR framework for a custom task.
As a model I'm using the one in /hat/archs/hat_arch.py
here.
I'm curious about the forward method of this model (line 971), since, if the field upsampler
is not pixelshuffle
, it seems that it does not perform any forward pass on the building blocks of the model.
If I'm not wrong, the forward pass of all the some blocks are performed by the function forward_features
(line 950), that is executed only if upsampler
is pixelshuffle
.
In addition, if pixelshuffle
, at inference time the network does not perform ad upscaling, but the input shape remains the same.
I'm wondering if this is the correct behaviour, or I'm missing something ;)
I'm also courious about the others fiels for the recostruction module (upsampler
), like 'pixelshuffle'/'pixelshuffledirect'/'nearest+conv'/None
.
Sorry if I'm asking something trivial, but I'm new to this framework and I'm trying to understand how it works.
@antonelse The codes are simplified by only providing one choice of 'pixelshuffle' upsampling. You can refer to the codes of other choices for upsampling in https://github.com/XPixelGroup/BasicSR/blob/master/basicsr/archs/swinir_arch.py. Our provided pretrained models are based on 'pixelshuffle' upsampling.