Class PadEnd
Defined in File transforms.h
Inheritance Relationships
Base Type
public mindspore::dataset::TensorTransform
(Class TensorTransform)
Class Documentation
-
class PadEnd : public mindspore::dataset::TensorTransform
Pad input tensor according to pad_shape.
Public Functions
-
explicit PadEnd(const std::vector<dsize_t> &pad_shape, const MSTensor &pad_value = {})
Constructor.
- 参数
pad_shape – [in] List of integers representing the shape needed, need to have same rank with input tensor. Dimensions that set to
-1
will not be padded (i.e., original dim will be used). Shorter dimensions will truncate the values.pad_value – [in] Value used to pad (default={}).
样例/* Define operations */ mindspore::MSTensor constant; auto pad_end_op = transforms::PadEnd({224, 224, 1}, {constant}); /* dataset is an instance of Dataset object */ dataset = dataset->Map({pad_end_op}, // operations {"column"}); // input columns
-
~PadEnd() = default
Destructor.
-
explicit PadEnd(const std::vector<dsize_t> &pad_shape, const MSTensor &pad_value = {})