core.nn.nsf.create_transform

core.nn.nsf.create_transform(
    num_flow_steps,
    param_dim,
    context_dim,
    base_transform_kwargs,
)

Build a sequence of NSF transforms, which maps parameters y into the base distribution u (noise). Transforms are conditioned on context data x.

Note that the forward map is f^{-1}(y, x).

Each step in the sequence consists of * A linear transform of y, which in particular permutes components * A NSF transform of y, conditioned on x. There is one final linear transform at the end.

:param num_flow_steps: int, number of transforms in sequence :param param_dim: int, dimensionality of parameter space (y) :param context_dim: int, dimensionality of context (x) :param base_transform_kwargs: int hyperparameters for NSF step :return: Transform the NSF transform sequence