Пример #1
0
 def args_check(cls, node, **kwargs):
   if node.op_type == "SplitV":
     if node.inputs[2] not in kwargs["consts"]:
       exception.CONST_NOT_FOUND_EXCEPT(node.inputs[2], node.op_type)
   if node.op_type == "Split":
     if node.inputs[0] not in kwargs["consts"]:
       exception.CONST_NOT_FOUND_EXCEPT(node.inputs[0], node.op_type)
Пример #2
0
 def args_check(cls, node, **kwargs):
   if node.inputs[1] not in kwargs["consts"]:
     exception.CONST_NOT_FOUND_EXCEPT(node.inputs[1], node.op_type)
   supported_modes = ["constant", "reflect"]
   mode = node.attr.get("mode", "constant")
   if mode.lower() not in supported_modes:
     raise RuntimeError(
         "Mode {} of Pad is not supported in ONNX.".format(mode))
Пример #3
0
 def args_check(cls, node, **kwargs):
     if node.inputs[3] not in kwargs["consts"]:
         exception.CONST_NOT_FOUND_EXCEPT(node.inputs[3], node.op_type)
Пример #4
0
 def args_check(cls, node, **kwargs):
   if cls.SINCE_VERSION == 2:
     if node.inputs[1] not in kwargs["consts"]:
       exception.CONST_NOT_FOUND_EXCEPT(node.inputs[1], node.op_type)
   if node.inputs[2] not in kwargs["consts"]:
     exception.CONST_NOT_FOUND_EXCEPT(node.inputs[2], node.op_type)