mindspore.dataset.audio.BorderType

class mindspore.dataset.audio.BorderType[source]

Padding mode.

Possible enumeration values are: BorderType.CONSTANT, BorderType.EDGE, BorderType.REFLECT, BorderType.SYMMETRIC.

  • BorderType.CONSTANT: Pad with a constant value.

  • BorderType.EDGE: Pad with the last value on the edge.

  • BorderType.REFLECT: Reflect the value on the edge while omitting the last one. For example, pad [1, 2, 3, 4] with 2 elements on both sides will result in [3, 2, 1, 2, 3, 4, 3, 2].

  • BorderType.SYMMETRIC: Reflect the value on the edge while repeating the last one. For example, pad [1, 2, 3, 4] with 2 elements on both sides will result in [2, 1, 1, 2, 3, 4, 4, 3].

Note

This class derived from class str to support json serializable.