Scale#

class seli.net.Scale(offset: float = 1)[source]#

Bases: Module

Scale the last axis of the input by a learnable vector.

Parameters:

offset (bool) – If True the input will be scaled by 1 + scale instead of scale. The scale is initialized to 0.

Attributes Summary

dim

Return the dimension of the scale.

Methods Summary

__call__(x)

Call self as a function.

Attributes Documentation

dim#

Return the dimension of the scale. If the scale has not been initialized yet, return None.

Methods Documentation

__call__(x: Float[Array, '*batch dim']) Float[Array, '*batch dim'][source]#

Call self as a function.