Class LSTM

Inheritance Relationships

Base Type

  • public mindspore::ops::BaseOperator

Class Documentation

class LSTM : public mindspore::ops::BaseOperator

Performs the Long Short-Term Memory (LSTM) on the input. Refer to Python API mindspore.ops.LSTM for more details.

Public Functions

inline LSTM()

Constructor.

void Init(const int64_t input_size, const int64_t hidden_size, const int64_t num_layers, const bool has_bias, const float dropout, const bool bidirectional = false, const float zoneout_cell = 0.0f, const float zoneout_hidden = 0.0f)

Init. Refer to the parameters of Python API mindspore.ops.LSTM for the inputs.

void set_input_size(const int64_t input_size)

Set input_size.

int64_t get_input_size() const

Get input_size.

Returns

input_size.

void set_hidden_size(const int64_t hidden_size)

Set hidden_size.

int64_t get_hidden_size() const

Get hidden_size.

Returns

hidden_size.

void set_num_layers(const int64_t num_layers)

Set num_layers.

int64_t get_num_layers() const

Get num_layers.

Returns

num_layers.

void set_has_bias(const bool has_bias)

Set has_bias.

bool get_has_bias() const

Get has_bias.

Returns

has_bias.

void set_dropout(const float dropout)

Set dropout.

float get_dropout() const

Get dropout.

Returns

dropout.

void set_bidirectional(const bool bidirectional)

Set bidirectional.

bool get_bidirectional() const

Get bidirectional.

Returns

bidirectional.

void set_num_directions(const int64_t num_directions)

Set num_directions.

int64_t get_num_directions() const

Get num_directions.

Returns

num_directions.

void set_zoneout_cell(float zoneout_cell)

Set zoneout_cell.

float get_zoneout_cell() const

Get zoneout_cell.

Returns

zoneout_cell.

void set_zoneout_hidden(float zoneout_hidden)

Set zoneout_hidden.

float get_zoneout_hidden() const

Get zoneout_hidden.

Returns

zoneout_hidden.

int64_t get_good_ld(const int64_t dim, const int64_t type_size)

Get good_ld.

Returns

good_ld.