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

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


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

  idx = omm.op_counter["Split"]
  omm.op_counter["Split"] += 1
  node = onnx.helper.make_node("Split",
                               _inputs, [f"_t_Split_{idx}_{i}" for i in range(len(kwargs["split"]))],
                               name=f"Split_{idx}",
                               **kwargs)
  onnx.checker.check_node(node, omm.ctx)
  omm.model.graph.node.append(node)
  return node


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

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


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

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


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

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