Skip to content

zero_remainder

Bases: constant_remainder

The zero remainder function.

As a special case of constant remainder, the zero remainder returns constant zero vector as the remainder term. This class inherits from the constant remainder class.

...

Notes

The zero remainder function \(\pi: {R}^m \to {R}^n\) just projects all inputs to a constant zero vector, i.e., $$ \begin{equation} \pi(\mathbf{x}) = \mathbf{0}^n \in {R}^n. \end{equation} $$

By default, the remainder term will also be processed with the optional activation functions.

Attributes:

Name Type Description
name str, default = 'zero_remainder'

Name of the zero remainder function.

Methods:

Name Description
__init__

It initializes the zero remainder function.

Source code in tinybig/remainder/basic_remainder.py
class zero_remainder(constant_remainder):
    r"""
    The zero remainder function.

    As a special case of constant remainder, the zero remainder returns constant zero vector as the remainder term.
    This class inherits from the constant remainder class.

    ...

    Notes
    ----------
    The zero remainder function $\pi: {R}^m \to {R}^n$ just projects all inputs to a constant zero vector, i.e.,
    $$
        \begin{equation}
            \pi(\mathbf{x}) = \mathbf{0}^n \in {R}^n.
        \end{equation}
    $$

    By default, the remainder term will also be processed with the optional activation functions.

    Attributes
    ----------
    name: str, default = 'zero_remainder'
        Name of the zero remainder function.

    Methods
    ----------
    __init__
        It initializes the zero remainder function.
    """
    def __init__(self, name='zero_remainder', *args, **kwargs):
        """
        The initialization method of the zero remainder function.

        It initializes a zero remainder function object.
        This method will also call the initialization method of the base class as well.

        Parameters
        ----------
        name: str, default = 'zero_remainder'
            Name of the zero remainder function.

        Returns
        ----------
        remainder
            The zero remainder function object.
        """
        super().__init__(name=name, c=0.0, *args, **kwargs)

__init__(name='zero_remainder', *args, **kwargs)

The initialization method of the zero remainder function.

It initializes a zero remainder function object. This method will also call the initialization method of the base class as well.

Parameters:

Name Type Description Default
name

Name of the zero remainder function.

'zero_remainder'

Returns:

Type Description
remainder

The zero remainder function object.

Source code in tinybig/remainder/basic_remainder.py
def __init__(self, name='zero_remainder', *args, **kwargs):
    """
    The initialization method of the zero remainder function.

    It initializes a zero remainder function object.
    This method will also call the initialization method of the base class as well.

    Parameters
    ----------
    name: str, default = 'zero_remainder'
        Name of the zero remainder function.

    Returns
    ----------
    remainder
        The zero remainder function object.
    """
    super().__init__(name=name, c=0.0, *args, **kwargs)