Skip to Content

max_pool1d_op

View the code on GitHub

Structs

Struct: MaxPool1d

Fields

Methods

compute_shape(mut curr: ArrayShape, args: List[ArrayShape])
Computes the shape of an array after a 1-dimensional max pooling operation with dilation.
Args
  • curr: ArrayShape The ArrayShape to store the result of the computation.

  • args: List[ArrayShape] The input ArrayShape, and the pooling parameters encoded in an ArrayShape.

__call__(mut curr: Array, args: List[Array])
more details
Args
  • curr: Array

  • args: List[Array]

vjp(primals: List[Array], grad: Array, out: Array) -> List[Array]
more details
Args
  • primals: List[Array]

  • grad: Array

  • out: Array

Returns
  • List[Array]
jvp(primals: List[Array], tangents: List[Array]) -> Array
more details
Args
  • primals: List[Array]

  • tangents: List[Array]

Returns
  • Array
fwd(arg0: Array, kernel_size: Int, stride: Int = 1, padding: Int = 0, dilation: Int = 1) -> Array
more details
Args
  • arg0: Array

  • kernel_size: Int

  • stride: Int (default: 1)

  • padding: Int (default: 0)

  • dilation: Int (default: 1)

Returns
  • Array

Functions

max_pool1d

max_pool1d(arg0: Array, kernel_size: Int, stride: Int = 1, padding: Int = 0, dilation: Int = 1) -> Array
Computes the 1-dimensional max pooling operation with dilation.
Args
  • arg0: Array The input tensor.

  • kernel_size: Int The size of the pooling kernel.

  • stride: Int (default: 1) The stride of the pooling operation.

  • padding: Int (default: 0) The padding to apply to the input tensor.

  • dilation: Int (default: 1) The dilation to apply to the input tensor.

Returns
  • Array - The result of the 1-dimensional max pooling operation.
Last updated on