Skip to content

INN.Linear1d

Zhang Yanbo edited this page Oct 27, 2022 · 1 revision

CLASS INN.Linear1d(num_feature, mat='matrix')

Compute the 1x1 linear convolution for [N, num_feature, x] shape.

  • num_feature: dimension of linear inputs. The outputs will have the same dimension as the input for invertibility.
  • mat: (default 'matrix') Type of linear matrix. It will use conventional matrices if mat='matrix'. If mat='PLU', then it will use PLU decomposition to get fast log-Jacobian determinate. However, PLU method will reduce its representation power.

Methods

forward(x, log_p0=0, log_det_J=0)

Compute the forward pass. The output will be the transformed x. If compute_p=True, logp and logdet will also returned.

inverse(y, **args)

Compute the inverse of y. The **args is a placeholder for consistent format.

Clone this wiki locally