nir.ir.linear#

Module Contents#

Classes#

Affine

Affine transform that linearly maps and translates the input signal.

Linear

Linear transform without bias:

Scale

Scales a signal by some values.

class nir.ir.linear.Affine#

Bases: nir.ir.node.NIRNode

Affine transform that linearly maps and translates the input signal.

This is equivalent to the Affine transformation

Assumes a one-dimensional input vector of shape (N,).

\[y(t) = W*x(t) + b\]
weight: numpy.ndarray#
bias: numpy.ndarray#
input_type: Optional[Dict[str, numpy.ndarray]]#
output_type: Optional[Dict[str, numpy.ndarray]]#
metadata: Dict[str, Any]#
__post_init__()#
class nir.ir.linear.Linear#

Bases: nir.ir.node.NIRNode

Linear transform without bias:

\[y(t) = W*x(t)\]
weight: numpy.ndarray#
__post_init__()#
class nir.ir.linear.Scale#

Bases: nir.ir.node.NIRNode

Scales a signal by some values.

This node is equivalent to the Hadamard product.

\[y(t) = x(t) \odot s\]
scale: numpy.ndarray#
__post_init__()#