Class LSTM
Defined in File lstm.h
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.
- 返回
input_size.
Set hidden_size.
Get hidden_size.
- 返回
hidden_size.
-
void set_num_layers(const int64_t num_layers)
Set num_layers.
-
int64_t get_num_layers() const
Get num_layers.
- 返回
num_layers.
-
void set_has_bias(const bool has_bias)
Set has_bias.
-
bool get_has_bias() const
Get has_bias.
- 返回
has_bias.
-
void set_dropout(const float dropout)
Set dropout.
-
float get_dropout() const
Get dropout.
- 返回
dropout.
-
void set_bidirectional(const bool bidirectional)
Set bidirectional.
-
bool get_bidirectional() const
Get bidirectional.
- 返回
bidirectional.
-
void set_num_directions(const int64_t num_directions)
Set num_directions.
-
int64_t get_num_directions() const
Get num_directions.
- 返回
num_directions.
-
void set_zoneout_cell(float zoneout_cell)
Set zoneout_cell.
-
float get_zoneout_cell() const
Get zoneout_cell.
- 返回
zoneout_cell.
Set zoneout_hidden.
Get zoneout_hidden.
- 返回
zoneout_hidden.
-
int64_t get_good_ld(const int64_t dim, const int64_t type_size)
Get good_ld.
- 返回
good_ld.
-
inline LSTM()