# 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("v14.HardSwish")
def HardSwish(X, **kwargs):
  _inputs = []
  for i in (X, ):
    _add_input(i, _inputs)

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


@onnx_mm_export("v14.CumSum")
def CumSum(x, axis, **kwargs):
  _inputs = []
  for i in (x, axis):
    _add_input(i, _inputs)

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


@onnx_mm_export("v14.Trilu")
def Trilu(input, k=None, **kwargs):
  _inputs = []
  for i in (input, k):
    _add_input(i, _inputs)

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


@onnx_mm_export("v14.Sub")
def Sub(A, B, **kwargs):
  _inputs = []
  for i in (A, B):
    _add_input(i, _inputs)

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


@onnx_mm_export("v14.Relu")
def Relu(X, **kwargs):
  _inputs = []
  for i in (X, ):
    _add_input(i, _inputs)

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


@onnx_mm_export("v14.Mul")
def Mul(A, B, **kwargs):
  _inputs = []
  for i in (A, B):
    _add_input(i, _inputs)

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


@onnx_mm_export("v14.RNN")
def RNN(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["RNN"]
  omm.op_counter["RNN"] += 1
  node = onnx.helper.make_node("RNN",
                               _inputs, [f"_t_RNN_{idx}"],
                               name=f"RNN_{idx}",
                               **kwargs)
  onnx.checker.check_node(node, omm.ctx)
  omm.model.graph.node.append(node)
  return node


@onnx_mm_export("v14.Reshape")
def Reshape(data, shape, **kwargs):
  _inputs = []
  for i in (data, shape):
    _add_input(i, _inputs)

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


@onnx_mm_export("v14.BatchNormalization")
def BatchNormalization(X, scale, B, input_mean, input_var, **kwargs):
  _inputs = []
  for i in (X, scale, B, input_mean, input_var):
    _add_input(i, _inputs)

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


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

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


@onnx_mm_export("v14.Identity")
def Identity(input, **kwargs):
  _inputs = []
  for i in (input, ):
    _add_input(i, _inputs)

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


@onnx_mm_export("v14.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


@onnx_mm_export("v14.Add")
def Add(A, B, **kwargs):
  _inputs = []
  for i in (A, B):
    _add_input(i, _inputs)

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


@onnx_mm_export("v14.Div")
def Div(A, B, **kwargs):
  _inputs = []
  for i in (A, B):
    _add_input(i, _inputs)

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