Class Fill
Defined in File transforms.h
Inheritance Relationships
Base Type
public mindspore::dataset::TensorTransform
(Class TensorTransform)
Class Documentation
-
class Fill : public mindspore::dataset::TensorTransform
Fill all elements in the tensor with the specified value. The output tensor will have the same shape and type as the input tensor.
Public Functions
-
explicit Fill(const MSTensor &fill_value)
Constructor.
- Parameters
fill_value – [in] Scalar value to fill the tensor with. It can only be MSTensor of the following types from mindspore::DataType: String, Bool, Int8/16/32/64, UInt8/16/32/64, Float16/32/64.
样例/* Define operations */ mindspore::MSTensor tensor; auto fill_op = transforms::Fill(tensor); /* dataset is an instance of Dataset object */ dataset = dataset->Map({fill_op}, // operations {"column"}); // input columns
-
~Fill() = default
Destructor.
-
explicit Fill(const MSTensor &fill_value)