# Autogenerated by onnx-model-maker. Don't modify it manually.

import onnx
import onnx.helper
import onnx.numpy_helper
from onnx_model_maker import omm
from onnx_model_maker import onnx_mm_export
from onnx_model_maker.ops.op_helper import _add_input


@onnx_mm_export("v3.GRU")
def GRU(X, W, R, B=None, sequence_lens=None, initial_h=None, **kwargs):
  _inputs = []
  for i in (X, W, R, B, sequence_lens, initial_h):
    _add_input(i, _inputs)

  idx = omm.op_counter["GRU"]
  omm.op_counter["GRU"] += 1
  node = onnx.helper.make_node("GRU",
                               _inputs, [f"_t_GRU_{idx}"],
                               name=f"GRU_{idx}",
                               **kwargs)
  onnx.checker.check_node(node, omm.ctx)
  omm.model.graph.node.append(node)
  return node
