Class Unique

Inheritance Relationships

Base Type

Class Documentation

class Unique : public mindspore::dataset::TensorTransform

Return an output tensor that contains all the unique elements of the input tensor in the same order as they appear in the input tensor.

Public Functions

Unique()

Constructor.

Example
/* Define operations */
auto unique_op = transforms::Unique();

/* dataset is an instance of Dataset object */
dataset = dataset->Map({unique_op},      // operations
                       {"column"});      // input columns

~Unique() = default

Destructor.