Open AlexanderMath opened 5 years ago
The article briefly describe the architecture, and refer to Real NVP for more details.
This lead me to believe Glow implemented the Squeeze operation as done by Real NVP. It turns out this is not the case, please see the images below.
GLOW:
RealNVP:
This can be fixed by changing a single line in squeeze2d(..) which can be found in tfops.py.
squeeze2d(..)
#x = tf.transpose(x, [0, 1, 3, 5, 2, 4]) # differs to RealNVP x = tf.transpose(x, [0, 1, 3, 2, 4, 5]) # the same as RealNVP
Please not similar changes needs to be done for unsqueeze2d(..).
unsqueeze2d(..)
Does anyone know if this was intentional? It might be that mixing up channels this way slightly improves performance?
It doesn't matter. Squeeze2d is followed by 1x1 conv layer. After squeezing, both implementations have the same data within each channel group but a different order, they look same for 1x1 conv.
The article briefly describe the architecture, and refer to Real NVP for more details.
This lead me to believe Glow implemented the Squeeze operation as done by Real NVP. It turns out this is not the case, please see the images below.
GLOW:
RealNVP:
This can be fixed by changing a single line in
squeeze2d(..)
which can be found in tfops.py.Please not similar changes needs to be done for
unsqueeze2d(..)
.Does anyone know if this was intentional? It might be that mixing up channels this way slightly improves performance?