Program Listing for File gru.h
↰ Return to documentation for file (include/converter/include/ops/gru.h
)
#ifndef MINDSPORE_CORE_OPS_GRU_H_
#define MINDSPORE_CORE_OPS_GRU_H_
#include <algorithm>
#include <map>
#include <memory>
#include <string>
#include <vector>
#include "mindapi/base/types.h"
#include "ops/base_operator.h"
namespace mindspore {
namespace ops {
constexpr auto kNameGRU = "GRU";
class MIND_API GRU : public BaseOperator {
public:
MIND_API_BASE_MEMBER(GRU);
GRU() : BaseOperator(kNameGRU) {
InitIOName({"x", "weight_input", "weight_hidden", "bias_input", "bias_hidden", "seq_length", "init_h"},
{"output", "output_h", "update", "reset", "new", "hidden_new"});
}
void Init(bool bidirectional = false);
void set_bidirectional(bool bidirectional);
bool get_bidirectional() const;
};
} // namespace ops
} // namespace mindspore
#endif // MINDSPORE_CORE_OPS_GRU_H_