max_fusion
Bases: metric_fusion
A fusion mechanism that computes the element-wise maximum across input tensors.
Notes
Formally, given the input interdependence matrices \(\mathbf{A}_1, \mathbf{A}_2, \ldots, \mathbf{A}_k \in R^{m \times n}\) of identical shapes, we can represent their fusion output as
\[
\begin{equation}
\text{fusion}(\mathbf{A}_1, \mathbf{A}_2, \cdots, \mathbf{A}_k) = \mathbf{A} \in R^{m \times n},
\end{equation}
\]
where the entry \(\mathbf{A}(i, j)\) (for \(i \in \{1, 2, \cdots, m\}\) and \(j \in \{1, 2, \cdots, n\}\)) can be represented as
\[
\begin{equation}
\mathbf{A}(i, j) = max \left( \mathbf{A}_1(i,j), \mathbf{A}_2(i,j), \cdots, \mathbf{A}_k(i,j) \right).
\end{equation}
\]
Methods:
| Name | Description |
|---|---|
__init__ |
Initializes the max fusion function. |
Source code in tinybig/fusion/metric_fusion.py
__init__(name='max_fusion', *args, **kwargs)
Initializes the max fusion function.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
name
|
str
|
Name of the fusion function. Defaults to "max_fusion". |
'max_fusion'
|
*args
|
tuple
|
Additional positional arguments for the parent class. |
()
|
**kwargs
|
dict
|
Additional keyword arguments for the parent class. |
{}
|