Glow's invertible 1x1 convolution mixes channels with a learned square matrix at every spatial position. Its contribution to the change-of-variables formula is the log-determinant, which scales with the number of positions.
Implement logdet_1x1(W, h, w), returning h * w * log|det W|.
slogdet for stability.Compute the log absolute determinant with slogdet, then multiply by the number of spatial positions.
No results yet
Run your code to check it against the examples, or submit to run every test.