pad function

VARP pad(
  1. VARP x,
  2. VARP paddings, {
  3. PadValueMode mode = PadValueMode.CONSTANT,
})

Pads a variable.

Args:

  • x: A variable.
  • paddings: A variable of type Halide_Type_Int. The shape is n, 2 where n is the rank of variable.
  • mode: A enum, One of PadValueMode_CONSTANT, PadValueMode_SYMMETRIC, or PadValueMode_REFLECT.

Returns:

  • A variable. Has the same type as x.

Implementation

VARP pad(VARP x, VARP paddings, {PadValueMode mode = PadValueMode.CONSTANT}) =>
    VARP.fromPointer(C.mnn_expr_Pad(x.ptr, paddings.ptr, mode.value));