Skip to content

zero_interdependence

Bases: constant_c_interdependence

A class for zero interdependence.

This class defines an interdependence matrix filled with zeros, which inherits from constant_c_interdependence class with constant factor \(c\) set to zero.

Notes

Formally, based on the (optional) input data batch \(\mathbf{X} \in {R}^{b \times m}\), we define the zero interdependence function as: $$ \begin{equation} \xi(\mathbf{X}) = 0.0 \times \mathbf{1} \in {R}^{m \times m}, \text{ or } \xi(\mathbf{X}) = 0.0 \times \mathbf{1} \in {R}^{b \times b}. \end{equation} $$

Methods:

Name Description
__init__

Initializes the zero interdependence function.

Source code in tinybig/interdependence/basic_interdependence.py
class zero_interdependence(constant_c_interdependence):
    r"""
        A class for zero interdependence.

        This class defines an interdependence matrix filled with zeros, which inherits from `constant_c_interdependence` class
        with constant factor $c$ set to zero.

        Notes
        -------
        Formally, based on the (optional) input data batch $\mathbf{X} \in {R}^{b \times m}$, we define the zero interdependence function as:
        $$
            \begin{equation}
            \xi(\mathbf{X}) = 0.0 \times \mathbf{1} \in {R}^{m \times m}, \text{ or } \xi(\mathbf{X}) = 0.0 \times \mathbf{1} \in {R}^{b \times b}.
            \end{equation}
        $$

        Methods
        -------
        __init__(name='zero_interdependence', ...)
            Initializes the zero interdependence function.
    """
    def __init__(self, name: str = 'zero_interdependence', *args, **kwargs):
        """
            Initializes the zero interdependence function.

            This class sets the interdependence matrix to be filled with zeros, ensuring no relationship
            between the rows or columns of the input tensor.

            Parameters
            ----------
            name : str, optional
                Name of the interdependence function. Defaults to 'zero_interdependence'.
            *args : tuple
                Additional positional arguments for the parent `constant_c_interdependence` class.
            **kwargs : dict
                Additional keyword arguments for the parent `constant_c_interdependence` class.
        """
        super().__init__(c=0.0, name=name, *args, **kwargs)

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

Initializes the zero interdependence function.

This class sets the interdependence matrix to be filled with zeros, ensuring no relationship between the rows or columns of the input tensor.

Parameters:

Name Type Description Default
name str

Name of the interdependence function. Defaults to 'zero_interdependence'.

'zero_interdependence'
*args tuple

Additional positional arguments for the parent constant_c_interdependence class.

()
**kwargs dict

Additional keyword arguments for the parent constant_c_interdependence class.

{}
Source code in tinybig/interdependence/basic_interdependence.py
def __init__(self, name: str = 'zero_interdependence', *args, **kwargs):
    """
        Initializes the zero interdependence function.

        This class sets the interdependence matrix to be filled with zeros, ensuring no relationship
        between the rows or columns of the input tensor.

        Parameters
        ----------
        name : str, optional
            Name of the interdependence function. Defaults to 'zero_interdependence'.
        *args : tuple
            Additional positional arguments for the parent `constant_c_interdependence` class.
        **kwargs : dict
            Additional keyword arguments for the parent `constant_c_interdependence` class.
    """
    super().__init__(c=0.0, name=name, *args, **kwargs)