Skip to content

one_reconciliation

Bases: constant_reconciliation

The one parameter reconciliation function.

It performs the one parameter reconciliation, and returns the one reconciled parameter matrix of shape (n, D). This class inherits from the constant_reconciliation class defined above.

...

Notes

As a special case of the constant parameter reconciliation function, one reconciliation projects any input parameters to one matrix of shape (n, D) as follows: $$ \begin{equation} \psi(\mathbf{w}) = \mathbf{1} \in {R}^{n \times D}, \end{equation} $$ where the output matrix \(\mathbf{1}\) of size \(n \times D\) is filled with ones.

Source code in tinybig/reconciliation/basic_reconciliation.py
class one_reconciliation(constant_reconciliation):
    r"""
    The one parameter reconciliation function.

    It performs the one parameter reconciliation, and returns the one reconciled parameter matrix of shape (n, D).
    This class inherits from the constant_reconciliation class defined above.

    ...

    Notes
    ----------
    As a special case of the constant parameter reconciliation function, **one reconciliation** projects
    any input parameters to one matrix of shape (n, D) as follows:
    $$
        \begin{equation}
            \psi(\mathbf{w}) = \mathbf{1} \in {R}^{n \times D},
        \end{equation}
    $$
    where the output matrix $\mathbf{1}$ of size $n \times D$ is filled with ones.
    """
    def __init__(self, name: str = 'one_reconciliation', *args, **kwargs):
        r"""
        The initialization method of the one parameter reconciliation function.

        It initializes an one parameter reconciliation function object.
        This method will call the initialization method of the constant_reconciliation
        class with constant parameter $c=1.0$.

        Parameters
        ----------
        name: str, default = 'one_reconciliation'
            Name of the parameter reconciliation function.

        Returns
        ----------
        object
            The one parameter reconciliation function object.
        """
        super().__init__(name=name, c=1.0, *args, **kwargs)

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

The initialization method of the one parameter reconciliation function.

It initializes an one parameter reconciliation function object. This method will call the initialization method of the constant_reconciliation class with constant parameter \(c=1.0\).

Parameters:

Name Type Description Default
name str

Name of the parameter reconciliation function.

'one_reconciliation'

Returns:

Type Description
object

The one parameter reconciliation function object.

Source code in tinybig/reconciliation/basic_reconciliation.py
def __init__(self, name: str = 'one_reconciliation', *args, **kwargs):
    r"""
    The initialization method of the one parameter reconciliation function.

    It initializes an one parameter reconciliation function object.
    This method will call the initialization method of the constant_reconciliation
    class with constant parameter $c=1.0$.

    Parameters
    ----------
    name: str, default = 'one_reconciliation'
        Name of the parameter reconciliation function.

    Returns
    ----------
    object
        The one parameter reconciliation function object.
    """
    super().__init__(name=name, c=1.0, *args, **kwargs)