mindspore.dataset.vision.Border

class mindspore.dataset.vision.Border[source]

Padding Mode, Border Type.

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

  • Border.CONSTANT: means it fills the border with constant values.

  • Border.EDGE: means it pads with the last value on the edge.

  • Border.REFLECT: means it reflects the values on the edge omitting the last value of edge. For example, padding [1,2,3,4] with 2 elements on both sides will result in [3,2,1,2,3,4,3,2].

  • Border.SYMMETRIC: means it reflects the values on the edge repeating the last value of edge. For example, padding [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.

static to_c_type(border_type)[source]

Function to return C type for Border Type.

static to_python_type(border_type)[source]

Function to return Python type for Border Type.