antsnormflows.utils.nn

Functions

sum_except_batch(x[, num_batch_dims])

Sums all elements of x except for the first num_batch_dims dimensions.

tile(x, n)

Classes

ActNorm(shape)

ActNorm layer with just one forward pass

ClampExp()

Nonlinearity min(exp(lam * x), 1)

ConstScaleLayer([scale])

Scaling features by a fixed factor

PeriodicFeaturesCat(ndim, ind[, scale])

Converts a specified part of the input to periodic features by replacing those features f with [sin(scale * f), cos(scale * f)].

PeriodicFeaturesElementwise(ndim, ind[, ...])

Converts a specified part of the input to periodic features by replacing those features f with w1 * sin(scale * f) + w2 * cos(scale * f).