Class ToVectors

Inheritance Relationships

Base Type

Class Documentation

class ToVectors : public mindspore::dataset::TensorTransform

Look up a token into an vector according to the input Vectors table.

Public Functions

explicit ToVectors(const std::shared_ptr<Vectors> &vectors, const std::vector<float> &unk_init = {}, bool lower_case_backup = false)

Constructor.

参数
  • vectors[in] A Vectors object.

  • unk_init[in] In case of the token is out-of-vectors (OOV), the result will be initialized with unk_init. (default={}, means to initialize with zero vectors).

  • lower_case_backup[in] Whether to look up the token in the lower case (default=false).

~ToVectors() = default

Destructor.