conv

Contents

conv#

class saiunit.lax.conv(x, y, window_strides, padding, precision=None, preferred_element_type=None, **kwargs)#

Convenience wrapper around conv_general_dilated.

Parameters:
  • x (Union[Array, ndarray, number, bool, saiunit.Quantity]) – A rank n+2 dimensional input array (lhs).

  • y (Union[Array, ndarray, number, bool, saiunit.Quantity]) – A rank n+2 dimensional array of kernel weights (rhs).

  • window_strides (Sequence[int]) – A sequence of n integers representing the inter-window strides.

  • padding (str) – Either 'SAME' or 'VALID'.

  • precision (Union[None, str, Precision, tuple[str, str], tuple[Precision, Precision], DotAlgorithm, DotAlgorithmPreset]) – Either None (default precision), a Precision enum value, or a tuple of two such values for lhs and rhs.

  • preferred_element_type (Union[str, type[Any], dtype, SupportsDType, None]) – The accumulation and result dtype. None means use the default.

Returns:

out – An array containing the convolution result.

Return type:

Union[saiunit.Quantity, Array]