inox.nn.interpolation#
Interpolation layers
Classes#
Creates a spatial resampling layer. |
Descriptions#
- class inox.nn.interpolation.Resample(factor, **kwargs)#
Creates a spatial resampling layer.
- Parameters:
factor (Sequence[float]) – The resampling factor in each spatial axis.
kwargs – Keyword arguments passed to
jax.image.resize
.
- __call__(x)#
- Parameters:
x (Array) – The input tensor \(x\), with shape \((*, H_1, \dots, H_n, C)\).
- Returns:
The output tensor \(y\), with shape \((*, H_1', \dots, H_n', C)\), such that
\[H_i' = \left\lfloor r_i \times H_i \right\rfloor\]where \(r_i\) is the resampling factor of the \(i\)-th spatial axis.
- Return type: