1 /*
    2  * Copyright (c) 2025, Oracle and/or its affiliates. All rights reserved.
    3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
    4  *
    5  * This code is free software; you can redistribute it and/or modify it
    6  * under the terms of the GNU General Public License version 2 only, as
    7  * published by the Free Software Foundation.  Oracle designates this
    8  * particular file as subject to the "Classpath" exception as provided
    9  * by Oracle in the LICENSE file that accompanied this code.
   10  *
   11  * This code is distributed in the hope that it will be useful, but WITHOUT
   12  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
   13  * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
   14  * version 2 for more details (a copy is included in the LICENSE file that
   15  * accompanied this code).
   16  *
   17  * You should have received a copy of the GNU General Public License version
   18  * 2 along with this work; if not, write to the Free Software Foundation,
   19  * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
   20  *
   21  * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
   22  * or visit www.oracle.com if you need additional information or have any
   23  * questions.
   24  */
   25 // Auto-generated from ONNX op schema
   26 
   27 package oracle.code.onnx.ir;
   28 
   29 import jdk.incubator.code.*;
   30 import jdk.incubator.code.op.OpFactory;
   31 
   32 import java.util.*;
   33 
   34 @SuppressWarnings({"OptionalUsedAsFieldOrParameterType", "unused", "SequencedCollectionMethodCanBeUsed"})
   35 public final class OnnxOps {
   36 
   37     private OnnxOps() {}
   38 
   39     @OpFactory.OpDeclaration(Abs.NAME)
   40     public static final class Abs extends OnnxOp {
   41         public static final String NAME = "Abs";
   42 
   43         public enum Attribute implements OnnxAttribute.None { }
   44 
   45         public enum TypeConstraint implements OnnxTypeConstraint {
   46             T(new OnnxType.TypeVariable("T", List.of(OnnxType.tensor(OnnxType.uint8()), OnnxType.tensor(OnnxType.uint16()), OnnxType.tensor(OnnxType.uint32()), OnnxType.tensor(OnnxType.uint64()), OnnxType.tensor(OnnxType.int8()), OnnxType.tensor(OnnxType.int16()), OnnxType.tensor(OnnxType.int32()), OnnxType.tensor(OnnxType.int64()), OnnxType.tensor(OnnxType.float16()), OnnxType.tensor(OnnxType.float32()), OnnxType.tensor(OnnxType.float64()), OnnxType.tensor(OnnxType.bfloat16())))),
   47             ;
   48 
   49             final OnnxType.TypeVariable typeVariable;
   50 
   51             TypeConstraint(OnnxType.TypeVariable typeVariable) {
   52                 assert typeVariable.name().equals(name());
   53                 this.typeVariable = typeVariable;
   54             }
   55 
   56             @Override
   57             public OnnxType.TypeVariable typeVariable() {
   58                 return typeVariable;
   59             }
   60         }
   61 
   62         public enum InputParameter implements OnnxParameter {
   63             X(TypeConstraint.T.typeVariable(), Quantifier.REQUIRED),
   64             ;
   65 
   66             final OnnxType type;
   67             final Quantifier quantifier;
   68 
   69             InputParameter(OnnxType type, Quantifier quantifier) {
   70                 this.type = type;
   71                 this.quantifier = quantifier;
   72             }
   73 
   74             @Override
   75             public OnnxType type() {
   76                 return type;
   77             }
   78 
   79             @Override
   80             public Quantifier quantifier() {
   81                 return quantifier;
   82             }
   83         }
   84 
   85         public enum OutputParameter implements OnnxParameter {
   86             Y(TypeConstraint.T.typeVariable(), Quantifier.REQUIRED),
   87             ;
   88 
   89             final OnnxType type;
   90             final Quantifier quantifier;
   91 
   92             OutputParameter(OnnxType type, Quantifier quantifier) {
   93                 this.type = type;
   94                 this.quantifier = quantifier;
   95             }
   96 
   97             @Override
   98             public OnnxType type() {
   99                 return type;
  100             }
  101 
  102             @Override
  103             public Quantifier quantifier() {
  104                 return quantifier;
  105             }
  106         }
  107 
  108         public static final OnnxSchema SCHEMA = new OnnxSchemaRecord(
  109                 NAME,
  110                 List.of(Attribute.values()),
  111                 List.of(TypeConstraint.values()),
  112                 List.of(InputParameter.values()),
  113                 List.of(OutputParameter.values())
  114         );
  115 
  116         public Abs(ExternalizedOp def) {
  117             super(SCHEMA, def);
  118         }
  119 
  120         Abs(Abs that, CopyContext cc) {
  121             super(that, cc);
  122         }
  123 
  124         @Override
  125         public Abs transform(CopyContext cc, OpTransformer ot) {
  126             return new Abs(this, cc);
  127         }
  128 
  129         Abs(TypeElement resultType, Value X) {
  130             super(SCHEMA, resultType, Set.of(), List.of(X), List.of());
  131         }
  132 
  133         @Override
  134         public SequencedSet<OnnxParameter> onnxOutputs() {
  135             return onnxOutputs(SCHEMA);
  136         }
  137 
  138         @Override
  139         public SequencedMap<OnnxParameter, Object> onnxInputs() {
  140             return onnxInputs(SCHEMA, List.of(X()));
  141         }
  142 
  143         public Value X() {
  144             return operands().get(0);
  145         }
  146 
  147     }
  148 
  149     public static Abs Abs(TypeElement resultType, Value X) {
  150         return new Abs(resultType, X);
  151     }
  152 
  153     @OpFactory.OpDeclaration(Acos.NAME)
  154     public static final class Acos extends OnnxOp {
  155         public static final String NAME = "Acos";
  156 
  157         public enum Attribute implements OnnxAttribute.None { }
  158 
  159         public enum TypeConstraint implements OnnxTypeConstraint {
  160             T(new OnnxType.TypeVariable("T", List.of(OnnxType.tensor(OnnxType.bfloat16()), OnnxType.tensor(OnnxType.float16()), OnnxType.tensor(OnnxType.float32()), OnnxType.tensor(OnnxType.float64())))),
  161             ;
  162 
  163             final OnnxType.TypeVariable typeVariable;
  164 
  165             TypeConstraint(OnnxType.TypeVariable typeVariable) {
  166                 assert typeVariable.name().equals(name());
  167                 this.typeVariable = typeVariable;
  168             }
  169 
  170             @Override
  171             public OnnxType.TypeVariable typeVariable() {
  172                 return typeVariable;
  173             }
  174         }
  175 
  176         public enum InputParameter implements OnnxParameter {
  177             input(TypeConstraint.T.typeVariable(), Quantifier.REQUIRED),
  178             ;
  179 
  180             final OnnxType type;
  181             final Quantifier quantifier;
  182 
  183             InputParameter(OnnxType type, Quantifier quantifier) {
  184                 this.type = type;
  185                 this.quantifier = quantifier;
  186             }
  187 
  188             @Override
  189             public OnnxType type() {
  190                 return type;
  191             }
  192 
  193             @Override
  194             public Quantifier quantifier() {
  195                 return quantifier;
  196             }
  197         }
  198 
  199         public enum OutputParameter implements OnnxParameter {
  200             output(TypeConstraint.T.typeVariable(), Quantifier.REQUIRED),
  201             ;
  202 
  203             final OnnxType type;
  204             final Quantifier quantifier;
  205 
  206             OutputParameter(OnnxType type, Quantifier quantifier) {
  207                 this.type = type;
  208                 this.quantifier = quantifier;
  209             }
  210 
  211             @Override
  212             public OnnxType type() {
  213                 return type;
  214             }
  215 
  216             @Override
  217             public Quantifier quantifier() {
  218                 return quantifier;
  219             }
  220         }
  221 
  222         public static final OnnxSchema SCHEMA = new OnnxSchemaRecord(
  223                 NAME,
  224                 List.of(Attribute.values()),
  225                 List.of(TypeConstraint.values()),
  226                 List.of(InputParameter.values()),
  227                 List.of(OutputParameter.values())
  228         );
  229 
  230         public Acos(ExternalizedOp def) {
  231             super(SCHEMA, def);
  232         }
  233 
  234         Acos(Acos that, CopyContext cc) {
  235             super(that, cc);
  236         }
  237 
  238         @Override
  239         public Acos transform(CopyContext cc, OpTransformer ot) {
  240             return new Acos(this, cc);
  241         }
  242 
  243         Acos(TypeElement resultType, Value input) {
  244             super(SCHEMA, resultType, Set.of(), List.of(input), List.of());
  245         }
  246 
  247         @Override
  248         public SequencedSet<OnnxParameter> onnxOutputs() {
  249             return onnxOutputs(SCHEMA);
  250         }
  251 
  252         @Override
  253         public SequencedMap<OnnxParameter, Object> onnxInputs() {
  254             return onnxInputs(SCHEMA, List.of(input()));
  255         }
  256 
  257         public Value input() {
  258             return operands().get(0);
  259         }
  260 
  261     }
  262 
  263     public static Acos Acos(TypeElement resultType, Value input) {
  264         return new Acos(resultType, input);
  265     }
  266 
  267     @OpFactory.OpDeclaration(Acosh.NAME)
  268     public static final class Acosh extends OnnxOp {
  269         public static final String NAME = "Acosh";
  270 
  271         public enum Attribute implements OnnxAttribute.None { }
  272 
  273         public enum TypeConstraint implements OnnxTypeConstraint {
  274             T(new OnnxType.TypeVariable("T", List.of(OnnxType.tensor(OnnxType.bfloat16()), OnnxType.tensor(OnnxType.float16()), OnnxType.tensor(OnnxType.float32()), OnnxType.tensor(OnnxType.float64())))),
  275             ;
  276 
  277             final OnnxType.TypeVariable typeVariable;
  278 
  279             TypeConstraint(OnnxType.TypeVariable typeVariable) {
  280                 assert typeVariable.name().equals(name());
  281                 this.typeVariable = typeVariable;
  282             }
  283 
  284             @Override
  285             public OnnxType.TypeVariable typeVariable() {
  286                 return typeVariable;
  287             }
  288         }
  289 
  290         public enum InputParameter implements OnnxParameter {
  291             input(TypeConstraint.T.typeVariable(), Quantifier.REQUIRED),
  292             ;
  293 
  294             final OnnxType type;
  295             final Quantifier quantifier;
  296 
  297             InputParameter(OnnxType type, Quantifier quantifier) {
  298                 this.type = type;
  299                 this.quantifier = quantifier;
  300             }
  301 
  302             @Override
  303             public OnnxType type() {
  304                 return type;
  305             }
  306 
  307             @Override
  308             public Quantifier quantifier() {
  309                 return quantifier;
  310             }
  311         }
  312 
  313         public enum OutputParameter implements OnnxParameter {
  314             output(TypeConstraint.T.typeVariable(), Quantifier.REQUIRED),
  315             ;
  316 
  317             final OnnxType type;
  318             final Quantifier quantifier;
  319 
  320             OutputParameter(OnnxType type, Quantifier quantifier) {
  321                 this.type = type;
  322                 this.quantifier = quantifier;
  323             }
  324 
  325             @Override
  326             public OnnxType type() {
  327                 return type;
  328             }
  329 
  330             @Override
  331             public Quantifier quantifier() {
  332                 return quantifier;
  333             }
  334         }
  335 
  336         public static final OnnxSchema SCHEMA = new OnnxSchemaRecord(
  337                 NAME,
  338                 List.of(Attribute.values()),
  339                 List.of(TypeConstraint.values()),
  340                 List.of(InputParameter.values()),
  341                 List.of(OutputParameter.values())
  342         );
  343 
  344         public Acosh(ExternalizedOp def) {
  345             super(SCHEMA, def);
  346         }
  347 
  348         Acosh(Acosh that, CopyContext cc) {
  349             super(that, cc);
  350         }
  351 
  352         @Override
  353         public Acosh transform(CopyContext cc, OpTransformer ot) {
  354             return new Acosh(this, cc);
  355         }
  356 
  357         Acosh(TypeElement resultType, Value input) {
  358             super(SCHEMA, resultType, Set.of(), List.of(input), List.of());
  359         }
  360 
  361         @Override
  362         public SequencedSet<OnnxParameter> onnxOutputs() {
  363             return onnxOutputs(SCHEMA);
  364         }
  365 
  366         @Override
  367         public SequencedMap<OnnxParameter, Object> onnxInputs() {
  368             return onnxInputs(SCHEMA, List.of(input()));
  369         }
  370 
  371         public Value input() {
  372             return operands().get(0);
  373         }
  374 
  375     }
  376 
  377     public static Acosh Acosh(TypeElement resultType, Value input) {
  378         return new Acosh(resultType, input);
  379     }
  380 
  381     @OpFactory.OpDeclaration(Adagrad.NAME)
  382     public static final class Adagrad extends OnnxOp {
  383         public static final String NAME = "Adagrad";
  384 
  385         public enum Attribute implements OnnxAttribute {
  386             epsilon(Float.class, true, 1.0E-6f),
  387             decay_factor(Float.class, true, 0.0f),
  388             norm_coefficient(Float.class, true, 0.0f),
  389             ;
  390 
  391                 final Class<?> t;
  392                 final boolean optional;
  393                 final Object defaultValue;
  394 
  395                 Attribute(Class<?> type, boolean optional, Object defaultValue) {
  396                     this.t = type;
  397                     this.optional = optional;
  398                     this.defaultValue = defaultValue;
  399                     assert optional || defaultValue == null;
  400                 }
  401 
  402                 public Class<?> type() {
  403                     return t;
  404                 }
  405 
  406                 public boolean isOptional() {
  407                     return optional;
  408                 }
  409 
  410                 public Object defaultValue() {
  411                     return defaultValue;
  412                 }
  413         }
  414 
  415         public enum TypeConstraint implements OnnxTypeConstraint {
  416             T1(new OnnxType.TypeVariable("T1", List.of(OnnxType.tensor(OnnxType.float32()), OnnxType.tensor(OnnxType.float64())))),
  417             T2(new OnnxType.TypeVariable("T2", List.of(OnnxType.tensor(OnnxType.int64())))),
  418             T3(new OnnxType.TypeVariable("T3", List.of(OnnxType.tensor(OnnxType.float32()), OnnxType.tensor(OnnxType.float64())))),
  419             ;
  420 
  421             final OnnxType.TypeVariable typeVariable;
  422 
  423             TypeConstraint(OnnxType.TypeVariable typeVariable) {
  424                 assert typeVariable.name().equals(name());
  425                 this.typeVariable = typeVariable;
  426             }
  427 
  428             @Override
  429             public OnnxType.TypeVariable typeVariable() {
  430                 return typeVariable;
  431             }
  432         }
  433 
  434         public enum InputParameter implements OnnxParameter {
  435             R(TypeConstraint.T1.typeVariable(), Quantifier.REQUIRED),
  436             T(TypeConstraint.T2.typeVariable(), Quantifier.REQUIRED),
  437             inputs(TypeConstraint.T3.typeVariable(), Quantifier.VARIADIC),
  438             ;
  439 
  440             final OnnxType type;
  441             final Quantifier quantifier;
  442 
  443             InputParameter(OnnxType type, Quantifier quantifier) {
  444                 this.type = type;
  445                 this.quantifier = quantifier;
  446             }
  447 
  448             @Override
  449             public OnnxType type() {
  450                 return type;
  451             }
  452 
  453             @Override
  454             public Quantifier quantifier() {
  455                 return quantifier;
  456             }
  457         }
  458 
  459         public enum OutputParameter implements OnnxParameter {
  460             outputs(TypeConstraint.T3.typeVariable(), Quantifier.VARIADIC),
  461             ;
  462 
  463             final OnnxType type;
  464             final Quantifier quantifier;
  465 
  466             OutputParameter(OnnxType type, Quantifier quantifier) {
  467                 this.type = type;
  468                 this.quantifier = quantifier;
  469             }
  470 
  471             @Override
  472             public OnnxType type() {
  473                 return type;
  474             }
  475 
  476             @Override
  477             public Quantifier quantifier() {
  478                 return quantifier;
  479             }
  480         }
  481 
  482         public static final OnnxSchema SCHEMA = new OnnxSchemaRecord(
  483                 NAME,
  484                 List.of(Attribute.values()),
  485                 List.of(TypeConstraint.values()),
  486                 List.of(InputParameter.values()),
  487                 List.of(OutputParameter.values())
  488         );
  489 
  490         public Adagrad(ExternalizedOp def) {
  491             super(SCHEMA, def);
  492         }
  493 
  494         Adagrad(Adagrad that, CopyContext cc) {
  495             super(that, cc);
  496         }
  497 
  498         @Override
  499         public Adagrad transform(CopyContext cc, OpTransformer ot) {
  500             return new Adagrad(this, cc);
  501         }
  502 
  503         Adagrad(TypeElement resultType, Value R, Value T, List<Value> inputs, java.util.Optional<Float> epsilon, java.util.Optional<Float> decay_factor, java.util.Optional<Float> norm_coefficient) {
  504             super(SCHEMA, resultType, Set.of(), List.of(R, T, inputs), List.of(epsilon, decay_factor, norm_coefficient));
  505         }
  506 
  507         @Override
  508         public SequencedSet<OnnxParameter> onnxOutputs() {
  509             return onnxOutputs(SCHEMA);
  510         }
  511 
  512         @Override
  513         public SequencedMap<OnnxParameter, Object> onnxInputs() {
  514             return onnxInputs(SCHEMA, List.of(R(), T(), inputs()));
  515         }
  516 
  517         public Value R() {
  518             return operands().get(0);
  519         }
  520 
  521         public Value T() {
  522             return operands().get(1);
  523         }
  524 
  525         public List<Value> inputs() {
  526             return operands().subList(2, operands().size());
  527         }
  528 
  529         public java.util.Optional<Float> epsilon() {
  530             Float epsilon = Attribute.epsilon.access(Float.class, onnxAttributes);
  531             return java.util.Optional.ofNullable(epsilon);
  532         }
  533 
  534         public java.util.Optional<Float> decay_factor() {
  535             Float decay_factor = Attribute.decay_factor.access(Float.class, onnxAttributes);
  536             return java.util.Optional.ofNullable(decay_factor);
  537         }
  538 
  539         public java.util.Optional<Float> norm_coefficient() {
  540             Float norm_coefficient = Attribute.norm_coefficient.access(Float.class, onnxAttributes);
  541             return java.util.Optional.ofNullable(norm_coefficient);
  542         }
  543 
  544     }
  545 
  546     public static Adagrad Adagrad(TypeElement resultType, Value R, Value T, List<Value> inputs, java.util.Optional<Float> epsilon, java.util.Optional<Float> decay_factor, java.util.Optional<Float> norm_coefficient) {
  547         return new Adagrad(resultType, R, T, inputs, epsilon, decay_factor, norm_coefficient);
  548     }
  549 
  550     @OpFactory.OpDeclaration(Adam.NAME)
  551     public static final class Adam extends OnnxOp {
  552         public static final String NAME = "Adam";
  553 
  554         public enum Attribute implements OnnxAttribute {
  555             epsilon(Float.class, true, 1.0E-6f),
  556             norm_coefficient_post(Float.class, true, 0.0f),
  557             norm_coefficient(Float.class, true, 0.0f),
  558             alpha(Float.class, true, 0.9f),
  559             beta(Float.class, true, 0.999f),
  560             ;
  561 
  562                 final Class<?> t;
  563                 final boolean optional;
  564                 final Object defaultValue;
  565 
  566                 Attribute(Class<?> type, boolean optional, Object defaultValue) {
  567                     this.t = type;
  568                     this.optional = optional;
  569                     this.defaultValue = defaultValue;
  570                     assert optional || defaultValue == null;
  571                 }
  572 
  573                 public Class<?> type() {
  574                     return t;
  575                 }
  576 
  577                 public boolean isOptional() {
  578                     return optional;
  579                 }
  580 
  581                 public Object defaultValue() {
  582                     return defaultValue;
  583                 }
  584         }
  585 
  586         public enum TypeConstraint implements OnnxTypeConstraint {
  587             T1(new OnnxType.TypeVariable("T1", List.of(OnnxType.tensor(OnnxType.float32()), OnnxType.tensor(OnnxType.float64())))),
  588             T2(new OnnxType.TypeVariable("T2", List.of(OnnxType.tensor(OnnxType.int64())))),
  589             T3(new OnnxType.TypeVariable("T3", List.of(OnnxType.tensor(OnnxType.float32()), OnnxType.tensor(OnnxType.float64())))),
  590             ;
  591 
  592             final OnnxType.TypeVariable typeVariable;
  593 
  594             TypeConstraint(OnnxType.TypeVariable typeVariable) {
  595                 assert typeVariable.name().equals(name());
  596                 this.typeVariable = typeVariable;
  597             }
  598 
  599             @Override
  600             public OnnxType.TypeVariable typeVariable() {
  601                 return typeVariable;
  602             }
  603         }
  604 
  605         public enum InputParameter implements OnnxParameter {
  606             R(TypeConstraint.T1.typeVariable(), Quantifier.REQUIRED),
  607             T(TypeConstraint.T2.typeVariable(), Quantifier.REQUIRED),
  608             inputs(TypeConstraint.T3.typeVariable(), Quantifier.VARIADIC),
  609             ;
  610 
  611             final OnnxType type;
  612             final Quantifier quantifier;
  613 
  614             InputParameter(OnnxType type, Quantifier quantifier) {
  615                 this.type = type;
  616                 this.quantifier = quantifier;
  617             }
  618 
  619             @Override
  620             public OnnxType type() {
  621                 return type;
  622             }
  623 
  624             @Override
  625             public Quantifier quantifier() {
  626                 return quantifier;
  627             }
  628         }
  629 
  630         public enum OutputParameter implements OnnxParameter {
  631             outputs(TypeConstraint.T3.typeVariable(), Quantifier.VARIADIC),
  632             ;
  633 
  634             final OnnxType type;
  635             final Quantifier quantifier;
  636 
  637             OutputParameter(OnnxType type, Quantifier quantifier) {
  638                 this.type = type;
  639                 this.quantifier = quantifier;
  640             }
  641 
  642             @Override
  643             public OnnxType type() {
  644                 return type;
  645             }
  646 
  647             @Override
  648             public Quantifier quantifier() {
  649                 return quantifier;
  650             }
  651         }
  652 
  653         public static final OnnxSchema SCHEMA = new OnnxSchemaRecord(
  654                 NAME,
  655                 List.of(Attribute.values()),
  656                 List.of(TypeConstraint.values()),
  657                 List.of(InputParameter.values()),
  658                 List.of(OutputParameter.values())
  659         );
  660 
  661         public Adam(ExternalizedOp def) {
  662             super(SCHEMA, def);
  663         }
  664 
  665         Adam(Adam that, CopyContext cc) {
  666             super(that, cc);
  667         }
  668 
  669         @Override
  670         public Adam transform(CopyContext cc, OpTransformer ot) {
  671             return new Adam(this, cc);
  672         }
  673 
  674         Adam(TypeElement resultType, Value R, Value T, List<Value> inputs, java.util.Optional<Float> epsilon, java.util.Optional<Float> norm_coefficient_post, java.util.Optional<Float> norm_coefficient, java.util.Optional<Float> alpha, java.util.Optional<Float> beta) {
  675             super(SCHEMA, resultType, Set.of(), List.of(R, T, inputs), List.of(epsilon, norm_coefficient_post, norm_coefficient, alpha, beta));
  676         }
  677 
  678         @Override
  679         public SequencedSet<OnnxParameter> onnxOutputs() {
  680             return onnxOutputs(SCHEMA);
  681         }
  682 
  683         @Override
  684         public SequencedMap<OnnxParameter, Object> onnxInputs() {
  685             return onnxInputs(SCHEMA, List.of(R(), T(), inputs()));
  686         }
  687 
  688         public Value R() {
  689             return operands().get(0);
  690         }
  691 
  692         public Value T() {
  693             return operands().get(1);
  694         }
  695 
  696         public List<Value> inputs() {
  697             return operands().subList(2, operands().size());
  698         }
  699 
  700         public java.util.Optional<Float> epsilon() {
  701             Float epsilon = Attribute.epsilon.access(Float.class, onnxAttributes);
  702             return java.util.Optional.ofNullable(epsilon);
  703         }
  704 
  705         public java.util.Optional<Float> norm_coefficient_post() {
  706             Float norm_coefficient_post = Attribute.norm_coefficient_post.access(Float.class, onnxAttributes);
  707             return java.util.Optional.ofNullable(norm_coefficient_post);
  708         }
  709 
  710         public java.util.Optional<Float> norm_coefficient() {
  711             Float norm_coefficient = Attribute.norm_coefficient.access(Float.class, onnxAttributes);
  712             return java.util.Optional.ofNullable(norm_coefficient);
  713         }
  714 
  715         public java.util.Optional<Float> alpha() {
  716             Float alpha = Attribute.alpha.access(Float.class, onnxAttributes);
  717             return java.util.Optional.ofNullable(alpha);
  718         }
  719 
  720         public java.util.Optional<Float> beta() {
  721             Float beta = Attribute.beta.access(Float.class, onnxAttributes);
  722             return java.util.Optional.ofNullable(beta);
  723         }
  724 
  725     }
  726 
  727     public static Adam Adam(TypeElement resultType, Value R, Value T, List<Value> inputs, java.util.Optional<Float> epsilon, java.util.Optional<Float> norm_coefficient_post, java.util.Optional<Float> norm_coefficient, java.util.Optional<Float> alpha, java.util.Optional<Float> beta) {
  728         return new Adam(resultType, R, T, inputs, epsilon, norm_coefficient_post, norm_coefficient, alpha, beta);
  729     }
  730 
  731     @OpFactory.OpDeclaration(Add.NAME)
  732     public static final class Add extends OnnxOp {
  733         public static final String NAME = "Add";
  734 
  735         public enum Attribute implements OnnxAttribute.None { }
  736 
  737         public enum TypeConstraint implements OnnxTypeConstraint {
  738             T(new OnnxType.TypeVariable("T", List.of(OnnxType.tensor(OnnxType.uint8()), OnnxType.tensor(OnnxType.uint16()), OnnxType.tensor(OnnxType.uint32()), OnnxType.tensor(OnnxType.uint64()), OnnxType.tensor(OnnxType.int8()), OnnxType.tensor(OnnxType.int16()), OnnxType.tensor(OnnxType.int32()), OnnxType.tensor(OnnxType.int64()), OnnxType.tensor(OnnxType.float16()), OnnxType.tensor(OnnxType.float32()), OnnxType.tensor(OnnxType.float64()), OnnxType.tensor(OnnxType.bfloat16())))),
  739             ;
  740 
  741             final OnnxType.TypeVariable typeVariable;
  742 
  743             TypeConstraint(OnnxType.TypeVariable typeVariable) {
  744                 assert typeVariable.name().equals(name());
  745                 this.typeVariable = typeVariable;
  746             }
  747 
  748             @Override
  749             public OnnxType.TypeVariable typeVariable() {
  750                 return typeVariable;
  751             }
  752         }
  753 
  754         public enum InputParameter implements OnnxParameter {
  755             A(TypeConstraint.T.typeVariable(), Quantifier.REQUIRED),
  756             B(TypeConstraint.T.typeVariable(), Quantifier.REQUIRED),
  757             ;
  758 
  759             final OnnxType type;
  760             final Quantifier quantifier;
  761 
  762             InputParameter(OnnxType type, Quantifier quantifier) {
  763                 this.type = type;
  764                 this.quantifier = quantifier;
  765             }
  766 
  767             @Override
  768             public OnnxType type() {
  769                 return type;
  770             }
  771 
  772             @Override
  773             public Quantifier quantifier() {
  774                 return quantifier;
  775             }
  776         }
  777 
  778         public enum OutputParameter implements OnnxParameter {
  779             C(TypeConstraint.T.typeVariable(), Quantifier.REQUIRED),
  780             ;
  781 
  782             final OnnxType type;
  783             final Quantifier quantifier;
  784 
  785             OutputParameter(OnnxType type, Quantifier quantifier) {
  786                 this.type = type;
  787                 this.quantifier = quantifier;
  788             }
  789 
  790             @Override
  791             public OnnxType type() {
  792                 return type;
  793             }
  794 
  795             @Override
  796             public Quantifier quantifier() {
  797                 return quantifier;
  798             }
  799         }
  800 
  801         public static final OnnxSchema SCHEMA = new OnnxSchemaRecord(
  802                 NAME,
  803                 List.of(Attribute.values()),
  804                 List.of(TypeConstraint.values()),
  805                 List.of(InputParameter.values()),
  806                 List.of(OutputParameter.values())
  807         );
  808 
  809         public Add(ExternalizedOp def) {
  810             super(SCHEMA, def);
  811         }
  812 
  813         Add(Add that, CopyContext cc) {
  814             super(that, cc);
  815         }
  816 
  817         @Override
  818         public Add transform(CopyContext cc, OpTransformer ot) {
  819             return new Add(this, cc);
  820         }
  821 
  822         Add(TypeElement resultType, Value A, Value B) {
  823             super(SCHEMA, resultType, Set.of(), List.of(A, B), List.of());
  824         }
  825 
  826         @Override
  827         public SequencedSet<OnnxParameter> onnxOutputs() {
  828             return onnxOutputs(SCHEMA);
  829         }
  830 
  831         @Override
  832         public SequencedMap<OnnxParameter, Object> onnxInputs() {
  833             return onnxInputs(SCHEMA, List.of(A(), B()));
  834         }
  835 
  836         public Value A() {
  837             return operands().get(0);
  838         }
  839 
  840         public Value B() {
  841             return operands().get(1);
  842         }
  843 
  844     }
  845 
  846     public static Add Add(TypeElement resultType, Value A, Value B) {
  847         return new Add(resultType, A, B);
  848     }
  849 
  850     @OpFactory.OpDeclaration(AffineGrid.NAME)
  851     public static final class AffineGrid extends OnnxOp {
  852         public static final String NAME = "AffineGrid";
  853 
  854         public enum Attribute implements OnnxAttribute {
  855             align_corners(Integer.class, true, 0),
  856             ;
  857 
  858                 final Class<?> t;
  859                 final boolean optional;
  860                 final Object defaultValue;
  861 
  862                 Attribute(Class<?> type, boolean optional, Object defaultValue) {
  863                     this.t = type;
  864                     this.optional = optional;
  865                     this.defaultValue = defaultValue;
  866                     assert optional || defaultValue == null;
  867                 }
  868 
  869                 public Class<?> type() {
  870                     return t;
  871                 }
  872 
  873                 public boolean isOptional() {
  874                     return optional;
  875                 }
  876 
  877                 public Object defaultValue() {
  878                     return defaultValue;
  879                 }
  880         }
  881 
  882         public enum TypeConstraint implements OnnxTypeConstraint {
  883             T1(new OnnxType.TypeVariable("T1", List.of(OnnxType.tensor(OnnxType.bfloat16()), OnnxType.tensor(OnnxType.float16()), OnnxType.tensor(OnnxType.float32()), OnnxType.tensor(OnnxType.float64())))),
  884             T2(new OnnxType.TypeVariable("T2", List.of(OnnxType.tensor(OnnxType.int64())))),
  885             ;
  886 
  887             final OnnxType.TypeVariable typeVariable;
  888 
  889             TypeConstraint(OnnxType.TypeVariable typeVariable) {
  890                 assert typeVariable.name().equals(name());
  891                 this.typeVariable = typeVariable;
  892             }
  893 
  894             @Override
  895             public OnnxType.TypeVariable typeVariable() {
  896                 return typeVariable;
  897             }
  898         }
  899 
  900         public enum InputParameter implements OnnxParameter {
  901             theta(TypeConstraint.T1.typeVariable(), Quantifier.REQUIRED),
  902             size(TypeConstraint.T2.typeVariable(), Quantifier.REQUIRED),
  903             ;
  904 
  905             final OnnxType type;
  906             final Quantifier quantifier;
  907 
  908             InputParameter(OnnxType type, Quantifier quantifier) {
  909                 this.type = type;
  910                 this.quantifier = quantifier;
  911             }
  912 
  913             @Override
  914             public OnnxType type() {
  915                 return type;
  916             }
  917 
  918             @Override
  919             public Quantifier quantifier() {
  920                 return quantifier;
  921             }
  922         }
  923 
  924         public enum OutputParameter implements OnnxParameter {
  925             grid(TypeConstraint.T1.typeVariable(), Quantifier.REQUIRED),
  926             ;
  927 
  928             final OnnxType type;
  929             final Quantifier quantifier;
  930 
  931             OutputParameter(OnnxType type, Quantifier quantifier) {
  932                 this.type = type;
  933                 this.quantifier = quantifier;
  934             }
  935 
  936             @Override
  937             public OnnxType type() {
  938                 return type;
  939             }
  940 
  941             @Override
  942             public Quantifier quantifier() {
  943                 return quantifier;
  944             }
  945         }
  946 
  947         public static final OnnxSchema SCHEMA = new OnnxSchemaRecord(
  948                 NAME,
  949                 List.of(Attribute.values()),
  950                 List.of(TypeConstraint.values()),
  951                 List.of(InputParameter.values()),
  952                 List.of(OutputParameter.values())
  953         );
  954 
  955         public AffineGrid(ExternalizedOp def) {
  956             super(SCHEMA, def);
  957         }
  958 
  959         AffineGrid(AffineGrid that, CopyContext cc) {
  960             super(that, cc);
  961         }
  962 
  963         @Override
  964         public AffineGrid transform(CopyContext cc, OpTransformer ot) {
  965             return new AffineGrid(this, cc);
  966         }
  967 
  968         AffineGrid(TypeElement resultType, Value theta, Value size, java.util.Optional<Integer> align_corners) {
  969             super(SCHEMA, resultType, Set.of(), List.of(theta, size), List.of(align_corners));
  970         }
  971 
  972         @Override
  973         public SequencedSet<OnnxParameter> onnxOutputs() {
  974             return onnxOutputs(SCHEMA);
  975         }
  976 
  977         @Override
  978         public SequencedMap<OnnxParameter, Object> onnxInputs() {
  979             return onnxInputs(SCHEMA, List.of(theta(), size()));
  980         }
  981 
  982         public Value theta() {
  983             return operands().get(0);
  984         }
  985 
  986         public Value size() {
  987             return operands().get(1);
  988         }
  989 
  990         public java.util.Optional<Integer> align_corners() {
  991             Integer align_corners = Attribute.align_corners.access(Integer.class, onnxAttributes);
  992             return java.util.Optional.ofNullable(align_corners);
  993         }
  994 
  995     }
  996 
  997     public static AffineGrid AffineGrid(TypeElement resultType, Value theta, Value size, java.util.Optional<Integer> align_corners) {
  998         return new AffineGrid(resultType, theta, size, align_corners);
  999     }
 1000 
 1001     @OpFactory.OpDeclaration(And.NAME)
 1002     public static final class And extends OnnxOp {
 1003         public static final String NAME = "And";
 1004 
 1005         public enum Attribute implements OnnxAttribute.None { }
 1006 
 1007         public enum TypeConstraint implements OnnxTypeConstraint {
 1008             T(new OnnxType.TypeVariable("T", List.of(OnnxType.tensor(OnnxType.bool())))),
 1009             T1(new OnnxType.TypeVariable("T1", List.of(OnnxType.tensor(OnnxType.bool())))),
 1010             ;
 1011 
 1012             final OnnxType.TypeVariable typeVariable;
 1013 
 1014             TypeConstraint(OnnxType.TypeVariable typeVariable) {
 1015                 assert typeVariable.name().equals(name());
 1016                 this.typeVariable = typeVariable;
 1017             }
 1018 
 1019             @Override
 1020             public OnnxType.TypeVariable typeVariable() {
 1021                 return typeVariable;
 1022             }
 1023         }
 1024 
 1025         public enum InputParameter implements OnnxParameter {
 1026             A(TypeConstraint.T.typeVariable(), Quantifier.REQUIRED),
 1027             B(TypeConstraint.T.typeVariable(), Quantifier.REQUIRED),
 1028             ;
 1029 
 1030             final OnnxType type;
 1031             final Quantifier quantifier;
 1032 
 1033             InputParameter(OnnxType type, Quantifier quantifier) {
 1034                 this.type = type;
 1035                 this.quantifier = quantifier;
 1036             }
 1037 
 1038             @Override
 1039             public OnnxType type() {
 1040                 return type;
 1041             }
 1042 
 1043             @Override
 1044             public Quantifier quantifier() {
 1045                 return quantifier;
 1046             }
 1047         }
 1048 
 1049         public enum OutputParameter implements OnnxParameter {
 1050             C(TypeConstraint.T1.typeVariable(), Quantifier.REQUIRED),
 1051             ;
 1052 
 1053             final OnnxType type;
 1054             final Quantifier quantifier;
 1055 
 1056             OutputParameter(OnnxType type, Quantifier quantifier) {
 1057                 this.type = type;
 1058                 this.quantifier = quantifier;
 1059             }
 1060 
 1061             @Override
 1062             public OnnxType type() {
 1063                 return type;
 1064             }
 1065 
 1066             @Override
 1067             public Quantifier quantifier() {
 1068                 return quantifier;
 1069             }
 1070         }
 1071 
 1072         public static final OnnxSchema SCHEMA = new OnnxSchemaRecord(
 1073                 NAME,
 1074                 List.of(Attribute.values()),
 1075                 List.of(TypeConstraint.values()),
 1076                 List.of(InputParameter.values()),
 1077                 List.of(OutputParameter.values())
 1078         );
 1079 
 1080         public And(ExternalizedOp def) {
 1081             super(SCHEMA, def);
 1082         }
 1083 
 1084         And(And that, CopyContext cc) {
 1085             super(that, cc);
 1086         }
 1087 
 1088         @Override
 1089         public And transform(CopyContext cc, OpTransformer ot) {
 1090             return new And(this, cc);
 1091         }
 1092 
 1093         And(TypeElement resultType, Value A, Value B) {
 1094             super(SCHEMA, resultType, Set.of(), List.of(A, B), List.of());
 1095         }
 1096 
 1097         @Override
 1098         public SequencedSet<OnnxParameter> onnxOutputs() {
 1099             return onnxOutputs(SCHEMA);
 1100         }
 1101 
 1102         @Override
 1103         public SequencedMap<OnnxParameter, Object> onnxInputs() {
 1104             return onnxInputs(SCHEMA, List.of(A(), B()));
 1105         }
 1106 
 1107         public Value A() {
 1108             return operands().get(0);
 1109         }
 1110 
 1111         public Value B() {
 1112             return operands().get(1);
 1113         }
 1114 
 1115     }
 1116 
 1117     public static And And(TypeElement resultType, Value A, Value B) {
 1118         return new And(resultType, A, B);
 1119     }
 1120 
 1121     @OpFactory.OpDeclaration(ArgMax.NAME)
 1122     public static final class ArgMax extends OnnxOp {
 1123         public static final String NAME = "ArgMax";
 1124 
 1125         public enum Attribute implements OnnxAttribute {
 1126             keepdims(Integer.class, true, 1),
 1127             select_last_index(Integer.class, true, 0),
 1128             axis(Integer.class, true, 0),
 1129             ;
 1130 
 1131                 final Class<?> t;
 1132                 final boolean optional;
 1133                 final Object defaultValue;
 1134 
 1135                 Attribute(Class<?> type, boolean optional, Object defaultValue) {
 1136                     this.t = type;
 1137                     this.optional = optional;
 1138                     this.defaultValue = defaultValue;
 1139                     assert optional || defaultValue == null;
 1140                 }
 1141 
 1142                 public Class<?> type() {
 1143                     return t;
 1144                 }
 1145 
 1146                 public boolean isOptional() {
 1147                     return optional;
 1148                 }
 1149 
 1150                 public Object defaultValue() {
 1151                     return defaultValue;
 1152                 }
 1153         }
 1154 
 1155         public enum TypeConstraint implements OnnxTypeConstraint {
 1156             T(new OnnxType.TypeVariable("T", List.of(OnnxType.tensor(OnnxType.uint8()), OnnxType.tensor(OnnxType.uint16()), OnnxType.tensor(OnnxType.uint32()), OnnxType.tensor(OnnxType.uint64()), OnnxType.tensor(OnnxType.int8()), OnnxType.tensor(OnnxType.int16()), OnnxType.tensor(OnnxType.int32()), OnnxType.tensor(OnnxType.int64()), OnnxType.tensor(OnnxType.float16()), OnnxType.tensor(OnnxType.float32()), OnnxType.tensor(OnnxType.float64()), OnnxType.tensor(OnnxType.bfloat16())))),
 1157             ;
 1158 
 1159             final OnnxType.TypeVariable typeVariable;
 1160 
 1161             TypeConstraint(OnnxType.TypeVariable typeVariable) {
 1162                 assert typeVariable.name().equals(name());
 1163                 this.typeVariable = typeVariable;
 1164             }
 1165 
 1166             @Override
 1167             public OnnxType.TypeVariable typeVariable() {
 1168                 return typeVariable;
 1169             }
 1170         }
 1171 
 1172         public enum InputParameter implements OnnxParameter {
 1173             data(TypeConstraint.T.typeVariable(), Quantifier.REQUIRED),
 1174             ;
 1175 
 1176             final OnnxType type;
 1177             final Quantifier quantifier;
 1178 
 1179             InputParameter(OnnxType type, Quantifier quantifier) {
 1180                 this.type = type;
 1181                 this.quantifier = quantifier;
 1182             }
 1183 
 1184             @Override
 1185             public OnnxType type() {
 1186                 return type;
 1187             }
 1188 
 1189             @Override
 1190             public Quantifier quantifier() {
 1191                 return quantifier;
 1192             }
 1193         }
 1194 
 1195         public enum OutputParameter implements OnnxParameter {
 1196             reduced(OnnxType.tensor(OnnxType.int64()), Quantifier.REQUIRED),
 1197             ;
 1198 
 1199             final OnnxType type;
 1200             final Quantifier quantifier;
 1201 
 1202             OutputParameter(OnnxType type, Quantifier quantifier) {
 1203                 this.type = type;
 1204                 this.quantifier = quantifier;
 1205             }
 1206 
 1207             @Override
 1208             public OnnxType type() {
 1209                 return type;
 1210             }
 1211 
 1212             @Override
 1213             public Quantifier quantifier() {
 1214                 return quantifier;
 1215             }
 1216         }
 1217 
 1218         public static final OnnxSchema SCHEMA = new OnnxSchemaRecord(
 1219                 NAME,
 1220                 List.of(Attribute.values()),
 1221                 List.of(TypeConstraint.values()),
 1222                 List.of(InputParameter.values()),
 1223                 List.of(OutputParameter.values())
 1224         );
 1225 
 1226         public ArgMax(ExternalizedOp def) {
 1227             super(SCHEMA, def);
 1228         }
 1229 
 1230         ArgMax(ArgMax that, CopyContext cc) {
 1231             super(that, cc);
 1232         }
 1233 
 1234         @Override
 1235         public ArgMax transform(CopyContext cc, OpTransformer ot) {
 1236             return new ArgMax(this, cc);
 1237         }
 1238 
 1239         ArgMax(TypeElement resultType, Value data, java.util.Optional<Integer> keepdims, java.util.Optional<Integer> select_last_index, java.util.Optional<Integer> axis) {
 1240             super(SCHEMA, resultType, Set.of(), List.of(data), List.of(keepdims, select_last_index, axis));
 1241         }
 1242 
 1243         @Override
 1244         public SequencedSet<OnnxParameter> onnxOutputs() {
 1245             return onnxOutputs(SCHEMA);
 1246         }
 1247 
 1248         @Override
 1249         public SequencedMap<OnnxParameter, Object> onnxInputs() {
 1250             return onnxInputs(SCHEMA, List.of(data()));
 1251         }
 1252 
 1253         public Value data() {
 1254             return operands().get(0);
 1255         }
 1256 
 1257         public java.util.Optional<Integer> keepdims() {
 1258             Integer keepdims = Attribute.keepdims.access(Integer.class, onnxAttributes);
 1259             return java.util.Optional.ofNullable(keepdims);
 1260         }
 1261 
 1262         public java.util.Optional<Integer> select_last_index() {
 1263             Integer select_last_index = Attribute.select_last_index.access(Integer.class, onnxAttributes);
 1264             return java.util.Optional.ofNullable(select_last_index);
 1265         }
 1266 
 1267         public java.util.Optional<Integer> axis() {
 1268             Integer axis = Attribute.axis.access(Integer.class, onnxAttributes);
 1269             return java.util.Optional.ofNullable(axis);
 1270         }
 1271 
 1272     }
 1273 
 1274     public static ArgMax ArgMax(TypeElement resultType, Value data, java.util.Optional<Integer> keepdims, java.util.Optional<Integer> select_last_index, java.util.Optional<Integer> axis) {
 1275         return new ArgMax(resultType, data, keepdims, select_last_index, axis);
 1276     }
 1277 
 1278     @OpFactory.OpDeclaration(ArgMin.NAME)
 1279     public static final class ArgMin extends OnnxOp {
 1280         public static final String NAME = "ArgMin";
 1281 
 1282         public enum Attribute implements OnnxAttribute {
 1283             keepdims(Integer.class, true, 1),
 1284             select_last_index(Integer.class, true, 0),
 1285             axis(Integer.class, true, 0),
 1286             ;
 1287 
 1288                 final Class<?> t;
 1289                 final boolean optional;
 1290                 final Object defaultValue;
 1291 
 1292                 Attribute(Class<?> type, boolean optional, Object defaultValue) {
 1293                     this.t = type;
 1294                     this.optional = optional;
 1295                     this.defaultValue = defaultValue;
 1296                     assert optional || defaultValue == null;
 1297                 }
 1298 
 1299                 public Class<?> type() {
 1300                     return t;
 1301                 }
 1302 
 1303                 public boolean isOptional() {
 1304                     return optional;
 1305                 }
 1306 
 1307                 public Object defaultValue() {
 1308                     return defaultValue;
 1309                 }
 1310         }
 1311 
 1312         public enum TypeConstraint implements OnnxTypeConstraint {
 1313             T(new OnnxType.TypeVariable("T", List.of(OnnxType.tensor(OnnxType.uint8()), OnnxType.tensor(OnnxType.uint16()), OnnxType.tensor(OnnxType.uint32()), OnnxType.tensor(OnnxType.uint64()), OnnxType.tensor(OnnxType.int8()), OnnxType.tensor(OnnxType.int16()), OnnxType.tensor(OnnxType.int32()), OnnxType.tensor(OnnxType.int64()), OnnxType.tensor(OnnxType.float16()), OnnxType.tensor(OnnxType.float32()), OnnxType.tensor(OnnxType.float64()), OnnxType.tensor(OnnxType.bfloat16())))),
 1314             ;
 1315 
 1316             final OnnxType.TypeVariable typeVariable;
 1317 
 1318             TypeConstraint(OnnxType.TypeVariable typeVariable) {
 1319                 assert typeVariable.name().equals(name());
 1320                 this.typeVariable = typeVariable;
 1321             }
 1322 
 1323             @Override
 1324             public OnnxType.TypeVariable typeVariable() {
 1325                 return typeVariable;
 1326             }
 1327         }
 1328 
 1329         public enum InputParameter implements OnnxParameter {
 1330             data(TypeConstraint.T.typeVariable(), Quantifier.REQUIRED),
 1331             ;
 1332 
 1333             final OnnxType type;
 1334             final Quantifier quantifier;
 1335 
 1336             InputParameter(OnnxType type, Quantifier quantifier) {
 1337                 this.type = type;
 1338                 this.quantifier = quantifier;
 1339             }
 1340 
 1341             @Override
 1342             public OnnxType type() {
 1343                 return type;
 1344             }
 1345 
 1346             @Override
 1347             public Quantifier quantifier() {
 1348                 return quantifier;
 1349             }
 1350         }
 1351 
 1352         public enum OutputParameter implements OnnxParameter {
 1353             reduced(OnnxType.tensor(OnnxType.int64()), Quantifier.REQUIRED),
 1354             ;
 1355 
 1356             final OnnxType type;
 1357             final Quantifier quantifier;
 1358 
 1359             OutputParameter(OnnxType type, Quantifier quantifier) {
 1360                 this.type = type;
 1361                 this.quantifier = quantifier;
 1362             }
 1363 
 1364             @Override
 1365             public OnnxType type() {
 1366                 return type;
 1367             }
 1368 
 1369             @Override
 1370             public Quantifier quantifier() {
 1371                 return quantifier;
 1372             }
 1373         }
 1374 
 1375         public static final OnnxSchema SCHEMA = new OnnxSchemaRecord(
 1376                 NAME,
 1377                 List.of(Attribute.values()),
 1378                 List.of(TypeConstraint.values()),
 1379                 List.of(InputParameter.values()),
 1380                 List.of(OutputParameter.values())
 1381         );
 1382 
 1383         public ArgMin(ExternalizedOp def) {
 1384             super(SCHEMA, def);
 1385         }
 1386 
 1387         ArgMin(ArgMin that, CopyContext cc) {
 1388             super(that, cc);
 1389         }
 1390 
 1391         @Override
 1392         public ArgMin transform(CopyContext cc, OpTransformer ot) {
 1393             return new ArgMin(this, cc);
 1394         }
 1395 
 1396         ArgMin(TypeElement resultType, Value data, java.util.Optional<Integer> keepdims, java.util.Optional<Integer> select_last_index, java.util.Optional<Integer> axis) {
 1397             super(SCHEMA, resultType, Set.of(), List.of(data), List.of(keepdims, select_last_index, axis));
 1398         }
 1399 
 1400         @Override
 1401         public SequencedSet<OnnxParameter> onnxOutputs() {
 1402             return onnxOutputs(SCHEMA);
 1403         }
 1404 
 1405         @Override
 1406         public SequencedMap<OnnxParameter, Object> onnxInputs() {
 1407             return onnxInputs(SCHEMA, List.of(data()));
 1408         }
 1409 
 1410         public Value data() {
 1411             return operands().get(0);
 1412         }
 1413 
 1414         public java.util.Optional<Integer> keepdims() {
 1415             Integer keepdims = Attribute.keepdims.access(Integer.class, onnxAttributes);
 1416             return java.util.Optional.ofNullable(keepdims);
 1417         }
 1418 
 1419         public java.util.Optional<Integer> select_last_index() {
 1420             Integer select_last_index = Attribute.select_last_index.access(Integer.class, onnxAttributes);
 1421             return java.util.Optional.ofNullable(select_last_index);
 1422         }
 1423 
 1424         public java.util.Optional<Integer> axis() {
 1425             Integer axis = Attribute.axis.access(Integer.class, onnxAttributes);
 1426             return java.util.Optional.ofNullable(axis);
 1427         }
 1428 
 1429     }
 1430 
 1431     public static ArgMin ArgMin(TypeElement resultType, Value data, java.util.Optional<Integer> keepdims, java.util.Optional<Integer> select_last_index, java.util.Optional<Integer> axis) {
 1432         return new ArgMin(resultType, data, keepdims, select_last_index, axis);
 1433     }
 1434 
 1435     @OpFactory.OpDeclaration(ArrayFeatureExtractor.NAME)
 1436     public static final class ArrayFeatureExtractor extends OnnxOp {
 1437         public static final String NAME = "ArrayFeatureExtractor";
 1438 
 1439         public enum Attribute implements OnnxAttribute.None { }
 1440 
 1441         public enum TypeConstraint implements OnnxTypeConstraint {
 1442             T(new OnnxType.TypeVariable("T", List.of(OnnxType.tensor(OnnxType.float32()), OnnxType.tensor(OnnxType.float64()), OnnxType.tensor(OnnxType.int64()), OnnxType.tensor(OnnxType.int32()), OnnxType.tensor(OnnxType.string())))),
 1443             ;
 1444 
 1445             final OnnxType.TypeVariable typeVariable;
 1446 
 1447             TypeConstraint(OnnxType.TypeVariable typeVariable) {
 1448                 assert typeVariable.name().equals(name());
 1449                 this.typeVariable = typeVariable;
 1450             }
 1451 
 1452             @Override
 1453             public OnnxType.TypeVariable typeVariable() {
 1454                 return typeVariable;
 1455             }
 1456         }
 1457 
 1458         public enum InputParameter implements OnnxParameter {
 1459             X(TypeConstraint.T.typeVariable(), Quantifier.REQUIRED),
 1460             Y(OnnxType.tensor(OnnxType.int64()), Quantifier.REQUIRED),
 1461             ;
 1462 
 1463             final OnnxType type;
 1464             final Quantifier quantifier;
 1465 
 1466             InputParameter(OnnxType type, Quantifier quantifier) {
 1467                 this.type = type;
 1468                 this.quantifier = quantifier;
 1469             }
 1470 
 1471             @Override
 1472             public OnnxType type() {
 1473                 return type;
 1474             }
 1475 
 1476             @Override
 1477             public Quantifier quantifier() {
 1478                 return quantifier;
 1479             }
 1480         }
 1481 
 1482         public enum OutputParameter implements OnnxParameter {
 1483             Z(TypeConstraint.T.typeVariable(), Quantifier.REQUIRED),
 1484             ;
 1485 
 1486             final OnnxType type;
 1487             final Quantifier quantifier;
 1488 
 1489             OutputParameter(OnnxType type, Quantifier quantifier) {
 1490                 this.type = type;
 1491                 this.quantifier = quantifier;
 1492             }
 1493 
 1494             @Override
 1495             public OnnxType type() {
 1496                 return type;
 1497             }
 1498 
 1499             @Override
 1500             public Quantifier quantifier() {
 1501                 return quantifier;
 1502             }
 1503         }
 1504 
 1505         public static final OnnxSchema SCHEMA = new OnnxSchemaRecord(
 1506                 NAME,
 1507                 List.of(Attribute.values()),
 1508                 List.of(TypeConstraint.values()),
 1509                 List.of(InputParameter.values()),
 1510                 List.of(OutputParameter.values())
 1511         );
 1512 
 1513         public ArrayFeatureExtractor(ExternalizedOp def) {
 1514             super(SCHEMA, def);
 1515         }
 1516 
 1517         ArrayFeatureExtractor(ArrayFeatureExtractor that, CopyContext cc) {
 1518             super(that, cc);
 1519         }
 1520 
 1521         @Override
 1522         public ArrayFeatureExtractor transform(CopyContext cc, OpTransformer ot) {
 1523             return new ArrayFeatureExtractor(this, cc);
 1524         }
 1525 
 1526         ArrayFeatureExtractor(TypeElement resultType, Value X, Value Y) {
 1527             super(SCHEMA, resultType, Set.of(), List.of(X, Y), List.of());
 1528         }
 1529 
 1530         @Override
 1531         public SequencedSet<OnnxParameter> onnxOutputs() {
 1532             return onnxOutputs(SCHEMA);
 1533         }
 1534 
 1535         @Override
 1536         public SequencedMap<OnnxParameter, Object> onnxInputs() {
 1537             return onnxInputs(SCHEMA, List.of(X(), Y()));
 1538         }
 1539 
 1540         public Value X() {
 1541             return operands().get(0);
 1542         }
 1543 
 1544         public Value Y() {
 1545             return operands().get(1);
 1546         }
 1547 
 1548     }
 1549 
 1550     public static ArrayFeatureExtractor ArrayFeatureExtractor(TypeElement resultType, Value X, Value Y) {
 1551         return new ArrayFeatureExtractor(resultType, X, Y);
 1552     }
 1553 
 1554     @OpFactory.OpDeclaration(Asin.NAME)
 1555     public static final class Asin extends OnnxOp {
 1556         public static final String NAME = "Asin";
 1557 
 1558         public enum Attribute implements OnnxAttribute.None { }
 1559 
 1560         public enum TypeConstraint implements OnnxTypeConstraint {
 1561             T(new OnnxType.TypeVariable("T", List.of(OnnxType.tensor(OnnxType.bfloat16()), OnnxType.tensor(OnnxType.float16()), OnnxType.tensor(OnnxType.float32()), OnnxType.tensor(OnnxType.float64())))),
 1562             ;
 1563 
 1564             final OnnxType.TypeVariable typeVariable;
 1565 
 1566             TypeConstraint(OnnxType.TypeVariable typeVariable) {
 1567                 assert typeVariable.name().equals(name());
 1568                 this.typeVariable = typeVariable;
 1569             }
 1570 
 1571             @Override
 1572             public OnnxType.TypeVariable typeVariable() {
 1573                 return typeVariable;
 1574             }
 1575         }
 1576 
 1577         public enum InputParameter implements OnnxParameter {
 1578             input(TypeConstraint.T.typeVariable(), Quantifier.REQUIRED),
 1579             ;
 1580 
 1581             final OnnxType type;
 1582             final Quantifier quantifier;
 1583 
 1584             InputParameter(OnnxType type, Quantifier quantifier) {
 1585                 this.type = type;
 1586                 this.quantifier = quantifier;
 1587             }
 1588 
 1589             @Override
 1590             public OnnxType type() {
 1591                 return type;
 1592             }
 1593 
 1594             @Override
 1595             public Quantifier quantifier() {
 1596                 return quantifier;
 1597             }
 1598         }
 1599 
 1600         public enum OutputParameter implements OnnxParameter {
 1601             output(TypeConstraint.T.typeVariable(), Quantifier.REQUIRED),
 1602             ;
 1603 
 1604             final OnnxType type;
 1605             final Quantifier quantifier;
 1606 
 1607             OutputParameter(OnnxType type, Quantifier quantifier) {
 1608                 this.type = type;
 1609                 this.quantifier = quantifier;
 1610             }
 1611 
 1612             @Override
 1613             public OnnxType type() {
 1614                 return type;
 1615             }
 1616 
 1617             @Override
 1618             public Quantifier quantifier() {
 1619                 return quantifier;
 1620             }
 1621         }
 1622 
 1623         public static final OnnxSchema SCHEMA = new OnnxSchemaRecord(
 1624                 NAME,
 1625                 List.of(Attribute.values()),
 1626                 List.of(TypeConstraint.values()),
 1627                 List.of(InputParameter.values()),
 1628                 List.of(OutputParameter.values())
 1629         );
 1630 
 1631         public Asin(ExternalizedOp def) {
 1632             super(SCHEMA, def);
 1633         }
 1634 
 1635         Asin(Asin that, CopyContext cc) {
 1636             super(that, cc);
 1637         }
 1638 
 1639         @Override
 1640         public Asin transform(CopyContext cc, OpTransformer ot) {
 1641             return new Asin(this, cc);
 1642         }
 1643 
 1644         Asin(TypeElement resultType, Value input) {
 1645             super(SCHEMA, resultType, Set.of(), List.of(input), List.of());
 1646         }
 1647 
 1648         @Override
 1649         public SequencedSet<OnnxParameter> onnxOutputs() {
 1650             return onnxOutputs(SCHEMA);
 1651         }
 1652 
 1653         @Override
 1654         public SequencedMap<OnnxParameter, Object> onnxInputs() {
 1655             return onnxInputs(SCHEMA, List.of(input()));
 1656         }
 1657 
 1658         public Value input() {
 1659             return operands().get(0);
 1660         }
 1661 
 1662     }
 1663 
 1664     public static Asin Asin(TypeElement resultType, Value input) {
 1665         return new Asin(resultType, input);
 1666     }
 1667 
 1668     @OpFactory.OpDeclaration(Asinh.NAME)
 1669     public static final class Asinh extends OnnxOp {
 1670         public static final String NAME = "Asinh";
 1671 
 1672         public enum Attribute implements OnnxAttribute.None { }
 1673 
 1674         public enum TypeConstraint implements OnnxTypeConstraint {
 1675             T(new OnnxType.TypeVariable("T", List.of(OnnxType.tensor(OnnxType.bfloat16()), OnnxType.tensor(OnnxType.float16()), OnnxType.tensor(OnnxType.float32()), OnnxType.tensor(OnnxType.float64())))),
 1676             ;
 1677 
 1678             final OnnxType.TypeVariable typeVariable;
 1679 
 1680             TypeConstraint(OnnxType.TypeVariable typeVariable) {
 1681                 assert typeVariable.name().equals(name());
 1682                 this.typeVariable = typeVariable;
 1683             }
 1684 
 1685             @Override
 1686             public OnnxType.TypeVariable typeVariable() {
 1687                 return typeVariable;
 1688             }
 1689         }
 1690 
 1691         public enum InputParameter implements OnnxParameter {
 1692             input(TypeConstraint.T.typeVariable(), Quantifier.REQUIRED),
 1693             ;
 1694 
 1695             final OnnxType type;
 1696             final Quantifier quantifier;
 1697 
 1698             InputParameter(OnnxType type, Quantifier quantifier) {
 1699                 this.type = type;
 1700                 this.quantifier = quantifier;
 1701             }
 1702 
 1703             @Override
 1704             public OnnxType type() {
 1705                 return type;
 1706             }
 1707 
 1708             @Override
 1709             public Quantifier quantifier() {
 1710                 return quantifier;
 1711             }
 1712         }
 1713 
 1714         public enum OutputParameter implements OnnxParameter {
 1715             output(TypeConstraint.T.typeVariable(), Quantifier.REQUIRED),
 1716             ;
 1717 
 1718             final OnnxType type;
 1719             final Quantifier quantifier;
 1720 
 1721             OutputParameter(OnnxType type, Quantifier quantifier) {
 1722                 this.type = type;
 1723                 this.quantifier = quantifier;
 1724             }
 1725 
 1726             @Override
 1727             public OnnxType type() {
 1728                 return type;
 1729             }
 1730 
 1731             @Override
 1732             public Quantifier quantifier() {
 1733                 return quantifier;
 1734             }
 1735         }
 1736 
 1737         public static final OnnxSchema SCHEMA = new OnnxSchemaRecord(
 1738                 NAME,
 1739                 List.of(Attribute.values()),
 1740                 List.of(TypeConstraint.values()),
 1741                 List.of(InputParameter.values()),
 1742                 List.of(OutputParameter.values())
 1743         );
 1744 
 1745         public Asinh(ExternalizedOp def) {
 1746             super(SCHEMA, def);
 1747         }
 1748 
 1749         Asinh(Asinh that, CopyContext cc) {
 1750             super(that, cc);
 1751         }
 1752 
 1753         @Override
 1754         public Asinh transform(CopyContext cc, OpTransformer ot) {
 1755             return new Asinh(this, cc);
 1756         }
 1757 
 1758         Asinh(TypeElement resultType, Value input) {
 1759             super(SCHEMA, resultType, Set.of(), List.of(input), List.of());
 1760         }
 1761 
 1762         @Override
 1763         public SequencedSet<OnnxParameter> onnxOutputs() {
 1764             return onnxOutputs(SCHEMA);
 1765         }
 1766 
 1767         @Override
 1768         public SequencedMap<OnnxParameter, Object> onnxInputs() {
 1769             return onnxInputs(SCHEMA, List.of(input()));
 1770         }
 1771 
 1772         public Value input() {
 1773             return operands().get(0);
 1774         }
 1775 
 1776     }
 1777 
 1778     public static Asinh Asinh(TypeElement resultType, Value input) {
 1779         return new Asinh(resultType, input);
 1780     }
 1781 
 1782     @OpFactory.OpDeclaration(Atan.NAME)
 1783     public static final class Atan extends OnnxOp {
 1784         public static final String NAME = "Atan";
 1785 
 1786         public enum Attribute implements OnnxAttribute.None { }
 1787 
 1788         public enum TypeConstraint implements OnnxTypeConstraint {
 1789             T(new OnnxType.TypeVariable("T", List.of(OnnxType.tensor(OnnxType.bfloat16()), OnnxType.tensor(OnnxType.float16()), OnnxType.tensor(OnnxType.float32()), OnnxType.tensor(OnnxType.float64())))),
 1790             ;
 1791 
 1792             final OnnxType.TypeVariable typeVariable;
 1793 
 1794             TypeConstraint(OnnxType.TypeVariable typeVariable) {
 1795                 assert typeVariable.name().equals(name());
 1796                 this.typeVariable = typeVariable;
 1797             }
 1798 
 1799             @Override
 1800             public OnnxType.TypeVariable typeVariable() {
 1801                 return typeVariable;
 1802             }
 1803         }
 1804 
 1805         public enum InputParameter implements OnnxParameter {
 1806             input(TypeConstraint.T.typeVariable(), Quantifier.REQUIRED),
 1807             ;
 1808 
 1809             final OnnxType type;
 1810             final Quantifier quantifier;
 1811 
 1812             InputParameter(OnnxType type, Quantifier quantifier) {
 1813                 this.type = type;
 1814                 this.quantifier = quantifier;
 1815             }
 1816 
 1817             @Override
 1818             public OnnxType type() {
 1819                 return type;
 1820             }
 1821 
 1822             @Override
 1823             public Quantifier quantifier() {
 1824                 return quantifier;
 1825             }
 1826         }
 1827 
 1828         public enum OutputParameter implements OnnxParameter {
 1829             output(TypeConstraint.T.typeVariable(), Quantifier.REQUIRED),
 1830             ;
 1831 
 1832             final OnnxType type;
 1833             final Quantifier quantifier;
 1834 
 1835             OutputParameter(OnnxType type, Quantifier quantifier) {
 1836                 this.type = type;
 1837                 this.quantifier = quantifier;
 1838             }
 1839 
 1840             @Override
 1841             public OnnxType type() {
 1842                 return type;
 1843             }
 1844 
 1845             @Override
 1846             public Quantifier quantifier() {
 1847                 return quantifier;
 1848             }
 1849         }
 1850 
 1851         public static final OnnxSchema SCHEMA = new OnnxSchemaRecord(
 1852                 NAME,
 1853                 List.of(Attribute.values()),
 1854                 List.of(TypeConstraint.values()),
 1855                 List.of(InputParameter.values()),
 1856                 List.of(OutputParameter.values())
 1857         );
 1858 
 1859         public Atan(ExternalizedOp def) {
 1860             super(SCHEMA, def);
 1861         }
 1862 
 1863         Atan(Atan that, CopyContext cc) {
 1864             super(that, cc);
 1865         }
 1866 
 1867         @Override
 1868         public Atan transform(CopyContext cc, OpTransformer ot) {
 1869             return new Atan(this, cc);
 1870         }
 1871 
 1872         Atan(TypeElement resultType, Value input) {
 1873             super(SCHEMA, resultType, Set.of(), List.of(input), List.of());
 1874         }
 1875 
 1876         @Override
 1877         public SequencedSet<OnnxParameter> onnxOutputs() {
 1878             return onnxOutputs(SCHEMA);
 1879         }
 1880 
 1881         @Override
 1882         public SequencedMap<OnnxParameter, Object> onnxInputs() {
 1883             return onnxInputs(SCHEMA, List.of(input()));
 1884         }
 1885 
 1886         public Value input() {
 1887             return operands().get(0);
 1888         }
 1889 
 1890     }
 1891 
 1892     public static Atan Atan(TypeElement resultType, Value input) {
 1893         return new Atan(resultType, input);
 1894     }
 1895 
 1896     @OpFactory.OpDeclaration(Atanh.NAME)
 1897     public static final class Atanh extends OnnxOp {
 1898         public static final String NAME = "Atanh";
 1899 
 1900         public enum Attribute implements OnnxAttribute.None { }
 1901 
 1902         public enum TypeConstraint implements OnnxTypeConstraint {
 1903             T(new OnnxType.TypeVariable("T", List.of(OnnxType.tensor(OnnxType.bfloat16()), OnnxType.tensor(OnnxType.float16()), OnnxType.tensor(OnnxType.float32()), OnnxType.tensor(OnnxType.float64())))),
 1904             ;
 1905 
 1906             final OnnxType.TypeVariable typeVariable;
 1907 
 1908             TypeConstraint(OnnxType.TypeVariable typeVariable) {
 1909                 assert typeVariable.name().equals(name());
 1910                 this.typeVariable = typeVariable;
 1911             }
 1912 
 1913             @Override
 1914             public OnnxType.TypeVariable typeVariable() {
 1915                 return typeVariable;
 1916             }
 1917         }
 1918 
 1919         public enum InputParameter implements OnnxParameter {
 1920             input(TypeConstraint.T.typeVariable(), Quantifier.REQUIRED),
 1921             ;
 1922 
 1923             final OnnxType type;
 1924             final Quantifier quantifier;
 1925 
 1926             InputParameter(OnnxType type, Quantifier quantifier) {
 1927                 this.type = type;
 1928                 this.quantifier = quantifier;
 1929             }
 1930 
 1931             @Override
 1932             public OnnxType type() {
 1933                 return type;
 1934             }
 1935 
 1936             @Override
 1937             public Quantifier quantifier() {
 1938                 return quantifier;
 1939             }
 1940         }
 1941 
 1942         public enum OutputParameter implements OnnxParameter {
 1943             output(TypeConstraint.T.typeVariable(), Quantifier.REQUIRED),
 1944             ;
 1945 
 1946             final OnnxType type;
 1947             final Quantifier quantifier;
 1948 
 1949             OutputParameter(OnnxType type, Quantifier quantifier) {
 1950                 this.type = type;
 1951                 this.quantifier = quantifier;
 1952             }
 1953 
 1954             @Override
 1955             public OnnxType type() {
 1956                 return type;
 1957             }
 1958 
 1959             @Override
 1960             public Quantifier quantifier() {
 1961                 return quantifier;
 1962             }
 1963         }
 1964 
 1965         public static final OnnxSchema SCHEMA = new OnnxSchemaRecord(
 1966                 NAME,
 1967                 List.of(Attribute.values()),
 1968                 List.of(TypeConstraint.values()),
 1969                 List.of(InputParameter.values()),
 1970                 List.of(OutputParameter.values())
 1971         );
 1972 
 1973         public Atanh(ExternalizedOp def) {
 1974             super(SCHEMA, def);
 1975         }
 1976 
 1977         Atanh(Atanh that, CopyContext cc) {
 1978             super(that, cc);
 1979         }
 1980 
 1981         @Override
 1982         public Atanh transform(CopyContext cc, OpTransformer ot) {
 1983             return new Atanh(this, cc);
 1984         }
 1985 
 1986         Atanh(TypeElement resultType, Value input) {
 1987             super(SCHEMA, resultType, Set.of(), List.of(input), List.of());
 1988         }
 1989 
 1990         @Override
 1991         public SequencedSet<OnnxParameter> onnxOutputs() {
 1992             return onnxOutputs(SCHEMA);
 1993         }
 1994 
 1995         @Override
 1996         public SequencedMap<OnnxParameter, Object> onnxInputs() {
 1997             return onnxInputs(SCHEMA, List.of(input()));
 1998         }
 1999 
 2000         public Value input() {
 2001             return operands().get(0);
 2002         }
 2003 
 2004     }
 2005 
 2006     public static Atanh Atanh(TypeElement resultType, Value input) {
 2007         return new Atanh(resultType, input);
 2008     }
 2009 
 2010     @OpFactory.OpDeclaration(AveragePool.NAME)
 2011     public static final class AveragePool extends OnnxOp {
 2012         public static final String NAME = "AveragePool";
 2013 
 2014         public enum Attribute implements OnnxAttribute {
 2015             pads(int[].class, true, null),
 2016             dilations(int[].class, true, null),
 2017             auto_pad(String.class, true, "NOTSET"),
 2018             count_include_pad(Integer.class, true, 0),
 2019             ceil_mode(Integer.class, true, 0),
 2020             strides(int[].class, true, null),
 2021             kernel_shape(int[].class, false, null),
 2022             ;
 2023 
 2024                 final Class<?> t;
 2025                 final boolean optional;
 2026                 final Object defaultValue;
 2027 
 2028                 Attribute(Class<?> type, boolean optional, Object defaultValue) {
 2029                     this.t = type;
 2030                     this.optional = optional;
 2031                     this.defaultValue = defaultValue;
 2032                     assert optional || defaultValue == null;
 2033                 }
 2034 
 2035                 public Class<?> type() {
 2036                     return t;
 2037                 }
 2038 
 2039                 public boolean isOptional() {
 2040                     return optional;
 2041                 }
 2042 
 2043                 public Object defaultValue() {
 2044                     return defaultValue;
 2045                 }
 2046         }
 2047 
 2048         public enum TypeConstraint implements OnnxTypeConstraint {
 2049             T(new OnnxType.TypeVariable("T", List.of(OnnxType.tensor(OnnxType.bfloat16()), OnnxType.tensor(OnnxType.float16()), OnnxType.tensor(OnnxType.float32()), OnnxType.tensor(OnnxType.float64())))),
 2050             ;
 2051 
 2052             final OnnxType.TypeVariable typeVariable;
 2053 
 2054             TypeConstraint(OnnxType.TypeVariable typeVariable) {
 2055                 assert typeVariable.name().equals(name());
 2056                 this.typeVariable = typeVariable;
 2057             }
 2058 
 2059             @Override
 2060             public OnnxType.TypeVariable typeVariable() {
 2061                 return typeVariable;
 2062             }
 2063         }
 2064 
 2065         public enum InputParameter implements OnnxParameter {
 2066             X(TypeConstraint.T.typeVariable(), Quantifier.REQUIRED),
 2067             ;
 2068 
 2069             final OnnxType type;
 2070             final Quantifier quantifier;
 2071 
 2072             InputParameter(OnnxType type, Quantifier quantifier) {
 2073                 this.type = type;
 2074                 this.quantifier = quantifier;
 2075             }
 2076 
 2077             @Override
 2078             public OnnxType type() {
 2079                 return type;
 2080             }
 2081 
 2082             @Override
 2083             public Quantifier quantifier() {
 2084                 return quantifier;
 2085             }
 2086         }
 2087 
 2088         public enum OutputParameter implements OnnxParameter {
 2089             Y(TypeConstraint.T.typeVariable(), Quantifier.REQUIRED),
 2090             ;
 2091 
 2092             final OnnxType type;
 2093             final Quantifier quantifier;
 2094 
 2095             OutputParameter(OnnxType type, Quantifier quantifier) {
 2096                 this.type = type;
 2097                 this.quantifier = quantifier;
 2098             }
 2099 
 2100             @Override
 2101             public OnnxType type() {
 2102                 return type;
 2103             }
 2104 
 2105             @Override
 2106             public Quantifier quantifier() {
 2107                 return quantifier;
 2108             }
 2109         }
 2110 
 2111         public static final OnnxSchema SCHEMA = new OnnxSchemaRecord(
 2112                 NAME,
 2113                 List.of(Attribute.values()),
 2114                 List.of(TypeConstraint.values()),
 2115                 List.of(InputParameter.values()),
 2116                 List.of(OutputParameter.values())
 2117         );
 2118 
 2119         public AveragePool(ExternalizedOp def) {
 2120             super(SCHEMA, def);
 2121         }
 2122 
 2123         AveragePool(AveragePool that, CopyContext cc) {
 2124             super(that, cc);
 2125         }
 2126 
 2127         @Override
 2128         public AveragePool transform(CopyContext cc, OpTransformer ot) {
 2129             return new AveragePool(this, cc);
 2130         }
 2131 
 2132         AveragePool(TypeElement resultType, Value X, java.util.Optional<int[]> pads, java.util.Optional<int[]> dilations, java.util.Optional<String> auto_pad, java.util.Optional<Integer> count_include_pad, java.util.Optional<Integer> ceil_mode, java.util.Optional<int[]> strides, int[] kernel_shape) {
 2133             super(SCHEMA, resultType, Set.of(), List.of(X), List.of(pads, dilations, auto_pad, count_include_pad, ceil_mode, strides, kernel_shape));
 2134         }
 2135 
 2136         @Override
 2137         public SequencedSet<OnnxParameter> onnxOutputs() {
 2138             return onnxOutputs(SCHEMA);
 2139         }
 2140 
 2141         @Override
 2142         public SequencedMap<OnnxParameter, Object> onnxInputs() {
 2143             return onnxInputs(SCHEMA, List.of(X()));
 2144         }
 2145 
 2146         public Value X() {
 2147             return operands().get(0);
 2148         }
 2149 
 2150         public java.util.Optional<int[]> pads() {
 2151             int[] pads = Attribute.pads.access(int[].class, onnxAttributes);
 2152             return java.util.Optional.ofNullable(pads).map(int[]::clone);
 2153         }
 2154 
 2155         public java.util.Optional<int[]> dilations() {
 2156             int[] dilations = Attribute.dilations.access(int[].class, onnxAttributes);
 2157             return java.util.Optional.ofNullable(dilations).map(int[]::clone);
 2158         }
 2159 
 2160         public java.util.Optional<String> auto_pad() {
 2161             String auto_pad = Attribute.auto_pad.access(String.class, onnxAttributes);
 2162             return java.util.Optional.ofNullable(auto_pad);
 2163         }
 2164 
 2165         public java.util.Optional<Integer> count_include_pad() {
 2166             Integer count_include_pad = Attribute.count_include_pad.access(Integer.class, onnxAttributes);
 2167             return java.util.Optional.ofNullable(count_include_pad);
 2168         }
 2169 
 2170         public java.util.Optional<Integer> ceil_mode() {
 2171             Integer ceil_mode = Attribute.ceil_mode.access(Integer.class, onnxAttributes);
 2172             return java.util.Optional.ofNullable(ceil_mode);
 2173         }
 2174 
 2175         public java.util.Optional<int[]> strides() {
 2176             int[] strides = Attribute.strides.access(int[].class, onnxAttributes);
 2177             return java.util.Optional.ofNullable(strides).map(int[]::clone);
 2178         }
 2179 
 2180         public int[] kernel_shape() {
 2181             int[] kernel_shape = Attribute.kernel_shape.access(int[].class, onnxAttributes);
 2182             return kernel_shape.clone();
 2183         }
 2184 
 2185     }
 2186 
 2187     public static AveragePool AveragePool(TypeElement resultType, Value X, java.util.Optional<int[]> pads, java.util.Optional<int[]> dilations, java.util.Optional<String> auto_pad, java.util.Optional<Integer> count_include_pad, java.util.Optional<Integer> ceil_mode, java.util.Optional<int[]> strides, int[] kernel_shape) {
 2188         return new AveragePool(resultType, X, pads, dilations, auto_pad, count_include_pad, ceil_mode, strides, kernel_shape);
 2189     }
 2190 
 2191     @OpFactory.OpDeclaration(BatchNormalization.NAME)
 2192     public static final class BatchNormalization extends OnnxOp {
 2193         public static final String NAME = "BatchNormalization";
 2194 
 2195         public enum Attribute implements OnnxAttribute {
 2196             epsilon(Float.class, true, 1.0E-5f),
 2197             training_mode(Integer.class, true, 0),
 2198             momentum(Float.class, true, 0.9f),
 2199             ;
 2200 
 2201                 final Class<?> t;
 2202                 final boolean optional;
 2203                 final Object defaultValue;
 2204 
 2205                 Attribute(Class<?> type, boolean optional, Object defaultValue) {
 2206                     this.t = type;
 2207                     this.optional = optional;
 2208                     this.defaultValue = defaultValue;
 2209                     assert optional || defaultValue == null;
 2210                 }
 2211 
 2212                 public Class<?> type() {
 2213                     return t;
 2214                 }
 2215 
 2216                 public boolean isOptional() {
 2217                     return optional;
 2218                 }
 2219 
 2220                 public Object defaultValue() {
 2221                     return defaultValue;
 2222                 }
 2223         }
 2224 
 2225         public enum TypeConstraint implements OnnxTypeConstraint {
 2226             T(new OnnxType.TypeVariable("T", List.of(OnnxType.tensor(OnnxType.float16()), OnnxType.tensor(OnnxType.float32()), OnnxType.tensor(OnnxType.float64()), OnnxType.tensor(OnnxType.bfloat16())))),
 2227             T1(new OnnxType.TypeVariable("T1", List.of(OnnxType.tensor(OnnxType.float16()), OnnxType.tensor(OnnxType.float32()), OnnxType.tensor(OnnxType.float64()), OnnxType.tensor(OnnxType.bfloat16())))),
 2228             T2(new OnnxType.TypeVariable("T2", List.of(OnnxType.tensor(OnnxType.float16()), OnnxType.tensor(OnnxType.float32()), OnnxType.tensor(OnnxType.float64()), OnnxType.tensor(OnnxType.bfloat16())))),
 2229             ;
 2230 
 2231             final OnnxType.TypeVariable typeVariable;
 2232 
 2233             TypeConstraint(OnnxType.TypeVariable typeVariable) {
 2234                 assert typeVariable.name().equals(name());
 2235                 this.typeVariable = typeVariable;
 2236             }
 2237 
 2238             @Override
 2239             public OnnxType.TypeVariable typeVariable() {
 2240                 return typeVariable;
 2241             }
 2242         }
 2243 
 2244         public enum InputParameter implements OnnxParameter {
 2245             X(TypeConstraint.T.typeVariable(), Quantifier.REQUIRED),
 2246             scale(TypeConstraint.T1.typeVariable(), Quantifier.REQUIRED),
 2247             B(TypeConstraint.T1.typeVariable(), Quantifier.REQUIRED),
 2248             input_mean(TypeConstraint.T2.typeVariable(), Quantifier.REQUIRED),
 2249             input_var(TypeConstraint.T2.typeVariable(), Quantifier.REQUIRED),
 2250             ;
 2251 
 2252             final OnnxType type;
 2253             final Quantifier quantifier;
 2254 
 2255             InputParameter(OnnxType type, Quantifier quantifier) {
 2256                 this.type = type;
 2257                 this.quantifier = quantifier;
 2258             }
 2259 
 2260             @Override
 2261             public OnnxType type() {
 2262                 return type;
 2263             }
 2264 
 2265             @Override
 2266             public Quantifier quantifier() {
 2267                 return quantifier;
 2268             }
 2269         }
 2270 
 2271         public enum OutputParameter implements OnnxParameter {
 2272             Y(TypeConstraint.T.typeVariable(), Quantifier.REQUIRED),
 2273             running_mean(TypeConstraint.T2.typeVariable(), Quantifier.OPTIONAL),
 2274             running_var(TypeConstraint.T2.typeVariable(), Quantifier.OPTIONAL),
 2275             ;
 2276 
 2277             final OnnxType type;
 2278             final Quantifier quantifier;
 2279 
 2280             OutputParameter(OnnxType type, Quantifier quantifier) {
 2281                 this.type = type;
 2282                 this.quantifier = quantifier;
 2283             }
 2284 
 2285             @Override
 2286             public OnnxType type() {
 2287                 return type;
 2288             }
 2289 
 2290             @Override
 2291             public Quantifier quantifier() {
 2292                 return quantifier;
 2293             }
 2294         }
 2295 
 2296         public static final OnnxSchema SCHEMA = new OnnxSchemaRecord(
 2297                 NAME,
 2298                 List.of(Attribute.values()),
 2299                 List.of(TypeConstraint.values()),
 2300                 List.of(InputParameter.values()),
 2301                 List.of(OutputParameter.values())
 2302         );
 2303 
 2304         public BatchNormalization(ExternalizedOp def) {
 2305             super(SCHEMA, def);
 2306         }
 2307 
 2308         BatchNormalization(BatchNormalization that, CopyContext cc) {
 2309             super(that, cc);
 2310         }
 2311 
 2312         @Override
 2313         public BatchNormalization transform(CopyContext cc, OpTransformer ot) {
 2314             return new BatchNormalization(this, cc);
 2315         }
 2316 
 2317         BatchNormalization(TypeElement resultType, Set<OutputParameter> optionalOutputs, Value X, Value scale, Value B, Value input_mean, Value input_var, java.util.Optional<Float> epsilon, java.util.Optional<Integer> training_mode, java.util.Optional<Float> momentum) {
 2318             super(SCHEMA, resultType, optionalOutputs, List.of(X, scale, B, input_mean, input_var), List.of(epsilon, training_mode, momentum));
 2319         }
 2320 
 2321         @Override
 2322         public SequencedSet<OnnxParameter> onnxOutputs() {
 2323             return onnxOutputs(SCHEMA);
 2324         }
 2325 
 2326         @Override
 2327         public SequencedMap<OnnxParameter, Object> onnxInputs() {
 2328             return onnxInputs(SCHEMA, List.of(X(), scale(), B(), input_mean(), input_var()));
 2329         }
 2330 
 2331         public Value X() {
 2332             return operands().get(0);
 2333         }
 2334 
 2335         public Value scale() {
 2336             return operands().get(1);
 2337         }
 2338 
 2339         public Value B() {
 2340             return operands().get(2);
 2341         }
 2342 
 2343         public Value input_mean() {
 2344             return operands().get(3);
 2345         }
 2346 
 2347         public Value input_var() {
 2348             return operands().get(4);
 2349         }
 2350 
 2351         public java.util.Optional<Float> epsilon() {
 2352             Float epsilon = Attribute.epsilon.access(Float.class, onnxAttributes);
 2353             return java.util.Optional.ofNullable(epsilon);
 2354         }
 2355 
 2356         public java.util.Optional<Integer> training_mode() {
 2357             Integer training_mode = Attribute.training_mode.access(Integer.class, onnxAttributes);
 2358             return java.util.Optional.ofNullable(training_mode);
 2359         }
 2360 
 2361         public java.util.Optional<Float> momentum() {
 2362             Float momentum = Attribute.momentum.access(Float.class, onnxAttributes);
 2363             return java.util.Optional.ofNullable(momentum);
 2364         }
 2365 
 2366     }
 2367 
 2368     public static BatchNormalization BatchNormalization(TypeElement resultType, Set<BatchNormalization.OutputParameter> optionalOutputs, Value X, Value scale, Value B, Value input_mean, Value input_var, java.util.Optional<Float> epsilon, java.util.Optional<Integer> training_mode, java.util.Optional<Float> momentum) {
 2369         return new BatchNormalization(resultType, optionalOutputs, X, scale, B, input_mean, input_var, epsilon, training_mode, momentum);
 2370     }
 2371 
 2372     @OpFactory.OpDeclaration(Bernoulli.NAME)
 2373     public static final class Bernoulli extends OnnxOp {
 2374         public static final String NAME = "Bernoulli";
 2375 
 2376         public enum Attribute implements OnnxAttribute {
 2377             seed(Float.class, true, null),
 2378             dtype(Integer.class, true, null),
 2379             ;
 2380 
 2381                 final Class<?> t;
 2382                 final boolean optional;
 2383                 final Object defaultValue;
 2384 
 2385                 Attribute(Class<?> type, boolean optional, Object defaultValue) {
 2386                     this.t = type;
 2387                     this.optional = optional;
 2388                     this.defaultValue = defaultValue;
 2389                     assert optional || defaultValue == null;
 2390                 }
 2391 
 2392                 public Class<?> type() {
 2393                     return t;
 2394                 }
 2395 
 2396                 public boolean isOptional() {
 2397                     return optional;
 2398                 }
 2399 
 2400                 public Object defaultValue() {
 2401                     return defaultValue;
 2402                 }
 2403         }
 2404 
 2405         public enum TypeConstraint implements OnnxTypeConstraint {
 2406             T1(new OnnxType.TypeVariable("T1", List.of(OnnxType.tensor(OnnxType.bfloat16()), OnnxType.tensor(OnnxType.float16()), OnnxType.tensor(OnnxType.float32()), OnnxType.tensor(OnnxType.float64())))),
 2407             T2(new OnnxType.TypeVariable("T2", List.of(OnnxType.tensor(OnnxType.uint8()), OnnxType.tensor(OnnxType.uint16()), OnnxType.tensor(OnnxType.uint32()), OnnxType.tensor(OnnxType.uint64()), OnnxType.tensor(OnnxType.int8()), OnnxType.tensor(OnnxType.int16()), OnnxType.tensor(OnnxType.int32()), OnnxType.tensor(OnnxType.int64()), OnnxType.tensor(OnnxType.bfloat16()), OnnxType.tensor(OnnxType.float16()), OnnxType.tensor(OnnxType.float32()), OnnxType.tensor(OnnxType.float64()), OnnxType.tensor(OnnxType.bool())))),
 2408             ;
 2409 
 2410             final OnnxType.TypeVariable typeVariable;
 2411 
 2412             TypeConstraint(OnnxType.TypeVariable typeVariable) {
 2413                 assert typeVariable.name().equals(name());
 2414                 this.typeVariable = typeVariable;
 2415             }
 2416 
 2417             @Override
 2418             public OnnxType.TypeVariable typeVariable() {
 2419                 return typeVariable;
 2420             }
 2421         }
 2422 
 2423         public enum InputParameter implements OnnxParameter {
 2424             input(TypeConstraint.T1.typeVariable(), Quantifier.REQUIRED),
 2425             ;
 2426 
 2427             final OnnxType type;
 2428             final Quantifier quantifier;
 2429 
 2430             InputParameter(OnnxType type, Quantifier quantifier) {
 2431                 this.type = type;
 2432                 this.quantifier = quantifier;
 2433             }
 2434 
 2435             @Override
 2436             public OnnxType type() {
 2437                 return type;
 2438             }
 2439 
 2440             @Override
 2441             public Quantifier quantifier() {
 2442                 return quantifier;
 2443             }
 2444         }
 2445 
 2446         public enum OutputParameter implements OnnxParameter {
 2447             output(TypeConstraint.T2.typeVariable(), Quantifier.REQUIRED),
 2448             ;
 2449 
 2450             final OnnxType type;
 2451             final Quantifier quantifier;
 2452 
 2453             OutputParameter(OnnxType type, Quantifier quantifier) {
 2454                 this.type = type;
 2455                 this.quantifier = quantifier;
 2456             }
 2457 
 2458             @Override
 2459             public OnnxType type() {
 2460                 return type;
 2461             }
 2462 
 2463             @Override
 2464             public Quantifier quantifier() {
 2465                 return quantifier;
 2466             }
 2467         }
 2468 
 2469         public static final OnnxSchema SCHEMA = new OnnxSchemaRecord(
 2470                 NAME,
 2471                 List.of(Attribute.values()),
 2472                 List.of(TypeConstraint.values()),
 2473                 List.of(InputParameter.values()),
 2474                 List.of(OutputParameter.values())
 2475         );
 2476 
 2477         public Bernoulli(ExternalizedOp def) {
 2478             super(SCHEMA, def);
 2479         }
 2480 
 2481         Bernoulli(Bernoulli that, CopyContext cc) {
 2482             super(that, cc);
 2483         }
 2484 
 2485         @Override
 2486         public Bernoulli transform(CopyContext cc, OpTransformer ot) {
 2487             return new Bernoulli(this, cc);
 2488         }
 2489 
 2490         Bernoulli(TypeElement resultType, Value input, java.util.Optional<Float> seed, java.util.Optional<Integer> dtype) {
 2491             super(SCHEMA, resultType, Set.of(), List.of(input), List.of(seed, dtype));
 2492         }
 2493 
 2494         @Override
 2495         public SequencedSet<OnnxParameter> onnxOutputs() {
 2496             return onnxOutputs(SCHEMA);
 2497         }
 2498 
 2499         @Override
 2500         public SequencedMap<OnnxParameter, Object> onnxInputs() {
 2501             return onnxInputs(SCHEMA, List.of(input()));
 2502         }
 2503 
 2504         public Value input() {
 2505             return operands().get(0);
 2506         }
 2507 
 2508         public java.util.Optional<Float> seed() {
 2509             Float seed = Attribute.seed.access(Float.class, onnxAttributes);
 2510             return java.util.Optional.ofNullable(seed);
 2511         }
 2512 
 2513         public java.util.Optional<Integer> dtype() {
 2514             Integer dtype = Attribute.dtype.access(Integer.class, onnxAttributes);
 2515             return java.util.Optional.ofNullable(dtype);
 2516         }
 2517 
 2518     }
 2519 
 2520     public static Bernoulli Bernoulli(TypeElement resultType, Value input, java.util.Optional<Float> seed, java.util.Optional<Integer> dtype) {
 2521         return new Bernoulli(resultType, input, seed, dtype);
 2522     }
 2523 
 2524     @OpFactory.OpDeclaration(Binarizer.NAME)
 2525     public static final class Binarizer extends OnnxOp {
 2526         public static final String NAME = "Binarizer";
 2527 
 2528         public enum Attribute implements OnnxAttribute {
 2529             threshold(Float.class, true, 0.0f),
 2530             ;
 2531 
 2532                 final Class<?> t;
 2533                 final boolean optional;
 2534                 final Object defaultValue;
 2535 
 2536                 Attribute(Class<?> type, boolean optional, Object defaultValue) {
 2537                     this.t = type;
 2538                     this.optional = optional;
 2539                     this.defaultValue = defaultValue;
 2540                     assert optional || defaultValue == null;
 2541                 }
 2542 
 2543                 public Class<?> type() {
 2544                     return t;
 2545                 }
 2546 
 2547                 public boolean isOptional() {
 2548                     return optional;
 2549                 }
 2550 
 2551                 public Object defaultValue() {
 2552                     return defaultValue;
 2553                 }
 2554         }
 2555 
 2556         public enum TypeConstraint implements OnnxTypeConstraint {
 2557             T(new OnnxType.TypeVariable("T", List.of(OnnxType.tensor(OnnxType.float32()), OnnxType.tensor(OnnxType.float64()), OnnxType.tensor(OnnxType.int64()), OnnxType.tensor(OnnxType.int32())))),
 2558             ;
 2559 
 2560             final OnnxType.TypeVariable typeVariable;
 2561 
 2562             TypeConstraint(OnnxType.TypeVariable typeVariable) {
 2563                 assert typeVariable.name().equals(name());
 2564                 this.typeVariable = typeVariable;
 2565             }
 2566 
 2567             @Override
 2568             public OnnxType.TypeVariable typeVariable() {
 2569                 return typeVariable;
 2570             }
 2571         }
 2572 
 2573         public enum InputParameter implements OnnxParameter {
 2574             X(TypeConstraint.T.typeVariable(), Quantifier.REQUIRED),
 2575             ;
 2576 
 2577             final OnnxType type;
 2578             final Quantifier quantifier;
 2579 
 2580             InputParameter(OnnxType type, Quantifier quantifier) {
 2581                 this.type = type;
 2582                 this.quantifier = quantifier;
 2583             }
 2584 
 2585             @Override
 2586             public OnnxType type() {
 2587                 return type;
 2588             }
 2589 
 2590             @Override
 2591             public Quantifier quantifier() {
 2592                 return quantifier;
 2593             }
 2594         }
 2595 
 2596         public enum OutputParameter implements OnnxParameter {
 2597             Y(TypeConstraint.T.typeVariable(), Quantifier.REQUIRED),
 2598             ;
 2599 
 2600             final OnnxType type;
 2601             final Quantifier quantifier;
 2602 
 2603             OutputParameter(OnnxType type, Quantifier quantifier) {
 2604                 this.type = type;
 2605                 this.quantifier = quantifier;
 2606             }
 2607 
 2608             @Override
 2609             public OnnxType type() {
 2610                 return type;
 2611             }
 2612 
 2613             @Override
 2614             public Quantifier quantifier() {
 2615                 return quantifier;
 2616             }
 2617         }
 2618 
 2619         public static final OnnxSchema SCHEMA = new OnnxSchemaRecord(
 2620                 NAME,
 2621                 List.of(Attribute.values()),
 2622                 List.of(TypeConstraint.values()),
 2623                 List.of(InputParameter.values()),
 2624                 List.of(OutputParameter.values())
 2625         );
 2626 
 2627         public Binarizer(ExternalizedOp def) {
 2628             super(SCHEMA, def);
 2629         }
 2630 
 2631         Binarizer(Binarizer that, CopyContext cc) {
 2632             super(that, cc);
 2633         }
 2634 
 2635         @Override
 2636         public Binarizer transform(CopyContext cc, OpTransformer ot) {
 2637             return new Binarizer(this, cc);
 2638         }
 2639 
 2640         Binarizer(TypeElement resultType, Value X, java.util.Optional<Float> threshold) {
 2641             super(SCHEMA, resultType, Set.of(), List.of(X), List.of(threshold));
 2642         }
 2643 
 2644         @Override
 2645         public SequencedSet<OnnxParameter> onnxOutputs() {
 2646             return onnxOutputs(SCHEMA);
 2647         }
 2648 
 2649         @Override
 2650         public SequencedMap<OnnxParameter, Object> onnxInputs() {
 2651             return onnxInputs(SCHEMA, List.of(X()));
 2652         }
 2653 
 2654         public Value X() {
 2655             return operands().get(0);
 2656         }
 2657 
 2658         public java.util.Optional<Float> threshold() {
 2659             Float threshold = Attribute.threshold.access(Float.class, onnxAttributes);
 2660             return java.util.Optional.ofNullable(threshold);
 2661         }
 2662 
 2663     }
 2664 
 2665     public static Binarizer Binarizer(TypeElement resultType, Value X, java.util.Optional<Float> threshold) {
 2666         return new Binarizer(resultType, X, threshold);
 2667     }
 2668 
 2669     @OpFactory.OpDeclaration(BitShift.NAME)
 2670     public static final class BitShift extends OnnxOp {
 2671         public static final String NAME = "BitShift";
 2672 
 2673         public enum Attribute implements OnnxAttribute {
 2674             direction(String.class, false, null),
 2675             ;
 2676 
 2677                 final Class<?> t;
 2678                 final boolean optional;
 2679                 final Object defaultValue;
 2680 
 2681                 Attribute(Class<?> type, boolean optional, Object defaultValue) {
 2682                     this.t = type;
 2683                     this.optional = optional;
 2684                     this.defaultValue = defaultValue;
 2685                     assert optional || defaultValue == null;
 2686                 }
 2687 
 2688                 public Class<?> type() {
 2689                     return t;
 2690                 }
 2691 
 2692                 public boolean isOptional() {
 2693                     return optional;
 2694                 }
 2695 
 2696                 public Object defaultValue() {
 2697                     return defaultValue;
 2698                 }
 2699         }
 2700 
 2701         public enum TypeConstraint implements OnnxTypeConstraint {
 2702             T(new OnnxType.TypeVariable("T", List.of(OnnxType.tensor(OnnxType.uint8()), OnnxType.tensor(OnnxType.uint16()), OnnxType.tensor(OnnxType.uint32()), OnnxType.tensor(OnnxType.uint64())))),
 2703             ;
 2704 
 2705             final OnnxType.TypeVariable typeVariable;
 2706 
 2707             TypeConstraint(OnnxType.TypeVariable typeVariable) {
 2708                 assert typeVariable.name().equals(name());
 2709                 this.typeVariable = typeVariable;
 2710             }
 2711 
 2712             @Override
 2713             public OnnxType.TypeVariable typeVariable() {
 2714                 return typeVariable;
 2715             }
 2716         }
 2717 
 2718         public enum InputParameter implements OnnxParameter {
 2719             X(TypeConstraint.T.typeVariable(), Quantifier.REQUIRED),
 2720             Y(TypeConstraint.T.typeVariable(), Quantifier.REQUIRED),
 2721             ;
 2722 
 2723             final OnnxType type;
 2724             final Quantifier quantifier;
 2725 
 2726             InputParameter(OnnxType type, Quantifier quantifier) {
 2727                 this.type = type;
 2728                 this.quantifier = quantifier;
 2729             }
 2730 
 2731             @Override
 2732             public OnnxType type() {
 2733                 return type;
 2734             }
 2735 
 2736             @Override
 2737             public Quantifier quantifier() {
 2738                 return quantifier;
 2739             }
 2740         }
 2741 
 2742         public enum OutputParameter implements OnnxParameter {
 2743             Z(TypeConstraint.T.typeVariable(), Quantifier.REQUIRED),
 2744             ;
 2745 
 2746             final OnnxType type;
 2747             final Quantifier quantifier;
 2748 
 2749             OutputParameter(OnnxType type, Quantifier quantifier) {
 2750                 this.type = type;
 2751                 this.quantifier = quantifier;
 2752             }
 2753 
 2754             @Override
 2755             public OnnxType type() {
 2756                 return type;
 2757             }
 2758 
 2759             @Override
 2760             public Quantifier quantifier() {
 2761                 return quantifier;
 2762             }
 2763         }
 2764 
 2765         public static final OnnxSchema SCHEMA = new OnnxSchemaRecord(
 2766                 NAME,
 2767                 List.of(Attribute.values()),
 2768                 List.of(TypeConstraint.values()),
 2769                 List.of(InputParameter.values()),
 2770                 List.of(OutputParameter.values())
 2771         );
 2772 
 2773         public BitShift(ExternalizedOp def) {
 2774             super(SCHEMA, def);
 2775         }
 2776 
 2777         BitShift(BitShift that, CopyContext cc) {
 2778             super(that, cc);
 2779         }
 2780 
 2781         @Override
 2782         public BitShift transform(CopyContext cc, OpTransformer ot) {
 2783             return new BitShift(this, cc);
 2784         }
 2785 
 2786         BitShift(TypeElement resultType, Value X, Value Y, String direction) {
 2787             super(SCHEMA, resultType, Set.of(), List.of(X, Y), List.of(direction));
 2788         }
 2789 
 2790         @Override
 2791         public SequencedSet<OnnxParameter> onnxOutputs() {
 2792             return onnxOutputs(SCHEMA);
 2793         }
 2794 
 2795         @Override
 2796         public SequencedMap<OnnxParameter, Object> onnxInputs() {
 2797             return onnxInputs(SCHEMA, List.of(X(), Y()));
 2798         }
 2799 
 2800         public Value X() {
 2801             return operands().get(0);
 2802         }
 2803 
 2804         public Value Y() {
 2805             return operands().get(1);
 2806         }
 2807 
 2808         public String direction() {
 2809             String direction = Attribute.direction.access(String.class, onnxAttributes);
 2810             return direction;
 2811         }
 2812 
 2813     }
 2814 
 2815     public static BitShift BitShift(TypeElement resultType, Value X, Value Y, String direction) {
 2816         return new BitShift(resultType, X, Y, direction);
 2817     }
 2818 
 2819     @OpFactory.OpDeclaration(BitwiseAnd.NAME)
 2820     public static final class BitwiseAnd extends OnnxOp {
 2821         public static final String NAME = "BitwiseAnd";
 2822 
 2823         public enum Attribute implements OnnxAttribute.None { }
 2824 
 2825         public enum TypeConstraint implements OnnxTypeConstraint {
 2826             T(new OnnxType.TypeVariable("T", List.of(OnnxType.tensor(OnnxType.uint8()), OnnxType.tensor(OnnxType.uint16()), OnnxType.tensor(OnnxType.uint32()), OnnxType.tensor(OnnxType.uint64()), OnnxType.tensor(OnnxType.int8()), OnnxType.tensor(OnnxType.int16()), OnnxType.tensor(OnnxType.int32()), OnnxType.tensor(OnnxType.int64())))),
 2827             ;
 2828 
 2829             final OnnxType.TypeVariable typeVariable;
 2830 
 2831             TypeConstraint(OnnxType.TypeVariable typeVariable) {
 2832                 assert typeVariable.name().equals(name());
 2833                 this.typeVariable = typeVariable;
 2834             }
 2835 
 2836             @Override
 2837             public OnnxType.TypeVariable typeVariable() {
 2838                 return typeVariable;
 2839             }
 2840         }
 2841 
 2842         public enum InputParameter implements OnnxParameter {
 2843             A(TypeConstraint.T.typeVariable(), Quantifier.REQUIRED),
 2844             B(TypeConstraint.T.typeVariable(), Quantifier.REQUIRED),
 2845             ;
 2846 
 2847             final OnnxType type;
 2848             final Quantifier quantifier;
 2849 
 2850             InputParameter(OnnxType type, Quantifier quantifier) {
 2851                 this.type = type;
 2852                 this.quantifier = quantifier;
 2853             }
 2854 
 2855             @Override
 2856             public OnnxType type() {
 2857                 return type;
 2858             }
 2859 
 2860             @Override
 2861             public Quantifier quantifier() {
 2862                 return quantifier;
 2863             }
 2864         }
 2865 
 2866         public enum OutputParameter implements OnnxParameter {
 2867             C(TypeConstraint.T.typeVariable(), Quantifier.REQUIRED),
 2868             ;
 2869 
 2870             final OnnxType type;
 2871             final Quantifier quantifier;
 2872 
 2873             OutputParameter(OnnxType type, Quantifier quantifier) {
 2874                 this.type = type;
 2875                 this.quantifier = quantifier;
 2876             }
 2877 
 2878             @Override
 2879             public OnnxType type() {
 2880                 return type;
 2881             }
 2882 
 2883             @Override
 2884             public Quantifier quantifier() {
 2885                 return quantifier;
 2886             }
 2887         }
 2888 
 2889         public static final OnnxSchema SCHEMA = new OnnxSchemaRecord(
 2890                 NAME,
 2891                 List.of(Attribute.values()),
 2892                 List.of(TypeConstraint.values()),
 2893                 List.of(InputParameter.values()),
 2894                 List.of(OutputParameter.values())
 2895         );
 2896 
 2897         public BitwiseAnd(ExternalizedOp def) {
 2898             super(SCHEMA, def);
 2899         }
 2900 
 2901         BitwiseAnd(BitwiseAnd that, CopyContext cc) {
 2902             super(that, cc);
 2903         }
 2904 
 2905         @Override
 2906         public BitwiseAnd transform(CopyContext cc, OpTransformer ot) {
 2907             return new BitwiseAnd(this, cc);
 2908         }
 2909 
 2910         BitwiseAnd(TypeElement resultType, Value A, Value B) {
 2911             super(SCHEMA, resultType, Set.of(), List.of(A, B), List.of());
 2912         }
 2913 
 2914         @Override
 2915         public SequencedSet<OnnxParameter> onnxOutputs() {
 2916             return onnxOutputs(SCHEMA);
 2917         }
 2918 
 2919         @Override
 2920         public SequencedMap<OnnxParameter, Object> onnxInputs() {
 2921             return onnxInputs(SCHEMA, List.of(A(), B()));
 2922         }
 2923 
 2924         public Value A() {
 2925             return operands().get(0);
 2926         }
 2927 
 2928         public Value B() {
 2929             return operands().get(1);
 2930         }
 2931 
 2932     }
 2933 
 2934     public static BitwiseAnd BitwiseAnd(TypeElement resultType, Value A, Value B) {
 2935         return new BitwiseAnd(resultType, A, B);
 2936     }
 2937 
 2938     @OpFactory.OpDeclaration(BitwiseNot.NAME)
 2939     public static final class BitwiseNot extends OnnxOp {
 2940         public static final String NAME = "BitwiseNot";
 2941 
 2942         public enum Attribute implements OnnxAttribute.None { }
 2943 
 2944         public enum TypeConstraint implements OnnxTypeConstraint {
 2945             T(new OnnxType.TypeVariable("T", List.of(OnnxType.tensor(OnnxType.uint8()), OnnxType.tensor(OnnxType.uint16()), OnnxType.tensor(OnnxType.uint32()), OnnxType.tensor(OnnxType.uint64()), OnnxType.tensor(OnnxType.int8()), OnnxType.tensor(OnnxType.int16()), OnnxType.tensor(OnnxType.int32()), OnnxType.tensor(OnnxType.int64())))),
 2946             ;
 2947 
 2948             final OnnxType.TypeVariable typeVariable;
 2949 
 2950             TypeConstraint(OnnxType.TypeVariable typeVariable) {
 2951                 assert typeVariable.name().equals(name());
 2952                 this.typeVariable = typeVariable;
 2953             }
 2954 
 2955             @Override
 2956             public OnnxType.TypeVariable typeVariable() {
 2957                 return typeVariable;
 2958             }
 2959         }
 2960 
 2961         public enum InputParameter implements OnnxParameter {
 2962             X(TypeConstraint.T.typeVariable(), Quantifier.REQUIRED),
 2963             ;
 2964 
 2965             final OnnxType type;
 2966             final Quantifier quantifier;
 2967 
 2968             InputParameter(OnnxType type, Quantifier quantifier) {
 2969                 this.type = type;
 2970                 this.quantifier = quantifier;
 2971             }
 2972 
 2973             @Override
 2974             public OnnxType type() {
 2975                 return type;
 2976             }
 2977 
 2978             @Override
 2979             public Quantifier quantifier() {
 2980                 return quantifier;
 2981             }
 2982         }
 2983 
 2984         public enum OutputParameter implements OnnxParameter {
 2985             Y(TypeConstraint.T.typeVariable(), Quantifier.REQUIRED),
 2986             ;
 2987 
 2988             final OnnxType type;
 2989             final Quantifier quantifier;
 2990 
 2991             OutputParameter(OnnxType type, Quantifier quantifier) {
 2992                 this.type = type;
 2993                 this.quantifier = quantifier;
 2994             }
 2995 
 2996             @Override
 2997             public OnnxType type() {
 2998                 return type;
 2999             }
 3000 
 3001             @Override
 3002             public Quantifier quantifier() {
 3003                 return quantifier;
 3004             }
 3005         }
 3006 
 3007         public static final OnnxSchema SCHEMA = new OnnxSchemaRecord(
 3008                 NAME,
 3009                 List.of(Attribute.values()),
 3010                 List.of(TypeConstraint.values()),
 3011                 List.of(InputParameter.values()),
 3012                 List.of(OutputParameter.values())
 3013         );
 3014 
 3015         public BitwiseNot(ExternalizedOp def) {
 3016             super(SCHEMA, def);
 3017         }
 3018 
 3019         BitwiseNot(BitwiseNot that, CopyContext cc) {
 3020             super(that, cc);
 3021         }
 3022 
 3023         @Override
 3024         public BitwiseNot transform(CopyContext cc, OpTransformer ot) {
 3025             return new BitwiseNot(this, cc);
 3026         }
 3027 
 3028         BitwiseNot(TypeElement resultType, Value X) {
 3029             super(SCHEMA, resultType, Set.of(), List.of(X), List.of());
 3030         }
 3031 
 3032         @Override
 3033         public SequencedSet<OnnxParameter> onnxOutputs() {
 3034             return onnxOutputs(SCHEMA);
 3035         }
 3036 
 3037         @Override
 3038         public SequencedMap<OnnxParameter, Object> onnxInputs() {
 3039             return onnxInputs(SCHEMA, List.of(X()));
 3040         }
 3041 
 3042         public Value X() {
 3043             return operands().get(0);
 3044         }
 3045 
 3046     }
 3047 
 3048     public static BitwiseNot BitwiseNot(TypeElement resultType, Value X) {
 3049         return new BitwiseNot(resultType, X);
 3050     }
 3051 
 3052     @OpFactory.OpDeclaration(BitwiseOr.NAME)
 3053     public static final class BitwiseOr extends OnnxOp {
 3054         public static final String NAME = "BitwiseOr";
 3055 
 3056         public enum Attribute implements OnnxAttribute.None { }
 3057 
 3058         public enum TypeConstraint implements OnnxTypeConstraint {
 3059             T(new OnnxType.TypeVariable("T", List.of(OnnxType.tensor(OnnxType.uint8()), OnnxType.tensor(OnnxType.uint16()), OnnxType.tensor(OnnxType.uint32()), OnnxType.tensor(OnnxType.uint64()), OnnxType.tensor(OnnxType.int8()), OnnxType.tensor(OnnxType.int16()), OnnxType.tensor(OnnxType.int32()), OnnxType.tensor(OnnxType.int64())))),
 3060             ;
 3061 
 3062             final OnnxType.TypeVariable typeVariable;
 3063 
 3064             TypeConstraint(OnnxType.TypeVariable typeVariable) {
 3065                 assert typeVariable.name().equals(name());
 3066                 this.typeVariable = typeVariable;
 3067             }
 3068 
 3069             @Override
 3070             public OnnxType.TypeVariable typeVariable() {
 3071                 return typeVariable;
 3072             }
 3073         }
 3074 
 3075         public enum InputParameter implements OnnxParameter {
 3076             A(TypeConstraint.T.typeVariable(), Quantifier.REQUIRED),
 3077             B(TypeConstraint.T.typeVariable(), Quantifier.REQUIRED),
 3078             ;
 3079 
 3080             final OnnxType type;
 3081             final Quantifier quantifier;
 3082 
 3083             InputParameter(OnnxType type, Quantifier quantifier) {
 3084                 this.type = type;
 3085                 this.quantifier = quantifier;
 3086             }
 3087 
 3088             @Override
 3089             public OnnxType type() {
 3090                 return type;
 3091             }
 3092 
 3093             @Override
 3094             public Quantifier quantifier() {
 3095                 return quantifier;
 3096             }
 3097         }
 3098 
 3099         public enum OutputParameter implements OnnxParameter {
 3100             C(TypeConstraint.T.typeVariable(), Quantifier.REQUIRED),
 3101             ;
 3102 
 3103             final OnnxType type;
 3104             final Quantifier quantifier;
 3105 
 3106             OutputParameter(OnnxType type, Quantifier quantifier) {
 3107                 this.type = type;
 3108                 this.quantifier = quantifier;
 3109             }
 3110 
 3111             @Override
 3112             public OnnxType type() {
 3113                 return type;
 3114             }
 3115 
 3116             @Override
 3117             public Quantifier quantifier() {
 3118                 return quantifier;
 3119             }
 3120         }
 3121 
 3122         public static final OnnxSchema SCHEMA = new OnnxSchemaRecord(
 3123                 NAME,
 3124                 List.of(Attribute.values()),
 3125                 List.of(TypeConstraint.values()),
 3126                 List.of(InputParameter.values()),
 3127                 List.of(OutputParameter.values())
 3128         );
 3129 
 3130         public BitwiseOr(ExternalizedOp def) {
 3131             super(SCHEMA, def);
 3132         }
 3133 
 3134         BitwiseOr(BitwiseOr that, CopyContext cc) {
 3135             super(that, cc);
 3136         }
 3137 
 3138         @Override
 3139         public BitwiseOr transform(CopyContext cc, OpTransformer ot) {
 3140             return new BitwiseOr(this, cc);
 3141         }
 3142 
 3143         BitwiseOr(TypeElement resultType, Value A, Value B) {
 3144             super(SCHEMA, resultType, Set.of(), List.of(A, B), List.of());
 3145         }
 3146 
 3147         @Override
 3148         public SequencedSet<OnnxParameter> onnxOutputs() {
 3149             return onnxOutputs(SCHEMA);
 3150         }
 3151 
 3152         @Override
 3153         public SequencedMap<OnnxParameter, Object> onnxInputs() {
 3154             return onnxInputs(SCHEMA, List.of(A(), B()));
 3155         }
 3156 
 3157         public Value A() {
 3158             return operands().get(0);
 3159         }
 3160 
 3161         public Value B() {
 3162             return operands().get(1);
 3163         }
 3164 
 3165     }
 3166 
 3167     public static BitwiseOr BitwiseOr(TypeElement resultType, Value A, Value B) {
 3168         return new BitwiseOr(resultType, A, B);
 3169     }
 3170 
 3171     @OpFactory.OpDeclaration(BitwiseXor.NAME)
 3172     public static final class BitwiseXor extends OnnxOp {
 3173         public static final String NAME = "BitwiseXor";
 3174 
 3175         public enum Attribute implements OnnxAttribute.None { }
 3176 
 3177         public enum TypeConstraint implements OnnxTypeConstraint {
 3178             T(new OnnxType.TypeVariable("T", List.of(OnnxType.tensor(OnnxType.uint8()), OnnxType.tensor(OnnxType.uint16()), OnnxType.tensor(OnnxType.uint32()), OnnxType.tensor(OnnxType.uint64()), OnnxType.tensor(OnnxType.int8()), OnnxType.tensor(OnnxType.int16()), OnnxType.tensor(OnnxType.int32()), OnnxType.tensor(OnnxType.int64())))),
 3179             ;
 3180 
 3181             final OnnxType.TypeVariable typeVariable;
 3182 
 3183             TypeConstraint(OnnxType.TypeVariable typeVariable) {
 3184                 assert typeVariable.name().equals(name());
 3185                 this.typeVariable = typeVariable;
 3186             }
 3187 
 3188             @Override
 3189             public OnnxType.TypeVariable typeVariable() {
 3190                 return typeVariable;
 3191             }
 3192         }
 3193 
 3194         public enum InputParameter implements OnnxParameter {
 3195             A(TypeConstraint.T.typeVariable(), Quantifier.REQUIRED),
 3196             B(TypeConstraint.T.typeVariable(), Quantifier.REQUIRED),
 3197             ;
 3198 
 3199             final OnnxType type;
 3200             final Quantifier quantifier;
 3201 
 3202             InputParameter(OnnxType type, Quantifier quantifier) {
 3203                 this.type = type;
 3204                 this.quantifier = quantifier;
 3205             }
 3206 
 3207             @Override
 3208             public OnnxType type() {
 3209                 return type;
 3210             }
 3211 
 3212             @Override
 3213             public Quantifier quantifier() {
 3214                 return quantifier;
 3215             }
 3216         }
 3217 
 3218         public enum OutputParameter implements OnnxParameter {
 3219             C(TypeConstraint.T.typeVariable(), Quantifier.REQUIRED),
 3220             ;
 3221 
 3222             final OnnxType type;
 3223             final Quantifier quantifier;
 3224 
 3225             OutputParameter(OnnxType type, Quantifier quantifier) {
 3226                 this.type = type;
 3227                 this.quantifier = quantifier;
 3228             }
 3229 
 3230             @Override
 3231             public OnnxType type() {
 3232                 return type;
 3233             }
 3234 
 3235             @Override
 3236             public Quantifier quantifier() {
 3237                 return quantifier;
 3238             }
 3239         }
 3240 
 3241         public static final OnnxSchema SCHEMA = new OnnxSchemaRecord(
 3242                 NAME,
 3243                 List.of(Attribute.values()),
 3244                 List.of(TypeConstraint.values()),
 3245                 List.of(InputParameter.values()),
 3246                 List.of(OutputParameter.values())
 3247         );
 3248 
 3249         public BitwiseXor(ExternalizedOp def) {
 3250             super(SCHEMA, def);
 3251         }
 3252 
 3253         BitwiseXor(BitwiseXor that, CopyContext cc) {
 3254             super(that, cc);
 3255         }
 3256 
 3257         @Override
 3258         public BitwiseXor transform(CopyContext cc, OpTransformer ot) {
 3259             return new BitwiseXor(this, cc);
 3260         }
 3261 
 3262         BitwiseXor(TypeElement resultType, Value A, Value B) {
 3263             super(SCHEMA, resultType, Set.of(), List.of(A, B), List.of());
 3264         }
 3265 
 3266         @Override
 3267         public SequencedSet<OnnxParameter> onnxOutputs() {
 3268             return onnxOutputs(SCHEMA);
 3269         }
 3270 
 3271         @Override
 3272         public SequencedMap<OnnxParameter, Object> onnxInputs() {
 3273             return onnxInputs(SCHEMA, List.of(A(), B()));
 3274         }
 3275 
 3276         public Value A() {
 3277             return operands().get(0);
 3278         }
 3279 
 3280         public Value B() {
 3281             return operands().get(1);
 3282         }
 3283 
 3284     }
 3285 
 3286     public static BitwiseXor BitwiseXor(TypeElement resultType, Value A, Value B) {
 3287         return new BitwiseXor(resultType, A, B);
 3288     }
 3289 
 3290     @OpFactory.OpDeclaration(BlackmanWindow.NAME)
 3291     public static final class BlackmanWindow extends OnnxOp {
 3292         public static final String NAME = "BlackmanWindow";
 3293 
 3294         public enum Attribute implements OnnxAttribute {
 3295             periodic(Integer.class, true, 1),
 3296             output_datatype(Integer.class, true, 1),
 3297             ;
 3298 
 3299                 final Class<?> t;
 3300                 final boolean optional;
 3301                 final Object defaultValue;
 3302 
 3303                 Attribute(Class<?> type, boolean optional, Object defaultValue) {
 3304                     this.t = type;
 3305                     this.optional = optional;
 3306                     this.defaultValue = defaultValue;
 3307                     assert optional || defaultValue == null;
 3308                 }
 3309 
 3310                 public Class<?> type() {
 3311                     return t;
 3312                 }
 3313 
 3314                 public boolean isOptional() {
 3315                     return optional;
 3316                 }
 3317 
 3318                 public Object defaultValue() {
 3319                     return defaultValue;
 3320                 }
 3321         }
 3322 
 3323         public enum TypeConstraint implements OnnxTypeConstraint {
 3324             T1(new OnnxType.TypeVariable("T1", List.of(OnnxType.tensor(OnnxType.int32()), OnnxType.tensor(OnnxType.int64())))),
 3325             T2(new OnnxType.TypeVariable("T2", List.of(OnnxType.tensor(OnnxType.uint8()), OnnxType.tensor(OnnxType.uint16()), OnnxType.tensor(OnnxType.uint32()), OnnxType.tensor(OnnxType.uint64()), OnnxType.tensor(OnnxType.int8()), OnnxType.tensor(OnnxType.int16()), OnnxType.tensor(OnnxType.int32()), OnnxType.tensor(OnnxType.int64()), OnnxType.tensor(OnnxType.float16()), OnnxType.tensor(OnnxType.float32()), OnnxType.tensor(OnnxType.float64()), OnnxType.tensor(OnnxType.bfloat16())))),
 3326             ;
 3327 
 3328             final OnnxType.TypeVariable typeVariable;
 3329 
 3330             TypeConstraint(OnnxType.TypeVariable typeVariable) {
 3331                 assert typeVariable.name().equals(name());
 3332                 this.typeVariable = typeVariable;
 3333             }
 3334 
 3335             @Override
 3336             public OnnxType.TypeVariable typeVariable() {
 3337                 return typeVariable;
 3338             }
 3339         }
 3340 
 3341         public enum InputParameter implements OnnxParameter {
 3342             size(TypeConstraint.T1.typeVariable(), Quantifier.REQUIRED),
 3343             ;
 3344 
 3345             final OnnxType type;
 3346             final Quantifier quantifier;
 3347 
 3348             InputParameter(OnnxType type, Quantifier quantifier) {
 3349                 this.type = type;
 3350                 this.quantifier = quantifier;
 3351             }
 3352 
 3353             @Override
 3354             public OnnxType type() {
 3355                 return type;
 3356             }
 3357 
 3358             @Override
 3359             public Quantifier quantifier() {
 3360                 return quantifier;
 3361             }
 3362         }
 3363 
 3364         public enum OutputParameter implements OnnxParameter {
 3365             output(TypeConstraint.T2.typeVariable(), Quantifier.REQUIRED),
 3366             ;
 3367 
 3368             final OnnxType type;
 3369             final Quantifier quantifier;
 3370 
 3371             OutputParameter(OnnxType type, Quantifier quantifier) {
 3372                 this.type = type;
 3373                 this.quantifier = quantifier;
 3374             }
 3375 
 3376             @Override
 3377             public OnnxType type() {
 3378                 return type;
 3379             }
 3380 
 3381             @Override
 3382             public Quantifier quantifier() {
 3383                 return quantifier;
 3384             }
 3385         }
 3386 
 3387         public static final OnnxSchema SCHEMA = new OnnxSchemaRecord(
 3388                 NAME,
 3389                 List.of(Attribute.values()),
 3390                 List.of(TypeConstraint.values()),
 3391                 List.of(InputParameter.values()),
 3392                 List.of(OutputParameter.values())
 3393         );
 3394 
 3395         public BlackmanWindow(ExternalizedOp def) {
 3396             super(SCHEMA, def);
 3397         }
 3398 
 3399         BlackmanWindow(BlackmanWindow that, CopyContext cc) {
 3400             super(that, cc);
 3401         }
 3402 
 3403         @Override
 3404         public BlackmanWindow transform(CopyContext cc, OpTransformer ot) {
 3405             return new BlackmanWindow(this, cc);
 3406         }
 3407 
 3408         BlackmanWindow(TypeElement resultType, Value size, java.util.Optional<Integer> periodic, java.util.Optional<Integer> output_datatype) {
 3409             super(SCHEMA, resultType, Set.of(), List.of(size), List.of(periodic, output_datatype));
 3410         }
 3411 
 3412         @Override
 3413         public SequencedSet<OnnxParameter> onnxOutputs() {
 3414             return onnxOutputs(SCHEMA);
 3415         }
 3416 
 3417         @Override
 3418         public SequencedMap<OnnxParameter, Object> onnxInputs() {
 3419             return onnxInputs(SCHEMA, List.of(size()));
 3420         }
 3421 
 3422         public Value size() {
 3423             return operands().get(0);
 3424         }
 3425 
 3426         public java.util.Optional<Integer> periodic() {
 3427             Integer periodic = Attribute.periodic.access(Integer.class, onnxAttributes);
 3428             return java.util.Optional.ofNullable(periodic);
 3429         }
 3430 
 3431         public java.util.Optional<Integer> output_datatype() {
 3432             Integer output_datatype = Attribute.output_datatype.access(Integer.class, onnxAttributes);
 3433             return java.util.Optional.ofNullable(output_datatype);
 3434         }
 3435 
 3436     }
 3437 
 3438     public static BlackmanWindow BlackmanWindow(TypeElement resultType, Value size, java.util.Optional<Integer> periodic, java.util.Optional<Integer> output_datatype) {
 3439         return new BlackmanWindow(resultType, size, periodic, output_datatype);
 3440     }
 3441 
 3442     @OpFactory.OpDeclaration(Cast.NAME)
 3443     public static final class Cast extends OnnxOp {
 3444         public static final String NAME = "Cast";
 3445 
 3446         public enum Attribute implements OnnxAttribute {
 3447             saturate(Integer.class, true, 1),
 3448             to(Integer.class, false, null),
 3449             ;
 3450 
 3451                 final Class<?> t;
 3452                 final boolean optional;
 3453                 final Object defaultValue;
 3454 
 3455                 Attribute(Class<?> type, boolean optional, Object defaultValue) {
 3456                     this.t = type;
 3457                     this.optional = optional;
 3458                     this.defaultValue = defaultValue;
 3459                     assert optional || defaultValue == null;
 3460                 }
 3461 
 3462                 public Class<?> type() {
 3463                     return t;
 3464                 }
 3465 
 3466                 public boolean isOptional() {
 3467                     return optional;
 3468                 }
 3469 
 3470                 public Object defaultValue() {
 3471                     return defaultValue;
 3472                 }
 3473         }
 3474 
 3475         public enum TypeConstraint implements OnnxTypeConstraint {
 3476             T1(new OnnxType.TypeVariable("T1", List.of(OnnxType.tensor(OnnxType.uint8()), OnnxType.tensor(OnnxType.uint16()), OnnxType.tensor(OnnxType.uint32()), OnnxType.tensor(OnnxType.uint64()), OnnxType.tensor(OnnxType.int8()), OnnxType.tensor(OnnxType.int16()), OnnxType.tensor(OnnxType.int32()), OnnxType.tensor(OnnxType.int64()), OnnxType.tensor(OnnxType.bfloat16()), OnnxType.tensor(OnnxType.float16()), OnnxType.tensor(OnnxType.float32()), OnnxType.tensor(OnnxType.float64()), OnnxType.tensor(OnnxType.string()), OnnxType.tensor(OnnxType.bool()), OnnxType.tensor(OnnxType.float8e4m3fn()), OnnxType.tensor(OnnxType.float8e4m3fnuz()), OnnxType.tensor(OnnxType.float8e5m2()), OnnxType.tensor(OnnxType.float8e5m2fnuz()), OnnxType.tensor(OnnxType.uint4()), OnnxType.tensor(OnnxType.int4()), OnnxType.tensor(OnnxType.float4e2m1())))),
 3477             T2(new OnnxType.TypeVariable("T2", List.of(OnnxType.tensor(OnnxType.uint8()), OnnxType.tensor(OnnxType.uint16()), OnnxType.tensor(OnnxType.uint32()), OnnxType.tensor(OnnxType.uint64()), OnnxType.tensor(OnnxType.int8()), OnnxType.tensor(OnnxType.int16()), OnnxType.tensor(OnnxType.int32()), OnnxType.tensor(OnnxType.int64()), OnnxType.tensor(OnnxType.bfloat16()), OnnxType.tensor(OnnxType.float16()), OnnxType.tensor(OnnxType.float32()), OnnxType.tensor(OnnxType.float64()), OnnxType.tensor(OnnxType.string()), OnnxType.tensor(OnnxType.bool()), OnnxType.tensor(OnnxType.float8e4m3fn()), OnnxType.tensor(OnnxType.float8e4m3fnuz()), OnnxType.tensor(OnnxType.float8e5m2()), OnnxType.tensor(OnnxType.float8e5m2fnuz()), OnnxType.tensor(OnnxType.uint4()), OnnxType.tensor(OnnxType.int4()), OnnxType.tensor(OnnxType.float4e2m1())))),
 3478             ;
 3479 
 3480             final OnnxType.TypeVariable typeVariable;
 3481 
 3482             TypeConstraint(OnnxType.TypeVariable typeVariable) {
 3483                 assert typeVariable.name().equals(name());
 3484                 this.typeVariable = typeVariable;
 3485             }
 3486 
 3487             @Override
 3488             public OnnxType.TypeVariable typeVariable() {
 3489                 return typeVariable;
 3490             }
 3491         }
 3492 
 3493         public enum InputParameter implements OnnxParameter {
 3494             input(TypeConstraint.T1.typeVariable(), Quantifier.REQUIRED),
 3495             ;
 3496 
 3497             final OnnxType type;
 3498             final Quantifier quantifier;
 3499 
 3500             InputParameter(OnnxType type, Quantifier quantifier) {
 3501                 this.type = type;
 3502                 this.quantifier = quantifier;
 3503             }
 3504 
 3505             @Override
 3506             public OnnxType type() {
 3507                 return type;
 3508             }
 3509 
 3510             @Override
 3511             public Quantifier quantifier() {
 3512                 return quantifier;
 3513             }
 3514         }
 3515 
 3516         public enum OutputParameter implements OnnxParameter {
 3517             output(TypeConstraint.T2.typeVariable(), Quantifier.REQUIRED),
 3518             ;
 3519 
 3520             final OnnxType type;
 3521             final Quantifier quantifier;
 3522 
 3523             OutputParameter(OnnxType type, Quantifier quantifier) {
 3524                 this.type = type;
 3525                 this.quantifier = quantifier;
 3526             }
 3527 
 3528             @Override
 3529             public OnnxType type() {
 3530                 return type;
 3531             }
 3532 
 3533             @Override
 3534             public Quantifier quantifier() {
 3535                 return quantifier;
 3536             }
 3537         }
 3538 
 3539         public static final OnnxSchema SCHEMA = new OnnxSchemaRecord(
 3540                 NAME,
 3541                 List.of(Attribute.values()),
 3542                 List.of(TypeConstraint.values()),
 3543                 List.of(InputParameter.values()),
 3544                 List.of(OutputParameter.values())
 3545         );
 3546 
 3547         public Cast(ExternalizedOp def) {
 3548             super(SCHEMA, def);
 3549         }
 3550 
 3551         Cast(Cast that, CopyContext cc) {
 3552             super(that, cc);
 3553         }
 3554 
 3555         @Override
 3556         public Cast transform(CopyContext cc, OpTransformer ot) {
 3557             return new Cast(this, cc);
 3558         }
 3559 
 3560         Cast(TypeElement resultType, Value input, java.util.Optional<Integer> saturate, int to) {
 3561             super(SCHEMA, resultType, Set.of(), List.of(input), List.of(saturate, to));
 3562         }
 3563 
 3564         @Override
 3565         public SequencedSet<OnnxParameter> onnxOutputs() {
 3566             return onnxOutputs(SCHEMA);
 3567         }
 3568 
 3569         @Override
 3570         public SequencedMap<OnnxParameter, Object> onnxInputs() {
 3571             return onnxInputs(SCHEMA, List.of(input()));
 3572         }
 3573 
 3574         public Value input() {
 3575             return operands().get(0);
 3576         }
 3577 
 3578         public java.util.Optional<Integer> saturate() {
 3579             Integer saturate = Attribute.saturate.access(Integer.class, onnxAttributes);
 3580             return java.util.Optional.ofNullable(saturate);
 3581         }
 3582 
 3583         public int to() {
 3584             int to = Attribute.to.access(int.class, onnxAttributes);
 3585             return to;
 3586         }
 3587 
 3588     }
 3589 
 3590     public static Cast Cast(TypeElement resultType, Value input, java.util.Optional<Integer> saturate, int to) {
 3591         return new Cast(resultType, input, saturate, to);
 3592     }
 3593 
 3594     @OpFactory.OpDeclaration(CastLike.NAME)
 3595     public static final class CastLike extends OnnxOp {
 3596         public static final String NAME = "CastLike";
 3597 
 3598         public enum Attribute implements OnnxAttribute {
 3599             saturate(Integer.class, true, 1),
 3600             ;
 3601 
 3602                 final Class<?> t;
 3603                 final boolean optional;
 3604                 final Object defaultValue;
 3605 
 3606                 Attribute(Class<?> type, boolean optional, Object defaultValue) {
 3607                     this.t = type;
 3608                     this.optional = optional;
 3609                     this.defaultValue = defaultValue;
 3610                     assert optional || defaultValue == null;
 3611                 }
 3612 
 3613                 public Class<?> type() {
 3614                     return t;
 3615                 }
 3616 
 3617                 public boolean isOptional() {
 3618                     return optional;
 3619                 }
 3620 
 3621                 public Object defaultValue() {
 3622                     return defaultValue;
 3623                 }
 3624         }
 3625 
 3626         public enum TypeConstraint implements OnnxTypeConstraint {
 3627             T1(new OnnxType.TypeVariable("T1", List.of(OnnxType.tensor(OnnxType.uint8()), OnnxType.tensor(OnnxType.uint16()), OnnxType.tensor(OnnxType.uint32()), OnnxType.tensor(OnnxType.uint64()), OnnxType.tensor(OnnxType.int8()), OnnxType.tensor(OnnxType.int16()), OnnxType.tensor(OnnxType.int32()), OnnxType.tensor(OnnxType.int64()), OnnxType.tensor(OnnxType.bfloat16()), OnnxType.tensor(OnnxType.float16()), OnnxType.tensor(OnnxType.float32()), OnnxType.tensor(OnnxType.float64()), OnnxType.tensor(OnnxType.string()), OnnxType.tensor(OnnxType.bool()), OnnxType.tensor(OnnxType.float8e4m3fn()), OnnxType.tensor(OnnxType.float8e4m3fnuz()), OnnxType.tensor(OnnxType.float8e5m2()), OnnxType.tensor(OnnxType.float8e5m2fnuz()), OnnxType.tensor(OnnxType.uint4()), OnnxType.tensor(OnnxType.int4()), OnnxType.tensor(OnnxType.float4e2m1())))),
 3628             T2(new OnnxType.TypeVariable("T2", List.of(OnnxType.tensor(OnnxType.uint8()), OnnxType.tensor(OnnxType.uint16()), OnnxType.tensor(OnnxType.uint32()), OnnxType.tensor(OnnxType.uint64()), OnnxType.tensor(OnnxType.int8()), OnnxType.tensor(OnnxType.int16()), OnnxType.tensor(OnnxType.int32()), OnnxType.tensor(OnnxType.int64()), OnnxType.tensor(OnnxType.bfloat16()), OnnxType.tensor(OnnxType.float16()), OnnxType.tensor(OnnxType.float32()), OnnxType.tensor(OnnxType.float64()), OnnxType.tensor(OnnxType.string()), OnnxType.tensor(OnnxType.bool()), OnnxType.tensor(OnnxType.float8e4m3fn()), OnnxType.tensor(OnnxType.float8e4m3fnuz()), OnnxType.tensor(OnnxType.float8e5m2()), OnnxType.tensor(OnnxType.float8e5m2fnuz()), OnnxType.tensor(OnnxType.uint4()), OnnxType.tensor(OnnxType.int4()), OnnxType.tensor(OnnxType.float4e2m1())))),
 3629             ;
 3630 
 3631             final OnnxType.TypeVariable typeVariable;
 3632 
 3633             TypeConstraint(OnnxType.TypeVariable typeVariable) {
 3634                 assert typeVariable.name().equals(name());
 3635                 this.typeVariable = typeVariable;
 3636             }
 3637 
 3638             @Override
 3639             public OnnxType.TypeVariable typeVariable() {
 3640                 return typeVariable;
 3641             }
 3642         }
 3643 
 3644         public enum InputParameter implements OnnxParameter {
 3645             input(TypeConstraint.T1.typeVariable(), Quantifier.REQUIRED),
 3646             target_type(TypeConstraint.T2.typeVariable(), Quantifier.REQUIRED),
 3647             ;
 3648 
 3649             final OnnxType type;
 3650             final Quantifier quantifier;
 3651 
 3652             InputParameter(OnnxType type, Quantifier quantifier) {
 3653                 this.type = type;
 3654                 this.quantifier = quantifier;
 3655             }
 3656 
 3657             @Override
 3658             public OnnxType type() {
 3659                 return type;
 3660             }
 3661 
 3662             @Override
 3663             public Quantifier quantifier() {
 3664                 return quantifier;
 3665             }
 3666         }
 3667 
 3668         public enum OutputParameter implements OnnxParameter {
 3669             output(TypeConstraint.T2.typeVariable(), Quantifier.REQUIRED),
 3670             ;
 3671 
 3672             final OnnxType type;
 3673             final Quantifier quantifier;
 3674 
 3675             OutputParameter(OnnxType type, Quantifier quantifier) {
 3676                 this.type = type;
 3677                 this.quantifier = quantifier;
 3678             }
 3679 
 3680             @Override
 3681             public OnnxType type() {
 3682                 return type;
 3683             }
 3684 
 3685             @Override
 3686             public Quantifier quantifier() {
 3687                 return quantifier;
 3688             }
 3689         }
 3690 
 3691         public static final OnnxSchema SCHEMA = new OnnxSchemaRecord(
 3692                 NAME,
 3693                 List.of(Attribute.values()),
 3694                 List.of(TypeConstraint.values()),
 3695                 List.of(InputParameter.values()),
 3696                 List.of(OutputParameter.values())
 3697         );
 3698 
 3699         public CastLike(ExternalizedOp def) {
 3700             super(SCHEMA, def);
 3701         }
 3702 
 3703         CastLike(CastLike that, CopyContext cc) {
 3704             super(that, cc);
 3705         }
 3706 
 3707         @Override
 3708         public CastLike transform(CopyContext cc, OpTransformer ot) {
 3709             return new CastLike(this, cc);
 3710         }
 3711 
 3712         CastLike(TypeElement resultType, Value input, Value target_type, java.util.Optional<Integer> saturate) {
 3713             super(SCHEMA, resultType, Set.of(), List.of(input, target_type), List.of(saturate));
 3714         }
 3715 
 3716         @Override
 3717         public SequencedSet<OnnxParameter> onnxOutputs() {
 3718             return onnxOutputs(SCHEMA);
 3719         }
 3720 
 3721         @Override
 3722         public SequencedMap<OnnxParameter, Object> onnxInputs() {
 3723             return onnxInputs(SCHEMA, List.of(input(), target_type()));
 3724         }
 3725 
 3726         public Value input() {
 3727             return operands().get(0);
 3728         }
 3729 
 3730         public Value target_type() {
 3731             return operands().get(1);
 3732         }
 3733 
 3734         public java.util.Optional<Integer> saturate() {
 3735             Integer saturate = Attribute.saturate.access(Integer.class, onnxAttributes);
 3736             return java.util.Optional.ofNullable(saturate);
 3737         }
 3738 
 3739     }
 3740 
 3741     public static CastLike CastLike(TypeElement resultType, Value input, Value target_type, java.util.Optional<Integer> saturate) {
 3742         return new CastLike(resultType, input, target_type, saturate);
 3743     }
 3744 
 3745     @OpFactory.OpDeclaration(CastMap.NAME)
 3746     public static final class CastMap extends OnnxOp {
 3747         public static final String NAME = "CastMap";
 3748 
 3749         public enum Attribute implements OnnxAttribute {
 3750             map_form(String.class, true, "DENSE"),
 3751             cast_to(String.class, true, "TO_FLOAT"),
 3752             max_map(Integer.class, true, 1),
 3753             ;
 3754 
 3755                 final Class<?> t;
 3756                 final boolean optional;
 3757                 final Object defaultValue;
 3758 
 3759                 Attribute(Class<?> type, boolean optional, Object defaultValue) {
 3760                     this.t = type;
 3761                     this.optional = optional;
 3762                     this.defaultValue = defaultValue;
 3763                     assert optional || defaultValue == null;
 3764                 }
 3765 
 3766                 public Class<?> type() {
 3767                     return t;
 3768                 }
 3769 
 3770                 public boolean isOptional() {
 3771                     return optional;
 3772                 }
 3773 
 3774                 public Object defaultValue() {
 3775                     return defaultValue;
 3776                 }
 3777         }
 3778 
 3779         public enum TypeConstraint implements OnnxTypeConstraint {
 3780             T1(new OnnxType.TypeVariable("T1", List.of(OnnxType.map(OnnxType.int64(), OnnxType.string()), OnnxType.map(OnnxType.int64(), OnnxType.float32())))),
 3781             T2(new OnnxType.TypeVariable("T2", List.of(OnnxType.tensor(OnnxType.string()), OnnxType.tensor(OnnxType.float32()), OnnxType.tensor(OnnxType.int64())))),
 3782             ;
 3783 
 3784             final OnnxType.TypeVariable typeVariable;
 3785 
 3786             TypeConstraint(OnnxType.TypeVariable typeVariable) {
 3787                 assert typeVariable.name().equals(name());
 3788                 this.typeVariable = typeVariable;
 3789             }
 3790 
 3791             @Override
 3792             public OnnxType.TypeVariable typeVariable() {
 3793                 return typeVariable;
 3794             }
 3795         }
 3796 
 3797         public enum InputParameter implements OnnxParameter {
 3798             X(TypeConstraint.T1.typeVariable(), Quantifier.REQUIRED),
 3799             ;
 3800 
 3801             final OnnxType type;
 3802             final Quantifier quantifier;
 3803 
 3804             InputParameter(OnnxType type, Quantifier quantifier) {
 3805                 this.type = type;
 3806                 this.quantifier = quantifier;
 3807             }
 3808 
 3809             @Override
 3810             public OnnxType type() {
 3811                 return type;
 3812             }
 3813 
 3814             @Override
 3815             public Quantifier quantifier() {
 3816                 return quantifier;
 3817             }
 3818         }
 3819 
 3820         public enum OutputParameter implements OnnxParameter {
 3821             Y(TypeConstraint.T2.typeVariable(), Quantifier.REQUIRED),
 3822             ;
 3823 
 3824             final OnnxType type;
 3825             final Quantifier quantifier;
 3826 
 3827             OutputParameter(OnnxType type, Quantifier quantifier) {
 3828                 this.type = type;
 3829                 this.quantifier = quantifier;
 3830             }
 3831 
 3832             @Override
 3833             public OnnxType type() {
 3834                 return type;
 3835             }
 3836 
 3837             @Override
 3838             public Quantifier quantifier() {
 3839                 return quantifier;
 3840             }
 3841         }
 3842 
 3843         public static final OnnxSchema SCHEMA = new OnnxSchemaRecord(
 3844                 NAME,
 3845                 List.of(Attribute.values()),
 3846                 List.of(TypeConstraint.values()),
 3847                 List.of(InputParameter.values()),
 3848                 List.of(OutputParameter.values())
 3849         );
 3850 
 3851         public CastMap(ExternalizedOp def) {
 3852             super(SCHEMA, def);
 3853         }
 3854 
 3855         CastMap(CastMap that, CopyContext cc) {
 3856             super(that, cc);
 3857         }
 3858 
 3859         @Override
 3860         public CastMap transform(CopyContext cc, OpTransformer ot) {
 3861             return new CastMap(this, cc);
 3862         }
 3863 
 3864         CastMap(TypeElement resultType, Value X, java.util.Optional<String> map_form, java.util.Optional<String> cast_to, java.util.Optional<Integer> max_map) {
 3865             super(SCHEMA, resultType, Set.of(), List.of(X), List.of(map_form, cast_to, max_map));
 3866         }
 3867 
 3868         @Override
 3869         public SequencedSet<OnnxParameter> onnxOutputs() {
 3870             return onnxOutputs(SCHEMA);
 3871         }
 3872 
 3873         @Override
 3874         public SequencedMap<OnnxParameter, Object> onnxInputs() {
 3875             return onnxInputs(SCHEMA, List.of(X()));
 3876         }
 3877 
 3878         public Value X() {
 3879             return operands().get(0);
 3880         }
 3881 
 3882         public java.util.Optional<String> map_form() {
 3883             String map_form = Attribute.map_form.access(String.class, onnxAttributes);
 3884             return java.util.Optional.ofNullable(map_form);
 3885         }
 3886 
 3887         public java.util.Optional<String> cast_to() {
 3888             String cast_to = Attribute.cast_to.access(String.class, onnxAttributes);
 3889             return java.util.Optional.ofNullable(cast_to);
 3890         }
 3891 
 3892         public java.util.Optional<Integer> max_map() {
 3893             Integer max_map = Attribute.max_map.access(Integer.class, onnxAttributes);
 3894             return java.util.Optional.ofNullable(max_map);
 3895         }
 3896 
 3897     }
 3898 
 3899     public static CastMap CastMap(TypeElement resultType, Value X, java.util.Optional<String> map_form, java.util.Optional<String> cast_to, java.util.Optional<Integer> max_map) {
 3900         return new CastMap(resultType, X, map_form, cast_to, max_map);
 3901     }
 3902 
 3903     @OpFactory.OpDeclaration(CategoryMapper.NAME)
 3904     public static final class CategoryMapper extends OnnxOp {
 3905         public static final String NAME = "CategoryMapper";
 3906 
 3907         public enum Attribute implements OnnxAttribute {
 3908             cats_int64s(int[].class, true, null),
 3909             cats_strings(String[].class, true, null),
 3910             default_int64(Integer.class, true, -1),
 3911             default_string(String.class, true, "_Unused"),
 3912             ;
 3913 
 3914                 final Class<?> t;
 3915                 final boolean optional;
 3916                 final Object defaultValue;
 3917 
 3918                 Attribute(Class<?> type, boolean optional, Object defaultValue) {
 3919                     this.t = type;
 3920                     this.optional = optional;
 3921                     this.defaultValue = defaultValue;
 3922                     assert optional || defaultValue == null;
 3923                 }
 3924 
 3925                 public Class<?> type() {
 3926                     return t;
 3927                 }
 3928 
 3929                 public boolean isOptional() {
 3930                     return optional;
 3931                 }
 3932 
 3933                 public Object defaultValue() {
 3934                     return defaultValue;
 3935                 }
 3936         }
 3937 
 3938         public enum TypeConstraint implements OnnxTypeConstraint {
 3939             T1(new OnnxType.TypeVariable("T1", List.of(OnnxType.tensor(OnnxType.string()), OnnxType.tensor(OnnxType.int64())))),
 3940             T2(new OnnxType.TypeVariable("T2", List.of(OnnxType.tensor(OnnxType.string()), OnnxType.tensor(OnnxType.int64())))),
 3941             ;
 3942 
 3943             final OnnxType.TypeVariable typeVariable;
 3944 
 3945             TypeConstraint(OnnxType.TypeVariable typeVariable) {
 3946                 assert typeVariable.name().equals(name());
 3947                 this.typeVariable = typeVariable;
 3948             }
 3949 
 3950             @Override
 3951             public OnnxType.TypeVariable typeVariable() {
 3952                 return typeVariable;
 3953             }
 3954         }
 3955 
 3956         public enum InputParameter implements OnnxParameter {
 3957             X(TypeConstraint.T1.typeVariable(), Quantifier.REQUIRED),
 3958             ;
 3959 
 3960             final OnnxType type;
 3961             final Quantifier quantifier;
 3962 
 3963             InputParameter(OnnxType type, Quantifier quantifier) {
 3964                 this.type = type;
 3965                 this.quantifier = quantifier;
 3966             }
 3967 
 3968             @Override
 3969             public OnnxType type() {
 3970                 return type;
 3971             }
 3972 
 3973             @Override
 3974             public Quantifier quantifier() {
 3975                 return quantifier;
 3976             }
 3977         }
 3978 
 3979         public enum OutputParameter implements OnnxParameter {
 3980             Y(TypeConstraint.T2.typeVariable(), Quantifier.REQUIRED),
 3981             ;
 3982 
 3983             final OnnxType type;
 3984             final Quantifier quantifier;
 3985 
 3986             OutputParameter(OnnxType type, Quantifier quantifier) {
 3987                 this.type = type;
 3988                 this.quantifier = quantifier;
 3989             }
 3990 
 3991             @Override
 3992             public OnnxType type() {
 3993                 return type;
 3994             }
 3995 
 3996             @Override
 3997             public Quantifier quantifier() {
 3998                 return quantifier;
 3999             }
 4000         }
 4001 
 4002         public static final OnnxSchema SCHEMA = new OnnxSchemaRecord(
 4003                 NAME,
 4004                 List.of(Attribute.values()),
 4005                 List.of(TypeConstraint.values()),
 4006                 List.of(InputParameter.values()),
 4007                 List.of(OutputParameter.values())
 4008         );
 4009 
 4010         public CategoryMapper(ExternalizedOp def) {
 4011             super(SCHEMA, def);
 4012         }
 4013 
 4014         CategoryMapper(CategoryMapper that, CopyContext cc) {
 4015             super(that, cc);
 4016         }
 4017 
 4018         @Override
 4019         public CategoryMapper transform(CopyContext cc, OpTransformer ot) {
 4020             return new CategoryMapper(this, cc);
 4021         }
 4022 
 4023         CategoryMapper(TypeElement resultType, Value X, java.util.Optional<int[]> cats_int64s, java.util.Optional<String[]> cats_strings, java.util.Optional<Integer> default_int64, java.util.Optional<String> default_string) {
 4024             super(SCHEMA, resultType, Set.of(), List.of(X), List.of(cats_int64s, cats_strings, default_int64, default_string));
 4025         }
 4026 
 4027         @Override
 4028         public SequencedSet<OnnxParameter> onnxOutputs() {
 4029             return onnxOutputs(SCHEMA);
 4030         }
 4031 
 4032         @Override
 4033         public SequencedMap<OnnxParameter, Object> onnxInputs() {
 4034             return onnxInputs(SCHEMA, List.of(X()));
 4035         }
 4036 
 4037         public Value X() {
 4038             return operands().get(0);
 4039         }
 4040 
 4041         public java.util.Optional<int[]> cats_int64s() {
 4042             int[] cats_int64s = Attribute.cats_int64s.access(int[].class, onnxAttributes);
 4043             return java.util.Optional.ofNullable(cats_int64s).map(int[]::clone);
 4044         }
 4045 
 4046         public java.util.Optional<String[]> cats_strings() {
 4047             String[] cats_strings = Attribute.cats_strings.access(String[].class, onnxAttributes);
 4048             return java.util.Optional.ofNullable(cats_strings).map(String[]::clone);
 4049         }
 4050 
 4051         public java.util.Optional<Integer> default_int64() {
 4052             Integer default_int64 = Attribute.default_int64.access(Integer.class, onnxAttributes);
 4053             return java.util.Optional.ofNullable(default_int64);
 4054         }
 4055 
 4056         public java.util.Optional<String> default_string() {
 4057             String default_string = Attribute.default_string.access(String.class, onnxAttributes);
 4058             return java.util.Optional.ofNullable(default_string);
 4059         }
 4060 
 4061     }
 4062 
 4063     public static CategoryMapper CategoryMapper(TypeElement resultType, Value X, java.util.Optional<int[]> cats_int64s, java.util.Optional<String[]> cats_strings, java.util.Optional<Integer> default_int64, java.util.Optional<String> default_string) {
 4064         return new CategoryMapper(resultType, X, cats_int64s, cats_strings, default_int64, default_string);
 4065     }
 4066 
 4067     @OpFactory.OpDeclaration(Ceil.NAME)
 4068     public static final class Ceil extends OnnxOp {
 4069         public static final String NAME = "Ceil";
 4070 
 4071         public enum Attribute implements OnnxAttribute.None { }
 4072 
 4073         public enum TypeConstraint implements OnnxTypeConstraint {
 4074             T(new OnnxType.TypeVariable("T", List.of(OnnxType.tensor(OnnxType.float16()), OnnxType.tensor(OnnxType.float32()), OnnxType.tensor(OnnxType.float64()), OnnxType.tensor(OnnxType.bfloat16())))),
 4075             ;
 4076 
 4077             final OnnxType.TypeVariable typeVariable;
 4078 
 4079             TypeConstraint(OnnxType.TypeVariable typeVariable) {
 4080                 assert typeVariable.name().equals(name());
 4081                 this.typeVariable = typeVariable;
 4082             }
 4083 
 4084             @Override
 4085             public OnnxType.TypeVariable typeVariable() {
 4086                 return typeVariable;
 4087             }
 4088         }
 4089 
 4090         public enum InputParameter implements OnnxParameter {
 4091             X(TypeConstraint.T.typeVariable(), Quantifier.REQUIRED),
 4092             ;
 4093 
 4094             final OnnxType type;
 4095             final Quantifier quantifier;
 4096 
 4097             InputParameter(OnnxType type, Quantifier quantifier) {
 4098                 this.type = type;
 4099                 this.quantifier = quantifier;
 4100             }
 4101 
 4102             @Override
 4103             public OnnxType type() {
 4104                 return type;
 4105             }
 4106 
 4107             @Override
 4108             public Quantifier quantifier() {
 4109                 return quantifier;
 4110             }
 4111         }
 4112 
 4113         public enum OutputParameter implements OnnxParameter {
 4114             Y(TypeConstraint.T.typeVariable(), Quantifier.REQUIRED),
 4115             ;
 4116 
 4117             final OnnxType type;
 4118             final Quantifier quantifier;
 4119 
 4120             OutputParameter(OnnxType type, Quantifier quantifier) {
 4121                 this.type = type;
 4122                 this.quantifier = quantifier;
 4123             }
 4124 
 4125             @Override
 4126             public OnnxType type() {
 4127                 return type;
 4128             }
 4129 
 4130             @Override
 4131             public Quantifier quantifier() {
 4132                 return quantifier;
 4133             }
 4134         }
 4135 
 4136         public static final OnnxSchema SCHEMA = new OnnxSchemaRecord(
 4137                 NAME,
 4138                 List.of(Attribute.values()),
 4139                 List.of(TypeConstraint.values()),
 4140                 List.of(InputParameter.values()),
 4141                 List.of(OutputParameter.values())
 4142         );
 4143 
 4144         public Ceil(ExternalizedOp def) {
 4145             super(SCHEMA, def);
 4146         }
 4147 
 4148         Ceil(Ceil that, CopyContext cc) {
 4149             super(that, cc);
 4150         }
 4151 
 4152         @Override
 4153         public Ceil transform(CopyContext cc, OpTransformer ot) {
 4154             return new Ceil(this, cc);
 4155         }
 4156 
 4157         Ceil(TypeElement resultType, Value X) {
 4158             super(SCHEMA, resultType, Set.of(), List.of(X), List.of());
 4159         }
 4160 
 4161         @Override
 4162         public SequencedSet<OnnxParameter> onnxOutputs() {
 4163             return onnxOutputs(SCHEMA);
 4164         }
 4165 
 4166         @Override
 4167         public SequencedMap<OnnxParameter, Object> onnxInputs() {
 4168             return onnxInputs(SCHEMA, List.of(X()));
 4169         }
 4170 
 4171         public Value X() {
 4172             return operands().get(0);
 4173         }
 4174 
 4175     }
 4176 
 4177     public static Ceil Ceil(TypeElement resultType, Value X) {
 4178         return new Ceil(resultType, X);
 4179     }
 4180 
 4181     @OpFactory.OpDeclaration(Celu.NAME)
 4182     public static final class Celu extends OnnxOp {
 4183         public static final String NAME = "Celu";
 4184 
 4185         public enum Attribute implements OnnxAttribute {
 4186             alpha(Float.class, true, 1.0f),
 4187             ;
 4188 
 4189                 final Class<?> t;
 4190                 final boolean optional;
 4191                 final Object defaultValue;
 4192 
 4193                 Attribute(Class<?> type, boolean optional, Object defaultValue) {
 4194                     this.t = type;
 4195                     this.optional = optional;
 4196                     this.defaultValue = defaultValue;
 4197                     assert optional || defaultValue == null;
 4198                 }
 4199 
 4200                 public Class<?> type() {
 4201                     return t;
 4202                 }
 4203 
 4204                 public boolean isOptional() {
 4205                     return optional;
 4206                 }
 4207 
 4208                 public Object defaultValue() {
 4209                     return defaultValue;
 4210                 }
 4211         }
 4212 
 4213         public enum TypeConstraint implements OnnxTypeConstraint {
 4214             T(new OnnxType.TypeVariable("T", List.of(OnnxType.tensor(OnnxType.float32())))),
 4215             ;
 4216 
 4217             final OnnxType.TypeVariable typeVariable;
 4218 
 4219             TypeConstraint(OnnxType.TypeVariable typeVariable) {
 4220                 assert typeVariable.name().equals(name());
 4221                 this.typeVariable = typeVariable;
 4222             }
 4223 
 4224             @Override
 4225             public OnnxType.TypeVariable typeVariable() {
 4226                 return typeVariable;
 4227             }
 4228         }
 4229 
 4230         public enum InputParameter implements OnnxParameter {
 4231             X(TypeConstraint.T.typeVariable(), Quantifier.REQUIRED),
 4232             ;
 4233 
 4234             final OnnxType type;
 4235             final Quantifier quantifier;
 4236 
 4237             InputParameter(OnnxType type, Quantifier quantifier) {
 4238                 this.type = type;
 4239                 this.quantifier = quantifier;
 4240             }
 4241 
 4242             @Override
 4243             public OnnxType type() {
 4244                 return type;
 4245             }
 4246 
 4247             @Override
 4248             public Quantifier quantifier() {
 4249                 return quantifier;
 4250             }
 4251         }
 4252 
 4253         public enum OutputParameter implements OnnxParameter {
 4254             Y(TypeConstraint.T.typeVariable(), Quantifier.REQUIRED),
 4255             ;
 4256 
 4257             final OnnxType type;
 4258             final Quantifier quantifier;
 4259 
 4260             OutputParameter(OnnxType type, Quantifier quantifier) {
 4261                 this.type = type;
 4262                 this.quantifier = quantifier;
 4263             }
 4264 
 4265             @Override
 4266             public OnnxType type() {
 4267                 return type;
 4268             }
 4269 
 4270             @Override
 4271             public Quantifier quantifier() {
 4272                 return quantifier;
 4273             }
 4274         }
 4275 
 4276         public static final OnnxSchema SCHEMA = new OnnxSchemaRecord(
 4277                 NAME,
 4278                 List.of(Attribute.values()),
 4279                 List.of(TypeConstraint.values()),
 4280                 List.of(InputParameter.values()),
 4281                 List.of(OutputParameter.values())
 4282         );
 4283 
 4284         public Celu(ExternalizedOp def) {
 4285             super(SCHEMA, def);
 4286         }
 4287 
 4288         Celu(Celu that, CopyContext cc) {
 4289             super(that, cc);
 4290         }
 4291 
 4292         @Override
 4293         public Celu transform(CopyContext cc, OpTransformer ot) {
 4294             return new Celu(this, cc);
 4295         }
 4296 
 4297         Celu(TypeElement resultType, Value X, java.util.Optional<Float> alpha) {
 4298             super(SCHEMA, resultType, Set.of(), List.of(X), List.of(alpha));
 4299         }
 4300 
 4301         @Override
 4302         public SequencedSet<OnnxParameter> onnxOutputs() {
 4303             return onnxOutputs(SCHEMA);
 4304         }
 4305 
 4306         @Override
 4307         public SequencedMap<OnnxParameter, Object> onnxInputs() {
 4308             return onnxInputs(SCHEMA, List.of(X()));
 4309         }
 4310 
 4311         public Value X() {
 4312             return operands().get(0);
 4313         }
 4314 
 4315         public java.util.Optional<Float> alpha() {
 4316             Float alpha = Attribute.alpha.access(Float.class, onnxAttributes);
 4317             return java.util.Optional.ofNullable(alpha);
 4318         }
 4319 
 4320     }
 4321 
 4322     public static Celu Celu(TypeElement resultType, Value X, java.util.Optional<Float> alpha) {
 4323         return new Celu(resultType, X, alpha);
 4324     }
 4325 
 4326     @OpFactory.OpDeclaration(CenterCropPad.NAME)
 4327     public static final class CenterCropPad extends OnnxOp {
 4328         public static final String NAME = "CenterCropPad";
 4329 
 4330         public enum Attribute implements OnnxAttribute {
 4331             axes(int[].class, true, null),
 4332             ;
 4333 
 4334                 final Class<?> t;
 4335                 final boolean optional;
 4336                 final Object defaultValue;
 4337 
 4338                 Attribute(Class<?> type, boolean optional, Object defaultValue) {
 4339                     this.t = type;
 4340                     this.optional = optional;
 4341                     this.defaultValue = defaultValue;
 4342                     assert optional || defaultValue == null;
 4343                 }
 4344 
 4345                 public Class<?> type() {
 4346                     return t;
 4347                 }
 4348 
 4349                 public boolean isOptional() {
 4350                     return optional;
 4351                 }
 4352 
 4353                 public Object defaultValue() {
 4354                     return defaultValue;
 4355                 }
 4356         }
 4357 
 4358         public enum TypeConstraint implements OnnxTypeConstraint {
 4359             T(new OnnxType.TypeVariable("T", List.of(OnnxType.tensor(OnnxType.uint8()), OnnxType.tensor(OnnxType.uint16()), OnnxType.tensor(OnnxType.uint32()), OnnxType.tensor(OnnxType.uint64()), OnnxType.tensor(OnnxType.int8()), OnnxType.tensor(OnnxType.int16()), OnnxType.tensor(OnnxType.int32()), OnnxType.tensor(OnnxType.int64()), OnnxType.tensor(OnnxType.bfloat16()), OnnxType.tensor(OnnxType.float16()), OnnxType.tensor(OnnxType.float32()), OnnxType.tensor(OnnxType.float64()), OnnxType.tensor(OnnxType.string()), OnnxType.tensor(OnnxType.bool()), OnnxType.tensor(OnnxType.complex64()), OnnxType.tensor(OnnxType.complex128())))),
 4360             Tind(new OnnxType.TypeVariable("Tind", List.of(OnnxType.tensor(OnnxType.int32()), OnnxType.tensor(OnnxType.int64())))),
 4361             ;
 4362 
 4363             final OnnxType.TypeVariable typeVariable;
 4364 
 4365             TypeConstraint(OnnxType.TypeVariable typeVariable) {
 4366                 assert typeVariable.name().equals(name());
 4367                 this.typeVariable = typeVariable;
 4368             }
 4369 
 4370             @Override
 4371             public OnnxType.TypeVariable typeVariable() {
 4372                 return typeVariable;
 4373             }
 4374         }
 4375 
 4376         public enum InputParameter implements OnnxParameter {
 4377             input_data(TypeConstraint.T.typeVariable(), Quantifier.REQUIRED),
 4378             shape(TypeConstraint.Tind.typeVariable(), Quantifier.REQUIRED),
 4379             ;
 4380 
 4381             final OnnxType type;
 4382             final Quantifier quantifier;
 4383 
 4384             InputParameter(OnnxType type, Quantifier quantifier) {
 4385                 this.type = type;
 4386                 this.quantifier = quantifier;
 4387             }
 4388 
 4389             @Override
 4390             public OnnxType type() {
 4391                 return type;
 4392             }
 4393 
 4394             @Override
 4395             public Quantifier quantifier() {
 4396                 return quantifier;
 4397             }
 4398         }
 4399 
 4400         public enum OutputParameter implements OnnxParameter {
 4401             output_data(TypeConstraint.T.typeVariable(), Quantifier.REQUIRED),
 4402             ;
 4403 
 4404             final OnnxType type;
 4405             final Quantifier quantifier;
 4406 
 4407             OutputParameter(OnnxType type, Quantifier quantifier) {
 4408                 this.type = type;
 4409                 this.quantifier = quantifier;
 4410             }
 4411 
 4412             @Override
 4413             public OnnxType type() {
 4414                 return type;
 4415             }
 4416 
 4417             @Override
 4418             public Quantifier quantifier() {
 4419                 return quantifier;
 4420             }
 4421         }
 4422 
 4423         public static final OnnxSchema SCHEMA = new OnnxSchemaRecord(
 4424                 NAME,
 4425                 List.of(Attribute.values()),
 4426                 List.of(TypeConstraint.values()),
 4427                 List.of(InputParameter.values()),
 4428                 List.of(OutputParameter.values())
 4429         );
 4430 
 4431         public CenterCropPad(ExternalizedOp def) {
 4432             super(SCHEMA, def);
 4433         }
 4434 
 4435         CenterCropPad(CenterCropPad that, CopyContext cc) {
 4436             super(that, cc);
 4437         }
 4438 
 4439         @Override
 4440         public CenterCropPad transform(CopyContext cc, OpTransformer ot) {
 4441             return new CenterCropPad(this, cc);
 4442         }
 4443 
 4444         CenterCropPad(TypeElement resultType, Value input_data, Value shape, java.util.Optional<int[]> axes) {
 4445             super(SCHEMA, resultType, Set.of(), List.of(input_data, shape), List.of(axes));
 4446         }
 4447 
 4448         @Override
 4449         public SequencedSet<OnnxParameter> onnxOutputs() {
 4450             return onnxOutputs(SCHEMA);
 4451         }
 4452 
 4453         @Override
 4454         public SequencedMap<OnnxParameter, Object> onnxInputs() {
 4455             return onnxInputs(SCHEMA, List.of(input_data(), shape()));
 4456         }
 4457 
 4458         public Value input_data() {
 4459             return operands().get(0);
 4460         }
 4461 
 4462         public Value shape() {
 4463             return operands().get(1);
 4464         }
 4465 
 4466         public java.util.Optional<int[]> axes() {
 4467             int[] axes = Attribute.axes.access(int[].class, onnxAttributes);
 4468             return java.util.Optional.ofNullable(axes).map(int[]::clone);
 4469         }
 4470 
 4471     }
 4472 
 4473     public static CenterCropPad CenterCropPad(TypeElement resultType, Value input_data, Value shape, java.util.Optional<int[]> axes) {
 4474         return new CenterCropPad(resultType, input_data, shape, axes);
 4475     }
 4476 
 4477     @OpFactory.OpDeclaration(Clip.NAME)
 4478     public static final class Clip extends OnnxOp {
 4479         public static final String NAME = "Clip";
 4480 
 4481         public enum Attribute implements OnnxAttribute.None { }
 4482 
 4483         public enum TypeConstraint implements OnnxTypeConstraint {
 4484             T(new OnnxType.TypeVariable("T", List.of(OnnxType.tensor(OnnxType.uint8()), OnnxType.tensor(OnnxType.uint16()), OnnxType.tensor(OnnxType.uint32()), OnnxType.tensor(OnnxType.uint64()), OnnxType.tensor(OnnxType.int8()), OnnxType.tensor(OnnxType.int16()), OnnxType.tensor(OnnxType.int32()), OnnxType.tensor(OnnxType.int64()), OnnxType.tensor(OnnxType.float16()), OnnxType.tensor(OnnxType.float32()), OnnxType.tensor(OnnxType.float64()), OnnxType.tensor(OnnxType.bfloat16())))),
 4485             ;
 4486 
 4487             final OnnxType.TypeVariable typeVariable;
 4488 
 4489             TypeConstraint(OnnxType.TypeVariable typeVariable) {
 4490                 assert typeVariable.name().equals(name());
 4491                 this.typeVariable = typeVariable;
 4492             }
 4493 
 4494             @Override
 4495             public OnnxType.TypeVariable typeVariable() {
 4496                 return typeVariable;
 4497             }
 4498         }
 4499 
 4500         public enum InputParameter implements OnnxParameter {
 4501             input(TypeConstraint.T.typeVariable(), Quantifier.REQUIRED),
 4502             min(TypeConstraint.T.typeVariable(), Quantifier.OPTIONAL),
 4503             max(TypeConstraint.T.typeVariable(), Quantifier.OPTIONAL),
 4504             ;
 4505 
 4506             final OnnxType type;
 4507             final Quantifier quantifier;
 4508 
 4509             InputParameter(OnnxType type, Quantifier quantifier) {
 4510                 this.type = type;
 4511                 this.quantifier = quantifier;
 4512             }
 4513 
 4514             @Override
 4515             public OnnxType type() {
 4516                 return type;
 4517             }
 4518 
 4519             @Override
 4520             public Quantifier quantifier() {
 4521                 return quantifier;
 4522             }
 4523         }
 4524 
 4525         public enum OutputParameter implements OnnxParameter {
 4526             output(TypeConstraint.T.typeVariable(), Quantifier.REQUIRED),
 4527             ;
 4528 
 4529             final OnnxType type;
 4530             final Quantifier quantifier;
 4531 
 4532             OutputParameter(OnnxType type, Quantifier quantifier) {
 4533                 this.type = type;
 4534                 this.quantifier = quantifier;
 4535             }
 4536 
 4537             @Override
 4538             public OnnxType type() {
 4539                 return type;
 4540             }
 4541 
 4542             @Override
 4543             public Quantifier quantifier() {
 4544                 return quantifier;
 4545             }
 4546         }
 4547 
 4548         public static final OnnxSchema SCHEMA = new OnnxSchemaRecord(
 4549                 NAME,
 4550                 List.of(Attribute.values()),
 4551                 List.of(TypeConstraint.values()),
 4552                 List.of(InputParameter.values()),
 4553                 List.of(OutputParameter.values())
 4554         );
 4555 
 4556         public Clip(ExternalizedOp def) {
 4557             super(SCHEMA, def);
 4558         }
 4559 
 4560         Clip(Clip that, CopyContext cc) {
 4561             super(that, cc);
 4562         }
 4563 
 4564         @Override
 4565         public Clip transform(CopyContext cc, OpTransformer ot) {
 4566             return new Clip(this, cc);
 4567         }
 4568 
 4569         Clip(TypeElement resultType, Value input, java.util.Optional<Value> min, java.util.Optional<Value> max) {
 4570             super(SCHEMA, resultType, Set.of(), List.of(input, min, max), List.of());
 4571         }
 4572 
 4573         @Override
 4574         public SequencedSet<OnnxParameter> onnxOutputs() {
 4575             return onnxOutputs(SCHEMA);
 4576         }
 4577 
 4578         @Override
 4579         public SequencedMap<OnnxParameter, Object> onnxInputs() {
 4580             return onnxInputs(SCHEMA, List.of(input(), min(), max()));
 4581         }
 4582 
 4583         public Value input() {
 4584             return operands().get(0);
 4585         }
 4586 
 4587         public java.util.Optional<Value> min() {
 4588             int i = optionalInputArguments.indexOf(InputParameter.min);
 4589             return i != -1 ? java.util.Optional.of(operands().get(1 + i)) : java.util.Optional.empty();
 4590         }
 4591 
 4592         public java.util.Optional<Value> max() {
 4593             int i = optionalInputArguments.indexOf(InputParameter.max);
 4594             return i != -1 ? java.util.Optional.of(operands().get(1 + i)) : java.util.Optional.empty();
 4595         }
 4596 
 4597     }
 4598 
 4599     public static Clip Clip(TypeElement resultType, Value input, java.util.Optional<Value> min, java.util.Optional<Value> max) {
 4600         return new Clip(resultType, input, min, max);
 4601     }
 4602 
 4603     @OpFactory.OpDeclaration(Col2Im.NAME)
 4604     public static final class Col2Im extends OnnxOp {
 4605         public static final String NAME = "Col2Im";
 4606 
 4607         public enum Attribute implements OnnxAttribute {
 4608             pads(int[].class, true, null),
 4609             dilations(int[].class, true, null),
 4610             strides(int[].class, true, null),
 4611             ;
 4612 
 4613                 final Class<?> t;
 4614                 final boolean optional;
 4615                 final Object defaultValue;
 4616 
 4617                 Attribute(Class<?> type, boolean optional, Object defaultValue) {
 4618                     this.t = type;
 4619                     this.optional = optional;
 4620                     this.defaultValue = defaultValue;
 4621                     assert optional || defaultValue == null;
 4622                 }
 4623 
 4624                 public Class<?> type() {
 4625                     return t;
 4626                 }
 4627 
 4628                 public boolean isOptional() {
 4629                     return optional;
 4630                 }
 4631 
 4632                 public Object defaultValue() {
 4633                     return defaultValue;
 4634                 }
 4635         }
 4636 
 4637         public enum TypeConstraint implements OnnxTypeConstraint {
 4638             T(new OnnxType.TypeVariable("T", List.of(OnnxType.tensor(OnnxType.uint8()), OnnxType.tensor(OnnxType.uint16()), OnnxType.tensor(OnnxType.uint32()), OnnxType.tensor(OnnxType.uint64()), OnnxType.tensor(OnnxType.int8()), OnnxType.tensor(OnnxType.int16()), OnnxType.tensor(OnnxType.int32()), OnnxType.tensor(OnnxType.int64()), OnnxType.tensor(OnnxType.bfloat16()), OnnxType.tensor(OnnxType.float16()), OnnxType.tensor(OnnxType.float32()), OnnxType.tensor(OnnxType.float64()), OnnxType.tensor(OnnxType.string()), OnnxType.tensor(OnnxType.bool()), OnnxType.tensor(OnnxType.complex64()), OnnxType.tensor(OnnxType.complex128())))),
 4639             ;
 4640 
 4641             final OnnxType.TypeVariable typeVariable;
 4642 
 4643             TypeConstraint(OnnxType.TypeVariable typeVariable) {
 4644                 assert typeVariable.name().equals(name());
 4645                 this.typeVariable = typeVariable;
 4646             }
 4647 
 4648             @Override
 4649             public OnnxType.TypeVariable typeVariable() {
 4650                 return typeVariable;
 4651             }
 4652         }
 4653 
 4654         public enum InputParameter implements OnnxParameter {
 4655             input(TypeConstraint.T.typeVariable(), Quantifier.REQUIRED),
 4656             image_shape(OnnxType.tensor(OnnxType.int64()), Quantifier.REQUIRED),
 4657             block_shape(OnnxType.tensor(OnnxType.int64()), Quantifier.REQUIRED),
 4658             ;
 4659 
 4660             final OnnxType type;
 4661             final Quantifier quantifier;
 4662 
 4663             InputParameter(OnnxType type, Quantifier quantifier) {
 4664                 this.type = type;
 4665                 this.quantifier = quantifier;
 4666             }
 4667 
 4668             @Override
 4669             public OnnxType type() {
 4670                 return type;
 4671             }
 4672 
 4673             @Override
 4674             public Quantifier quantifier() {
 4675                 return quantifier;
 4676             }
 4677         }
 4678 
 4679         public enum OutputParameter implements OnnxParameter {
 4680             output(TypeConstraint.T.typeVariable(), Quantifier.REQUIRED),
 4681             ;
 4682 
 4683             final OnnxType type;
 4684             final Quantifier quantifier;
 4685 
 4686             OutputParameter(OnnxType type, Quantifier quantifier) {
 4687                 this.type = type;
 4688                 this.quantifier = quantifier;
 4689             }
 4690 
 4691             @Override
 4692             public OnnxType type() {
 4693                 return type;
 4694             }
 4695 
 4696             @Override
 4697             public Quantifier quantifier() {
 4698                 return quantifier;
 4699             }
 4700         }
 4701 
 4702         public static final OnnxSchema SCHEMA = new OnnxSchemaRecord(
 4703                 NAME,
 4704                 List.of(Attribute.values()),
 4705                 List.of(TypeConstraint.values()),
 4706                 List.of(InputParameter.values()),
 4707                 List.of(OutputParameter.values())
 4708         );
 4709 
 4710         public Col2Im(ExternalizedOp def) {
 4711             super(SCHEMA, def);
 4712         }
 4713 
 4714         Col2Im(Col2Im that, CopyContext cc) {
 4715             super(that, cc);
 4716         }
 4717 
 4718         @Override
 4719         public Col2Im transform(CopyContext cc, OpTransformer ot) {
 4720             return new Col2Im(this, cc);
 4721         }
 4722 
 4723         Col2Im(TypeElement resultType, Value input, Value image_shape, Value block_shape, java.util.Optional<int[]> pads, java.util.Optional<int[]> dilations, java.util.Optional<int[]> strides) {
 4724             super(SCHEMA, resultType, Set.of(), List.of(input, image_shape, block_shape), List.of(pads, dilations, strides));
 4725         }
 4726 
 4727         @Override
 4728         public SequencedSet<OnnxParameter> onnxOutputs() {
 4729             return onnxOutputs(SCHEMA);
 4730         }
 4731 
 4732         @Override
 4733         public SequencedMap<OnnxParameter, Object> onnxInputs() {
 4734             return onnxInputs(SCHEMA, List.of(input(), image_shape(), block_shape()));
 4735         }
 4736 
 4737         public Value input() {
 4738             return operands().get(0);
 4739         }
 4740 
 4741         public Value image_shape() {
 4742             return operands().get(1);
 4743         }
 4744 
 4745         public Value block_shape() {
 4746             return operands().get(2);
 4747         }
 4748 
 4749         public java.util.Optional<int[]> pads() {
 4750             int[] pads = Attribute.pads.access(int[].class, onnxAttributes);
 4751             return java.util.Optional.ofNullable(pads).map(int[]::clone);
 4752         }
 4753 
 4754         public java.util.Optional<int[]> dilations() {
 4755             int[] dilations = Attribute.dilations.access(int[].class, onnxAttributes);
 4756             return java.util.Optional.ofNullable(dilations).map(int[]::clone);
 4757         }
 4758 
 4759         public java.util.Optional<int[]> strides() {
 4760             int[] strides = Attribute.strides.access(int[].class, onnxAttributes);
 4761             return java.util.Optional.ofNullable(strides).map(int[]::clone);
 4762         }
 4763 
 4764     }
 4765 
 4766     public static Col2Im Col2Im(TypeElement resultType, Value input, Value image_shape, Value block_shape, java.util.Optional<int[]> pads, java.util.Optional<int[]> dilations, java.util.Optional<int[]> strides) {
 4767         return new Col2Im(resultType, input, image_shape, block_shape, pads, dilations, strides);
 4768     }
 4769 
 4770     @OpFactory.OpDeclaration(Compress.NAME)
 4771     public static final class Compress extends OnnxOp {
 4772         public static final String NAME = "Compress";
 4773 
 4774         public enum Attribute implements OnnxAttribute {
 4775             axis(Integer.class, true, null),
 4776             ;
 4777 
 4778                 final Class<?> t;
 4779                 final boolean optional;
 4780                 final Object defaultValue;
 4781 
 4782                 Attribute(Class<?> type, boolean optional, Object defaultValue) {
 4783                     this.t = type;
 4784                     this.optional = optional;
 4785                     this.defaultValue = defaultValue;
 4786                     assert optional || defaultValue == null;
 4787                 }
 4788 
 4789                 public Class<?> type() {
 4790                     return t;
 4791                 }
 4792 
 4793                 public boolean isOptional() {
 4794                     return optional;
 4795                 }
 4796 
 4797                 public Object defaultValue() {
 4798                     return defaultValue;
 4799                 }
 4800         }
 4801 
 4802         public enum TypeConstraint implements OnnxTypeConstraint {
 4803             T(new OnnxType.TypeVariable("T", List.of(OnnxType.tensor(OnnxType.uint8()), OnnxType.tensor(OnnxType.uint16()), OnnxType.tensor(OnnxType.uint32()), OnnxType.tensor(OnnxType.uint64()), OnnxType.tensor(OnnxType.int8()), OnnxType.tensor(OnnxType.int16()), OnnxType.tensor(OnnxType.int32()), OnnxType.tensor(OnnxType.int64()), OnnxType.tensor(OnnxType.float16()), OnnxType.tensor(OnnxType.float32()), OnnxType.tensor(OnnxType.float64()), OnnxType.tensor(OnnxType.string()), OnnxType.tensor(OnnxType.bool()), OnnxType.tensor(OnnxType.complex64()), OnnxType.tensor(OnnxType.complex128())))),
 4804             T1(new OnnxType.TypeVariable("T1", List.of(OnnxType.tensor(OnnxType.bool())))),
 4805             ;
 4806 
 4807             final OnnxType.TypeVariable typeVariable;
 4808 
 4809             TypeConstraint(OnnxType.TypeVariable typeVariable) {
 4810                 assert typeVariable.name().equals(name());
 4811                 this.typeVariable = typeVariable;
 4812             }
 4813 
 4814             @Override
 4815             public OnnxType.TypeVariable typeVariable() {
 4816                 return typeVariable;
 4817             }
 4818         }
 4819 
 4820         public enum InputParameter implements OnnxParameter {
 4821             input(TypeConstraint.T.typeVariable(), Quantifier.REQUIRED),
 4822             condition(TypeConstraint.T1.typeVariable(), Quantifier.REQUIRED),
 4823             ;
 4824 
 4825             final OnnxType type;
 4826             final Quantifier quantifier;
 4827 
 4828             InputParameter(OnnxType type, Quantifier quantifier) {
 4829                 this.type = type;
 4830                 this.quantifier = quantifier;
 4831             }
 4832 
 4833             @Override
 4834             public OnnxType type() {
 4835                 return type;
 4836             }
 4837 
 4838             @Override
 4839             public Quantifier quantifier() {
 4840                 return quantifier;
 4841             }
 4842         }
 4843 
 4844         public enum OutputParameter implements OnnxParameter {
 4845             output(TypeConstraint.T.typeVariable(), Quantifier.REQUIRED),
 4846             ;
 4847 
 4848             final OnnxType type;
 4849             final Quantifier quantifier;
 4850 
 4851             OutputParameter(OnnxType type, Quantifier quantifier) {
 4852                 this.type = type;
 4853                 this.quantifier = quantifier;
 4854             }
 4855 
 4856             @Override
 4857             public OnnxType type() {
 4858                 return type;
 4859             }
 4860 
 4861             @Override
 4862             public Quantifier quantifier() {
 4863                 return quantifier;
 4864             }
 4865         }
 4866 
 4867         public static final OnnxSchema SCHEMA = new OnnxSchemaRecord(
 4868                 NAME,
 4869                 List.of(Attribute.values()),
 4870                 List.of(TypeConstraint.values()),
 4871                 List.of(InputParameter.values()),
 4872                 List.of(OutputParameter.values())
 4873         );
 4874 
 4875         public Compress(ExternalizedOp def) {
 4876             super(SCHEMA, def);
 4877         }
 4878 
 4879         Compress(Compress that, CopyContext cc) {
 4880             super(that, cc);
 4881         }
 4882 
 4883         @Override
 4884         public Compress transform(CopyContext cc, OpTransformer ot) {
 4885             return new Compress(this, cc);
 4886         }
 4887 
 4888         Compress(TypeElement resultType, Value input, Value condition, java.util.Optional<Integer> axis) {
 4889             super(SCHEMA, resultType, Set.of(), List.of(input, condition), List.of(axis));
 4890         }
 4891 
 4892         @Override
 4893         public SequencedSet<OnnxParameter> onnxOutputs() {
 4894             return onnxOutputs(SCHEMA);
 4895         }
 4896 
 4897         @Override
 4898         public SequencedMap<OnnxParameter, Object> onnxInputs() {
 4899             return onnxInputs(SCHEMA, List.of(input(), condition()));
 4900         }
 4901 
 4902         public Value input() {
 4903             return operands().get(0);
 4904         }
 4905 
 4906         public Value condition() {
 4907             return operands().get(1);
 4908         }
 4909 
 4910         public java.util.Optional<Integer> axis() {
 4911             Integer axis = Attribute.axis.access(Integer.class, onnxAttributes);
 4912             return java.util.Optional.ofNullable(axis);
 4913         }
 4914 
 4915     }
 4916 
 4917     public static Compress Compress(TypeElement resultType, Value input, Value condition, java.util.Optional<Integer> axis) {
 4918         return new Compress(resultType, input, condition, axis);
 4919     }
 4920 
 4921     @OpFactory.OpDeclaration(Concat.NAME)
 4922     public static final class Concat extends OnnxOp {
 4923         public static final String NAME = "Concat";
 4924 
 4925         public enum Attribute implements OnnxAttribute {
 4926             axis(Integer.class, false, null),
 4927             ;
 4928 
 4929                 final Class<?> t;
 4930                 final boolean optional;
 4931                 final Object defaultValue;
 4932 
 4933                 Attribute(Class<?> type, boolean optional, Object defaultValue) {
 4934                     this.t = type;
 4935                     this.optional = optional;
 4936                     this.defaultValue = defaultValue;
 4937                     assert optional || defaultValue == null;
 4938                 }
 4939 
 4940                 public Class<?> type() {
 4941                     return t;
 4942                 }
 4943 
 4944                 public boolean isOptional() {
 4945                     return optional;
 4946                 }
 4947 
 4948                 public Object defaultValue() {
 4949                     return defaultValue;
 4950                 }
 4951         }
 4952 
 4953         public enum TypeConstraint implements OnnxTypeConstraint {
 4954             T(new OnnxType.TypeVariable("T", List.of(OnnxType.tensor(OnnxType.uint8()), OnnxType.tensor(OnnxType.uint16()), OnnxType.tensor(OnnxType.uint32()), OnnxType.tensor(OnnxType.uint64()), OnnxType.tensor(OnnxType.int8()), OnnxType.tensor(OnnxType.int16()), OnnxType.tensor(OnnxType.int32()), OnnxType.tensor(OnnxType.int64()), OnnxType.tensor(OnnxType.bfloat16()), OnnxType.tensor(OnnxType.float16()), OnnxType.tensor(OnnxType.float32()), OnnxType.tensor(OnnxType.float64()), OnnxType.tensor(OnnxType.string()), OnnxType.tensor(OnnxType.bool()), OnnxType.tensor(OnnxType.complex64()), OnnxType.tensor(OnnxType.complex128())))),
 4955             ;
 4956 
 4957             final OnnxType.TypeVariable typeVariable;
 4958 
 4959             TypeConstraint(OnnxType.TypeVariable typeVariable) {
 4960                 assert typeVariable.name().equals(name());
 4961                 this.typeVariable = typeVariable;
 4962             }
 4963 
 4964             @Override
 4965             public OnnxType.TypeVariable typeVariable() {
 4966                 return typeVariable;
 4967             }
 4968         }
 4969 
 4970         public enum InputParameter implements OnnxParameter {
 4971             inputs(TypeConstraint.T.typeVariable(), Quantifier.VARIADIC),
 4972             ;
 4973 
 4974             final OnnxType type;
 4975             final Quantifier quantifier;
 4976 
 4977             InputParameter(OnnxType type, Quantifier quantifier) {
 4978                 this.type = type;
 4979                 this.quantifier = quantifier;
 4980             }
 4981 
 4982             @Override
 4983             public OnnxType type() {
 4984                 return type;
 4985             }
 4986 
 4987             @Override
 4988             public Quantifier quantifier() {
 4989                 return quantifier;
 4990             }
 4991         }
 4992 
 4993         public enum OutputParameter implements OnnxParameter {
 4994             concat_result(TypeConstraint.T.typeVariable(), Quantifier.REQUIRED),
 4995             ;
 4996 
 4997             final OnnxType type;
 4998             final Quantifier quantifier;
 4999 
 5000             OutputParameter(OnnxType type, Quantifier quantifier) {
 5001                 this.type = type;
 5002                 this.quantifier = quantifier;
 5003             }
 5004 
 5005             @Override
 5006             public OnnxType type() {
 5007                 return type;
 5008             }
 5009 
 5010             @Override
 5011             public Quantifier quantifier() {
 5012                 return quantifier;
 5013             }
 5014         }
 5015 
 5016         public static final OnnxSchema SCHEMA = new OnnxSchemaRecord(
 5017                 NAME,
 5018                 List.of(Attribute.values()),
 5019                 List.of(TypeConstraint.values()),
 5020                 List.of(InputParameter.values()),
 5021                 List.of(OutputParameter.values())
 5022         );
 5023 
 5024         public Concat(ExternalizedOp def) {
 5025             super(SCHEMA, def);
 5026         }
 5027 
 5028         Concat(Concat that, CopyContext cc) {
 5029             super(that, cc);
 5030         }
 5031 
 5032         @Override
 5033         public Concat transform(CopyContext cc, OpTransformer ot) {
 5034             return new Concat(this, cc);
 5035         }
 5036 
 5037         Concat(TypeElement resultType, List<Value> inputs, int axis) {
 5038             super(SCHEMA, resultType, Set.of(), List.of(inputs), List.of(axis));
 5039         }
 5040 
 5041         @Override
 5042         public SequencedSet<OnnxParameter> onnxOutputs() {
 5043             return onnxOutputs(SCHEMA);
 5044         }
 5045 
 5046         @Override
 5047         public SequencedMap<OnnxParameter, Object> onnxInputs() {
 5048             return onnxInputs(SCHEMA, List.of(inputs()));
 5049         }
 5050 
 5051         public List<Value> inputs() {
 5052             return operands();
 5053         }
 5054 
 5055         public int axis() {
 5056             int axis = Attribute.axis.access(int.class, onnxAttributes);
 5057             return axis;
 5058         }
 5059 
 5060     }
 5061 
 5062     public static Concat Concat(TypeElement resultType, List<Value> inputs, int axis) {
 5063         return new Concat(resultType, inputs, axis);
 5064     }
 5065 
 5066     @OpFactory.OpDeclaration(ConcatFromSequence.NAME)
 5067     public static final class ConcatFromSequence extends OnnxOp {
 5068         public static final String NAME = "ConcatFromSequence";
 5069 
 5070         public enum Attribute implements OnnxAttribute {
 5071             axis(Integer.class, false, null),
 5072             new_axis(Integer.class, true, 0),
 5073             ;
 5074 
 5075                 final Class<?> t;
 5076                 final boolean optional;
 5077                 final Object defaultValue;
 5078 
 5079                 Attribute(Class<?> type, boolean optional, Object defaultValue) {
 5080                     this.t = type;
 5081                     this.optional = optional;
 5082                     this.defaultValue = defaultValue;
 5083                     assert optional || defaultValue == null;
 5084                 }
 5085 
 5086                 public Class<?> type() {
 5087                     return t;
 5088                 }
 5089 
 5090                 public boolean isOptional() {
 5091                     return optional;
 5092                 }
 5093 
 5094                 public Object defaultValue() {
 5095                     return defaultValue;
 5096                 }
 5097         }
 5098 
 5099         public enum TypeConstraint implements OnnxTypeConstraint {
 5100             S(new OnnxType.TypeVariable("S", List.of(OnnxType.seq(OnnxType.tensor(OnnxType.uint8())), OnnxType.seq(OnnxType.tensor(OnnxType.uint16())), OnnxType.seq(OnnxType.tensor(OnnxType.uint32())), OnnxType.seq(OnnxType.tensor(OnnxType.uint64())), OnnxType.seq(OnnxType.tensor(OnnxType.int8())), OnnxType.seq(OnnxType.tensor(OnnxType.int16())), OnnxType.seq(OnnxType.tensor(OnnxType.int32())), OnnxType.seq(OnnxType.tensor(OnnxType.int64())), OnnxType.seq(OnnxType.tensor(OnnxType.float16())), OnnxType.seq(OnnxType.tensor(OnnxType.float32())), OnnxType.seq(OnnxType.tensor(OnnxType.float64())), OnnxType.seq(OnnxType.tensor(OnnxType.string())), OnnxType.seq(OnnxType.tensor(OnnxType.bool())), OnnxType.seq(OnnxType.tensor(OnnxType.complex64())), OnnxType.seq(OnnxType.tensor(OnnxType.complex128()))))),
 5101             T(new OnnxType.TypeVariable("T", List.of(OnnxType.tensor(OnnxType.uint8()), OnnxType.tensor(OnnxType.uint16()), OnnxType.tensor(OnnxType.uint32()), OnnxType.tensor(OnnxType.uint64()), OnnxType.tensor(OnnxType.int8()), OnnxType.tensor(OnnxType.int16()), OnnxType.tensor(OnnxType.int32()), OnnxType.tensor(OnnxType.int64()), OnnxType.tensor(OnnxType.float16()), OnnxType.tensor(OnnxType.float32()), OnnxType.tensor(OnnxType.float64()), OnnxType.tensor(OnnxType.string()), OnnxType.tensor(OnnxType.bool()), OnnxType.tensor(OnnxType.complex64()), OnnxType.tensor(OnnxType.complex128())))),
 5102             ;
 5103 
 5104             final OnnxType.TypeVariable typeVariable;
 5105 
 5106             TypeConstraint(OnnxType.TypeVariable typeVariable) {
 5107                 assert typeVariable.name().equals(name());
 5108                 this.typeVariable = typeVariable;
 5109             }
 5110 
 5111             @Override
 5112             public OnnxType.TypeVariable typeVariable() {
 5113                 return typeVariable;
 5114             }
 5115         }
 5116 
 5117         public enum InputParameter implements OnnxParameter {
 5118             input_sequence(TypeConstraint.S.typeVariable(), Quantifier.REQUIRED),
 5119             ;
 5120 
 5121             final OnnxType type;
 5122             final Quantifier quantifier;
 5123 
 5124             InputParameter(OnnxType type, Quantifier quantifier) {
 5125                 this.type = type;
 5126                 this.quantifier = quantifier;
 5127             }
 5128 
 5129             @Override
 5130             public OnnxType type() {
 5131                 return type;
 5132             }
 5133 
 5134             @Override
 5135             public Quantifier quantifier() {
 5136                 return quantifier;
 5137             }
 5138         }
 5139 
 5140         public enum OutputParameter implements OnnxParameter {
 5141             concat_result(TypeConstraint.T.typeVariable(), Quantifier.REQUIRED),
 5142             ;
 5143 
 5144             final OnnxType type;
 5145             final Quantifier quantifier;
 5146 
 5147             OutputParameter(OnnxType type, Quantifier quantifier) {
 5148                 this.type = type;
 5149                 this.quantifier = quantifier;
 5150             }
 5151 
 5152             @Override
 5153             public OnnxType type() {
 5154                 return type;
 5155             }
 5156 
 5157             @Override
 5158             public Quantifier quantifier() {
 5159                 return quantifier;
 5160             }
 5161         }
 5162 
 5163         public static final OnnxSchema SCHEMA = new OnnxSchemaRecord(
 5164                 NAME,
 5165                 List.of(Attribute.values()),
 5166                 List.of(TypeConstraint.values()),
 5167                 List.of(InputParameter.values()),
 5168                 List.of(OutputParameter.values())
 5169         );
 5170 
 5171         public ConcatFromSequence(ExternalizedOp def) {
 5172             super(SCHEMA, def);
 5173         }
 5174 
 5175         ConcatFromSequence(ConcatFromSequence that, CopyContext cc) {
 5176             super(that, cc);
 5177         }
 5178 
 5179         @Override
 5180         public ConcatFromSequence transform(CopyContext cc, OpTransformer ot) {
 5181             return new ConcatFromSequence(this, cc);
 5182         }
 5183 
 5184         ConcatFromSequence(TypeElement resultType, Value input_sequence, int axis, java.util.Optional<Integer> new_axis) {
 5185             super(SCHEMA, resultType, Set.of(), List.of(input_sequence), List.of(axis, new_axis));
 5186         }
 5187 
 5188         @Override
 5189         public SequencedSet<OnnxParameter> onnxOutputs() {
 5190             return onnxOutputs(SCHEMA);
 5191         }
 5192 
 5193         @Override
 5194         public SequencedMap<OnnxParameter, Object> onnxInputs() {
 5195             return onnxInputs(SCHEMA, List.of(input_sequence()));
 5196         }
 5197 
 5198         public Value input_sequence() {
 5199             return operands().get(0);
 5200         }
 5201 
 5202         public int axis() {
 5203             int axis = Attribute.axis.access(int.class, onnxAttributes);
 5204             return axis;
 5205         }
 5206 
 5207         public java.util.Optional<Integer> new_axis() {
 5208             Integer new_axis = Attribute.new_axis.access(Integer.class, onnxAttributes);
 5209             return java.util.Optional.ofNullable(new_axis);
 5210         }
 5211 
 5212     }
 5213 
 5214     public static ConcatFromSequence ConcatFromSequence(TypeElement resultType, Value input_sequence, int axis, java.util.Optional<Integer> new_axis) {
 5215         return new ConcatFromSequence(resultType, input_sequence, axis, new_axis);
 5216     }
 5217 
 5218     @OpFactory.OpDeclaration(Constant.NAME)
 5219     public static final class Constant extends OnnxOp {
 5220         public static final String NAME = "Constant";
 5221 
 5222         public enum Attribute implements OnnxAttribute {
 5223             value_int(Integer.class, true, null),
 5224             value_floats(float[].class, true, null),
 5225             value_strings(String[].class, true, null),
 5226             value_float(Float.class, true, null),
 5227             value_string(String.class, true, null),
 5228             value_ints(int[].class, true, null),
 5229             sparse_value(byte[].class, true, null),
 5230             value(byte[].class, true, null),
 5231             ;
 5232 
 5233                 final Class<?> t;
 5234                 final boolean optional;
 5235                 final Object defaultValue;
 5236 
 5237                 Attribute(Class<?> type, boolean optional, Object defaultValue) {
 5238                     this.t = type;
 5239                     this.optional = optional;
 5240                     this.defaultValue = defaultValue;
 5241                     assert optional || defaultValue == null;
 5242                 }
 5243 
 5244                 public Class<?> type() {
 5245                     return t;
 5246                 }
 5247 
 5248                 public boolean isOptional() {
 5249                     return optional;
 5250                 }
 5251 
 5252                 public Object defaultValue() {
 5253                     return defaultValue;
 5254                 }
 5255         }
 5256 
 5257         public enum TypeConstraint implements OnnxTypeConstraint {
 5258             T(new OnnxType.TypeVariable("T", List.of(OnnxType.tensor(OnnxType.uint8()), OnnxType.tensor(OnnxType.uint16()), OnnxType.tensor(OnnxType.uint32()), OnnxType.tensor(OnnxType.uint64()), OnnxType.tensor(OnnxType.int8()), OnnxType.tensor(OnnxType.int16()), OnnxType.tensor(OnnxType.int32()), OnnxType.tensor(OnnxType.int64()), OnnxType.tensor(OnnxType.bfloat16()), OnnxType.tensor(OnnxType.float16()), OnnxType.tensor(OnnxType.float32()), OnnxType.tensor(OnnxType.float64()), OnnxType.tensor(OnnxType.string()), OnnxType.tensor(OnnxType.bool()), OnnxType.tensor(OnnxType.complex64()), OnnxType.tensor(OnnxType.complex128()), OnnxType.tensor(OnnxType.float8e4m3fn()), OnnxType.tensor(OnnxType.float8e4m3fnuz()), OnnxType.tensor(OnnxType.float8e5m2()), OnnxType.tensor(OnnxType.float8e5m2fnuz()), OnnxType.tensor(OnnxType.uint4()), OnnxType.tensor(OnnxType.int4()), OnnxType.tensor(OnnxType.float4e2m1())))),
 5259             ;
 5260 
 5261             final OnnxType.TypeVariable typeVariable;
 5262 
 5263             TypeConstraint(OnnxType.TypeVariable typeVariable) {
 5264                 assert typeVariable.name().equals(name());
 5265                 this.typeVariable = typeVariable;
 5266             }
 5267 
 5268             @Override
 5269             public OnnxType.TypeVariable typeVariable() {
 5270                 return typeVariable;
 5271             }
 5272         }
 5273 
 5274         public enum InputParameter implements OnnxParameter.None { }
 5275 
 5276         public enum OutputParameter implements OnnxParameter {
 5277             output(TypeConstraint.T.typeVariable(), Quantifier.REQUIRED),
 5278             ;
 5279 
 5280             final OnnxType type;
 5281             final Quantifier quantifier;
 5282 
 5283             OutputParameter(OnnxType type, Quantifier quantifier) {
 5284                 this.type = type;
 5285                 this.quantifier = quantifier;
 5286             }
 5287 
 5288             @Override
 5289             public OnnxType type() {
 5290                 return type;
 5291             }
 5292 
 5293             @Override
 5294             public Quantifier quantifier() {
 5295                 return quantifier;
 5296             }
 5297         }
 5298 
 5299         public static final OnnxSchema SCHEMA = new OnnxSchemaRecord(
 5300                 NAME,
 5301                 List.of(Attribute.values()),
 5302                 List.of(TypeConstraint.values()),
 5303                 List.of(InputParameter.values()),
 5304                 List.of(OutputParameter.values())
 5305         );
 5306 
 5307         public Constant(ExternalizedOp def) {
 5308             super(SCHEMA, def);
 5309         }
 5310 
 5311         Constant(Constant that, CopyContext cc) {
 5312             super(that, cc);
 5313         }
 5314 
 5315         @Override
 5316         public Constant transform(CopyContext cc, OpTransformer ot) {
 5317             return new Constant(this, cc);
 5318         }
 5319 
 5320         Constant(TypeElement resultType, java.util.Optional<Integer> value_int, java.util.Optional<float[]> value_floats, java.util.Optional<String[]> value_strings, java.util.Optional<Float> value_float, java.util.Optional<String> value_string, java.util.Optional<int[]> value_ints, java.util.Optional<byte[]> sparse_value, java.util.Optional<byte[]> value) {
 5321             super(SCHEMA, resultType, Set.of(), List.of(), List.of(value_int, value_floats, value_strings, value_float, value_string, value_ints, sparse_value, value));
 5322         }
 5323 
 5324         @Override
 5325         public SequencedSet<OnnxParameter> onnxOutputs() {
 5326             return onnxOutputs(SCHEMA);
 5327         }
 5328 
 5329         @Override
 5330         public SequencedMap<OnnxParameter, Object> onnxInputs() {
 5331             return onnxInputs(SCHEMA, List.of());
 5332         }
 5333 
 5334         public java.util.Optional<Integer> value_int() {
 5335             Integer value_int = Attribute.value_int.access(Integer.class, onnxAttributes);
 5336             return java.util.Optional.ofNullable(value_int);
 5337         }
 5338 
 5339         public java.util.Optional<float[]> value_floats() {
 5340             float[] value_floats = Attribute.value_floats.access(float[].class, onnxAttributes);
 5341             return java.util.Optional.ofNullable(value_floats).map(float[]::clone);
 5342         }
 5343 
 5344         public java.util.Optional<String[]> value_strings() {
 5345             String[] value_strings = Attribute.value_strings.access(String[].class, onnxAttributes);
 5346             return java.util.Optional.ofNullable(value_strings).map(String[]::clone);
 5347         }
 5348 
 5349         public java.util.Optional<Float> value_float() {
 5350             Float value_float = Attribute.value_float.access(Float.class, onnxAttributes);
 5351             return java.util.Optional.ofNullable(value_float);
 5352         }
 5353 
 5354         public java.util.Optional<String> value_string() {
 5355             String value_string = Attribute.value_string.access(String.class, onnxAttributes);
 5356             return java.util.Optional.ofNullable(value_string);
 5357         }
 5358 
 5359         public java.util.Optional<int[]> value_ints() {
 5360             int[] value_ints = Attribute.value_ints.access(int[].class, onnxAttributes);
 5361             return java.util.Optional.ofNullable(value_ints).map(int[]::clone);
 5362         }
 5363 
 5364         public java.util.Optional<byte[]> sparse_value() {
 5365             byte[] sparse_value = Attribute.sparse_value.access(byte[].class, onnxAttributes);
 5366             return java.util.Optional.ofNullable(sparse_value).map(byte[]::clone);
 5367         }
 5368 
 5369         public java.util.Optional<byte[]> value() {
 5370             byte[] value = Attribute.value.access(byte[].class, onnxAttributes);
 5371             return java.util.Optional.ofNullable(value).map(byte[]::clone);
 5372         }
 5373 
 5374     }
 5375 
 5376     public static Constant Constant(TypeElement resultType, java.util.Optional<Integer> value_int, java.util.Optional<float[]> value_floats, java.util.Optional<String[]> value_strings, java.util.Optional<Float> value_float, java.util.Optional<String> value_string, java.util.Optional<int[]> value_ints, java.util.Optional<byte[]> sparse_value, java.util.Optional<byte[]> value) {
 5377         return new Constant(resultType, value_int, value_floats, value_strings, value_float, value_string, value_ints, sparse_value, value);
 5378     }
 5379 
 5380     @OpFactory.OpDeclaration(ConstantOfShape.NAME)
 5381     public static final class ConstantOfShape extends OnnxOp {
 5382         public static final String NAME = "ConstantOfShape";
 5383 
 5384         public enum Attribute implements OnnxAttribute {
 5385             value(byte[].class, true, null),
 5386             ;
 5387 
 5388                 final Class<?> t;
 5389                 final boolean optional;
 5390                 final Object defaultValue;
 5391 
 5392                 Attribute(Class<?> type, boolean optional, Object defaultValue) {
 5393                     this.t = type;
 5394                     this.optional = optional;
 5395                     this.defaultValue = defaultValue;
 5396                     assert optional || defaultValue == null;
 5397                 }
 5398 
 5399                 public Class<?> type() {
 5400                     return t;
 5401                 }
 5402 
 5403                 public boolean isOptional() {
 5404                     return optional;
 5405                 }
 5406 
 5407                 public Object defaultValue() {
 5408                     return defaultValue;
 5409                 }
 5410         }
 5411 
 5412         public enum TypeConstraint implements OnnxTypeConstraint {
 5413             T1(new OnnxType.TypeVariable("T1", List.of(OnnxType.tensor(OnnxType.int64())))),
 5414             T2(new OnnxType.TypeVariable("T2", List.of(OnnxType.tensor(OnnxType.float16()), OnnxType.tensor(OnnxType.float32()), OnnxType.tensor(OnnxType.float64()), OnnxType.tensor(OnnxType.int8()), OnnxType.tensor(OnnxType.int16()), OnnxType.tensor(OnnxType.int32()), OnnxType.tensor(OnnxType.int64()), OnnxType.tensor(OnnxType.uint8()), OnnxType.tensor(OnnxType.uint16()), OnnxType.tensor(OnnxType.uint32()), OnnxType.tensor(OnnxType.uint64()), OnnxType.tensor(OnnxType.uint4()), OnnxType.tensor(OnnxType.int4()), OnnxType.tensor(OnnxType.bool()), OnnxType.tensor(OnnxType.bfloat16()), OnnxType.tensor(OnnxType.float8e4m3fn()), OnnxType.tensor(OnnxType.float8e4m3fnuz()), OnnxType.tensor(OnnxType.float8e5m2()), OnnxType.tensor(OnnxType.float8e5m2fnuz()), OnnxType.tensor(OnnxType.float4e2m1())))),
 5415             ;
 5416 
 5417             final OnnxType.TypeVariable typeVariable;
 5418 
 5419             TypeConstraint(OnnxType.TypeVariable typeVariable) {
 5420                 assert typeVariable.name().equals(name());
 5421                 this.typeVariable = typeVariable;
 5422             }
 5423 
 5424             @Override
 5425             public OnnxType.TypeVariable typeVariable() {
 5426                 return typeVariable;
 5427             }
 5428         }
 5429 
 5430         public enum InputParameter implements OnnxParameter {
 5431             input(TypeConstraint.T1.typeVariable(), Quantifier.REQUIRED),
 5432             ;
 5433 
 5434             final OnnxType type;
 5435             final Quantifier quantifier;
 5436 
 5437             InputParameter(OnnxType type, Quantifier quantifier) {
 5438                 this.type = type;
 5439                 this.quantifier = quantifier;
 5440             }
 5441 
 5442             @Override
 5443             public OnnxType type() {
 5444                 return type;
 5445             }
 5446 
 5447             @Override
 5448             public Quantifier quantifier() {
 5449                 return quantifier;
 5450             }
 5451         }
 5452 
 5453         public enum OutputParameter implements OnnxParameter {
 5454             output(TypeConstraint.T2.typeVariable(), Quantifier.REQUIRED),
 5455             ;
 5456 
 5457             final OnnxType type;
 5458             final Quantifier quantifier;
 5459 
 5460             OutputParameter(OnnxType type, Quantifier quantifier) {
 5461                 this.type = type;
 5462                 this.quantifier = quantifier;
 5463             }
 5464 
 5465             @Override
 5466             public OnnxType type() {
 5467                 return type;
 5468             }
 5469 
 5470             @Override
 5471             public Quantifier quantifier() {
 5472                 return quantifier;
 5473             }
 5474         }
 5475 
 5476         public static final OnnxSchema SCHEMA = new OnnxSchemaRecord(
 5477                 NAME,
 5478                 List.of(Attribute.values()),
 5479                 List.of(TypeConstraint.values()),
 5480                 List.of(InputParameter.values()),
 5481                 List.of(OutputParameter.values())
 5482         );
 5483 
 5484         public ConstantOfShape(ExternalizedOp def) {
 5485             super(SCHEMA, def);
 5486         }
 5487 
 5488         ConstantOfShape(ConstantOfShape that, CopyContext cc) {
 5489             super(that, cc);
 5490         }
 5491 
 5492         @Override
 5493         public ConstantOfShape transform(CopyContext cc, OpTransformer ot) {
 5494             return new ConstantOfShape(this, cc);
 5495         }
 5496 
 5497         ConstantOfShape(TypeElement resultType, Value input, java.util.Optional<byte[]> value) {
 5498             super(SCHEMA, resultType, Set.of(), List.of(input), List.of(value));
 5499         }
 5500 
 5501         @Override
 5502         public SequencedSet<OnnxParameter> onnxOutputs() {
 5503             return onnxOutputs(SCHEMA);
 5504         }
 5505 
 5506         @Override
 5507         public SequencedMap<OnnxParameter, Object> onnxInputs() {
 5508             return onnxInputs(SCHEMA, List.of(input()));
 5509         }
 5510 
 5511         public Value input() {
 5512             return operands().get(0);
 5513         }
 5514 
 5515         public java.util.Optional<byte[]> value() {
 5516             byte[] value = Attribute.value.access(byte[].class, onnxAttributes);
 5517             return java.util.Optional.ofNullable(value).map(byte[]::clone);
 5518         }
 5519 
 5520     }
 5521 
 5522     public static ConstantOfShape ConstantOfShape(TypeElement resultType, Value input, java.util.Optional<byte[]> value) {
 5523         return new ConstantOfShape(resultType, input, value);
 5524     }
 5525 
 5526     @OpFactory.OpDeclaration(Conv.NAME)
 5527     public static final class Conv extends OnnxOp {
 5528         public static final String NAME = "Conv";
 5529 
 5530         public enum Attribute implements OnnxAttribute {
 5531             pads(int[].class, true, null),
 5532             dilations(int[].class, true, null),
 5533             auto_pad(String.class, true, "NOTSET"),
 5534             strides(int[].class, true, null),
 5535             group(Integer.class, true, 1),
 5536             kernel_shape(int[].class, true, null),
 5537             ;
 5538 
 5539                 final Class<?> t;
 5540                 final boolean optional;
 5541                 final Object defaultValue;
 5542 
 5543                 Attribute(Class<?> type, boolean optional, Object defaultValue) {
 5544                     this.t = type;
 5545                     this.optional = optional;
 5546                     this.defaultValue = defaultValue;
 5547                     assert optional || defaultValue == null;
 5548                 }
 5549 
 5550                 public Class<?> type() {
 5551                     return t;
 5552                 }
 5553 
 5554                 public boolean isOptional() {
 5555                     return optional;
 5556                 }
 5557 
 5558                 public Object defaultValue() {
 5559                     return defaultValue;
 5560                 }
 5561         }
 5562 
 5563         public enum TypeConstraint implements OnnxTypeConstraint {
 5564             T(new OnnxType.TypeVariable("T", List.of(OnnxType.tensor(OnnxType.bfloat16()), OnnxType.tensor(OnnxType.float16()), OnnxType.tensor(OnnxType.float32()), OnnxType.tensor(OnnxType.float64())))),
 5565             ;
 5566 
 5567             final OnnxType.TypeVariable typeVariable;
 5568 
 5569             TypeConstraint(OnnxType.TypeVariable typeVariable) {
 5570                 assert typeVariable.name().equals(name());
 5571                 this.typeVariable = typeVariable;
 5572             }
 5573 
 5574             @Override
 5575             public OnnxType.TypeVariable typeVariable() {
 5576                 return typeVariable;
 5577             }
 5578         }
 5579 
 5580         public enum InputParameter implements OnnxParameter {
 5581             X(TypeConstraint.T.typeVariable(), Quantifier.REQUIRED),
 5582             W(TypeConstraint.T.typeVariable(), Quantifier.REQUIRED),
 5583             B(TypeConstraint.T.typeVariable(), Quantifier.OPTIONAL),
 5584             ;
 5585 
 5586             final OnnxType type;
 5587             final Quantifier quantifier;
 5588 
 5589             InputParameter(OnnxType type, Quantifier quantifier) {
 5590                 this.type = type;
 5591                 this.quantifier = quantifier;
 5592             }
 5593 
 5594             @Override
 5595             public OnnxType type() {
 5596                 return type;
 5597             }
 5598 
 5599             @Override
 5600             public Quantifier quantifier() {
 5601                 return quantifier;
 5602             }
 5603         }
 5604 
 5605         public enum OutputParameter implements OnnxParameter {
 5606             Y(TypeConstraint.T.typeVariable(), Quantifier.REQUIRED),
 5607             ;
 5608 
 5609             final OnnxType type;
 5610             final Quantifier quantifier;
 5611 
 5612             OutputParameter(OnnxType type, Quantifier quantifier) {
 5613                 this.type = type;
 5614                 this.quantifier = quantifier;
 5615             }
 5616 
 5617             @Override
 5618             public OnnxType type() {
 5619                 return type;
 5620             }
 5621 
 5622             @Override
 5623             public Quantifier quantifier() {
 5624                 return quantifier;
 5625             }
 5626         }
 5627 
 5628         public static final OnnxSchema SCHEMA = new OnnxSchemaRecord(
 5629                 NAME,
 5630                 List.of(Attribute.values()),
 5631                 List.of(TypeConstraint.values()),
 5632                 List.of(InputParameter.values()),
 5633                 List.of(OutputParameter.values())
 5634         );
 5635 
 5636         public Conv(ExternalizedOp def) {
 5637             super(SCHEMA, def);
 5638         }
 5639 
 5640         Conv(Conv that, CopyContext cc) {
 5641             super(that, cc);
 5642         }
 5643 
 5644         @Override
 5645         public Conv transform(CopyContext cc, OpTransformer ot) {
 5646             return new Conv(this, cc);
 5647         }
 5648 
 5649         Conv(TypeElement resultType, Value X, Value W, java.util.Optional<Value> B, java.util.Optional<int[]> pads, java.util.Optional<int[]> dilations, java.util.Optional<String> auto_pad, java.util.Optional<int[]> strides, java.util.Optional<Integer> group, java.util.Optional<int[]> kernel_shape) {
 5650             super(SCHEMA, resultType, Set.of(), List.of(X, W, B), List.of(pads, dilations, auto_pad, strides, group, kernel_shape));
 5651         }
 5652 
 5653         @Override
 5654         public SequencedSet<OnnxParameter> onnxOutputs() {
 5655             return onnxOutputs(SCHEMA);
 5656         }
 5657 
 5658         @Override
 5659         public SequencedMap<OnnxParameter, Object> onnxInputs() {
 5660             return onnxInputs(SCHEMA, List.of(X(), W(), B()));
 5661         }
 5662 
 5663         public Value X() {
 5664             return operands().get(0);
 5665         }
 5666 
 5667         public Value W() {
 5668             return operands().get(1);
 5669         }
 5670 
 5671         public java.util.Optional<Value> B() {
 5672             int i = optionalInputArguments.indexOf(InputParameter.B);
 5673             return i != -1 ? java.util.Optional.of(operands().get(2 + i)) : java.util.Optional.empty();
 5674         }
 5675 
 5676         public java.util.Optional<int[]> pads() {
 5677             int[] pads = Attribute.pads.access(int[].class, onnxAttributes);
 5678             return java.util.Optional.ofNullable(pads).map(int[]::clone);
 5679         }
 5680 
 5681         public java.util.Optional<int[]> dilations() {
 5682             int[] dilations = Attribute.dilations.access(int[].class, onnxAttributes);
 5683             return java.util.Optional.ofNullable(dilations).map(int[]::clone);
 5684         }
 5685 
 5686         public java.util.Optional<String> auto_pad() {
 5687             String auto_pad = Attribute.auto_pad.access(String.class, onnxAttributes);
 5688             return java.util.Optional.ofNullable(auto_pad);
 5689         }
 5690 
 5691         public java.util.Optional<int[]> strides() {
 5692             int[] strides = Attribute.strides.access(int[].class, onnxAttributes);
 5693             return java.util.Optional.ofNullable(strides).map(int[]::clone);
 5694         }
 5695 
 5696         public java.util.Optional<Integer> group() {
 5697             Integer group = Attribute.group.access(Integer.class, onnxAttributes);
 5698             return java.util.Optional.ofNullable(group);
 5699         }
 5700 
 5701         public java.util.Optional<int[]> kernel_shape() {
 5702             int[] kernel_shape = Attribute.kernel_shape.access(int[].class, onnxAttributes);
 5703             return java.util.Optional.ofNullable(kernel_shape).map(int[]::clone);
 5704         }
 5705 
 5706     }
 5707 
 5708     public static Conv Conv(TypeElement resultType, Value X, Value W, java.util.Optional<Value> B, java.util.Optional<int[]> pads, java.util.Optional<int[]> dilations, java.util.Optional<String> auto_pad, java.util.Optional<int[]> strides, java.util.Optional<Integer> group, java.util.Optional<int[]> kernel_shape) {
 5709         return new Conv(resultType, X, W, B, pads, dilations, auto_pad, strides, group, kernel_shape);
 5710     }
 5711 
 5712     @OpFactory.OpDeclaration(ConvInteger.NAME)
 5713     public static final class ConvInteger extends OnnxOp {
 5714         public static final String NAME = "ConvInteger";
 5715 
 5716         public enum Attribute implements OnnxAttribute {
 5717             pads(int[].class, true, null),
 5718             dilations(int[].class, true, null),
 5719             auto_pad(String.class, true, "NOTSET"),
 5720             strides(int[].class, true, null),
 5721             group(Integer.class, true, 1),
 5722             kernel_shape(int[].class, true, null),
 5723             ;
 5724 
 5725                 final Class<?> t;
 5726                 final boolean optional;
 5727                 final Object defaultValue;
 5728 
 5729                 Attribute(Class<?> type, boolean optional, Object defaultValue) {
 5730                     this.t = type;
 5731                     this.optional = optional;
 5732                     this.defaultValue = defaultValue;
 5733                     assert optional || defaultValue == null;
 5734                 }
 5735 
 5736                 public Class<?> type() {
 5737                     return t;
 5738                 }
 5739 
 5740                 public boolean isOptional() {
 5741                     return optional;
 5742                 }
 5743 
 5744                 public Object defaultValue() {
 5745                     return defaultValue;
 5746                 }
 5747         }
 5748 
 5749         public enum TypeConstraint implements OnnxTypeConstraint {
 5750             T1(new OnnxType.TypeVariable("T1", List.of(OnnxType.tensor(OnnxType.int8()), OnnxType.tensor(OnnxType.uint8())))),
 5751             T2(new OnnxType.TypeVariable("T2", List.of(OnnxType.tensor(OnnxType.int8()), OnnxType.tensor(OnnxType.uint8())))),
 5752             T3(new OnnxType.TypeVariable("T3", List.of(OnnxType.tensor(OnnxType.int32())))),
 5753             ;
 5754 
 5755             final OnnxType.TypeVariable typeVariable;
 5756 
 5757             TypeConstraint(OnnxType.TypeVariable typeVariable) {
 5758                 assert typeVariable.name().equals(name());
 5759                 this.typeVariable = typeVariable;
 5760             }
 5761 
 5762             @Override
 5763             public OnnxType.TypeVariable typeVariable() {
 5764                 return typeVariable;
 5765             }
 5766         }
 5767 
 5768         public enum InputParameter implements OnnxParameter {
 5769             x(TypeConstraint.T1.typeVariable(), Quantifier.REQUIRED),
 5770             w(TypeConstraint.T2.typeVariable(), Quantifier.REQUIRED),
 5771             x_zero_point(TypeConstraint.T1.typeVariable(), Quantifier.OPTIONAL),
 5772             w_zero_point(TypeConstraint.T2.typeVariable(), Quantifier.OPTIONAL),
 5773             ;
 5774 
 5775             final OnnxType type;
 5776             final Quantifier quantifier;
 5777 
 5778             InputParameter(OnnxType type, Quantifier quantifier) {
 5779                 this.type = type;
 5780                 this.quantifier = quantifier;
 5781             }
 5782 
 5783             @Override
 5784             public OnnxType type() {
 5785                 return type;
 5786             }
 5787 
 5788             @Override
 5789             public Quantifier quantifier() {
 5790                 return quantifier;
 5791             }
 5792         }
 5793 
 5794         public enum OutputParameter implements OnnxParameter {
 5795             y(TypeConstraint.T3.typeVariable(), Quantifier.REQUIRED),
 5796             ;
 5797 
 5798             final OnnxType type;
 5799             final Quantifier quantifier;
 5800 
 5801             OutputParameter(OnnxType type, Quantifier quantifier) {
 5802                 this.type = type;
 5803                 this.quantifier = quantifier;
 5804             }
 5805 
 5806             @Override
 5807             public OnnxType type() {
 5808                 return type;
 5809             }
 5810 
 5811             @Override
 5812             public Quantifier quantifier() {
 5813                 return quantifier;
 5814             }
 5815         }
 5816 
 5817         public static final OnnxSchema SCHEMA = new OnnxSchemaRecord(
 5818                 NAME,
 5819                 List.of(Attribute.values()),
 5820                 List.of(TypeConstraint.values()),
 5821                 List.of(InputParameter.values()),
 5822                 List.of(OutputParameter.values())
 5823         );
 5824 
 5825         public ConvInteger(ExternalizedOp def) {
 5826             super(SCHEMA, def);
 5827         }
 5828 
 5829         ConvInteger(ConvInteger that, CopyContext cc) {
 5830             super(that, cc);
 5831         }
 5832 
 5833         @Override
 5834         public ConvInteger transform(CopyContext cc, OpTransformer ot) {
 5835             return new ConvInteger(this, cc);
 5836         }
 5837 
 5838         ConvInteger(TypeElement resultType, Value x, Value w, java.util.Optional<Value> x_zero_point, java.util.Optional<Value> w_zero_point, java.util.Optional<int[]> pads, java.util.Optional<int[]> dilations, java.util.Optional<String> auto_pad, java.util.Optional<int[]> strides, java.util.Optional<Integer> group, java.util.Optional<int[]> kernel_shape) {
 5839             super(SCHEMA, resultType, Set.of(), List.of(x, w, x_zero_point, w_zero_point), List.of(pads, dilations, auto_pad, strides, group, kernel_shape));
 5840         }
 5841 
 5842         @Override
 5843         public SequencedSet<OnnxParameter> onnxOutputs() {
 5844             return onnxOutputs(SCHEMA);
 5845         }
 5846 
 5847         @Override
 5848         public SequencedMap<OnnxParameter, Object> onnxInputs() {
 5849             return onnxInputs(SCHEMA, List.of(x(), w(), x_zero_point(), w_zero_point()));
 5850         }
 5851 
 5852         public Value x() {
 5853             return operands().get(0);
 5854         }
 5855 
 5856         public Value w() {
 5857             return operands().get(1);
 5858         }
 5859 
 5860         public java.util.Optional<Value> x_zero_point() {
 5861             int i = optionalInputArguments.indexOf(InputParameter.x_zero_point);
 5862             return i != -1 ? java.util.Optional.of(operands().get(2 + i)) : java.util.Optional.empty();
 5863         }
 5864 
 5865         public java.util.Optional<Value> w_zero_point() {
 5866             int i = optionalInputArguments.indexOf(InputParameter.w_zero_point);
 5867             return i != -1 ? java.util.Optional.of(operands().get(2 + i)) : java.util.Optional.empty();
 5868         }
 5869 
 5870         public java.util.Optional<int[]> pads() {
 5871             int[] pads = Attribute.pads.access(int[].class, onnxAttributes);
 5872             return java.util.Optional.ofNullable(pads).map(int[]::clone);
 5873         }
 5874 
 5875         public java.util.Optional<int[]> dilations() {
 5876             int[] dilations = Attribute.dilations.access(int[].class, onnxAttributes);
 5877             return java.util.Optional.ofNullable(dilations).map(int[]::clone);
 5878         }
 5879 
 5880         public java.util.Optional<String> auto_pad() {
 5881             String auto_pad = Attribute.auto_pad.access(String.class, onnxAttributes);
 5882             return java.util.Optional.ofNullable(auto_pad);
 5883         }
 5884 
 5885         public java.util.Optional<int[]> strides() {
 5886             int[] strides = Attribute.strides.access(int[].class, onnxAttributes);
 5887             return java.util.Optional.ofNullable(strides).map(int[]::clone);
 5888         }
 5889 
 5890         public java.util.Optional<Integer> group() {
 5891             Integer group = Attribute.group.access(Integer.class, onnxAttributes);
 5892             return java.util.Optional.ofNullable(group);
 5893         }
 5894 
 5895         public java.util.Optional<int[]> kernel_shape() {
 5896             int[] kernel_shape = Attribute.kernel_shape.access(int[].class, onnxAttributes);
 5897             return java.util.Optional.ofNullable(kernel_shape).map(int[]::clone);
 5898         }
 5899 
 5900     }
 5901 
 5902     public static ConvInteger ConvInteger(TypeElement resultType, Value x, Value w, java.util.Optional<Value> x_zero_point, java.util.Optional<Value> w_zero_point, java.util.Optional<int[]> pads, java.util.Optional<int[]> dilations, java.util.Optional<String> auto_pad, java.util.Optional<int[]> strides, java.util.Optional<Integer> group, java.util.Optional<int[]> kernel_shape) {
 5903         return new ConvInteger(resultType, x, w, x_zero_point, w_zero_point, pads, dilations, auto_pad, strides, group, kernel_shape);
 5904     }
 5905 
 5906     @OpFactory.OpDeclaration(ConvTranspose.NAME)
 5907     public static final class ConvTranspose extends OnnxOp {
 5908         public static final String NAME = "ConvTranspose";
 5909 
 5910         public enum Attribute implements OnnxAttribute {
 5911             output_shape(int[].class, true, null),
 5912             pads(int[].class, true, null),
 5913             dilations(int[].class, true, null),
 5914             auto_pad(String.class, true, "NOTSET"),
 5915             strides(int[].class, true, null),
 5916             group(Integer.class, true, 1),
 5917             kernel_shape(int[].class, true, null),
 5918             output_padding(int[].class, true, null),
 5919             ;
 5920 
 5921                 final Class<?> t;
 5922                 final boolean optional;
 5923                 final Object defaultValue;
 5924 
 5925                 Attribute(Class<?> type, boolean optional, Object defaultValue) {
 5926                     this.t = type;
 5927                     this.optional = optional;
 5928                     this.defaultValue = defaultValue;
 5929                     assert optional || defaultValue == null;
 5930                 }
 5931 
 5932                 public Class<?> type() {
 5933                     return t;
 5934                 }
 5935 
 5936                 public boolean isOptional() {
 5937                     return optional;
 5938                 }
 5939 
 5940                 public Object defaultValue() {
 5941                     return defaultValue;
 5942                 }
 5943         }
 5944 
 5945         public enum TypeConstraint implements OnnxTypeConstraint {
 5946             T(new OnnxType.TypeVariable("T", List.of(OnnxType.tensor(OnnxType.bfloat16()), OnnxType.tensor(OnnxType.float16()), OnnxType.tensor(OnnxType.float32()), OnnxType.tensor(OnnxType.float64())))),
 5947             ;
 5948 
 5949             final OnnxType.TypeVariable typeVariable;
 5950 
 5951             TypeConstraint(OnnxType.TypeVariable typeVariable) {
 5952                 assert typeVariable.name().equals(name());
 5953                 this.typeVariable = typeVariable;
 5954             }
 5955 
 5956             @Override
 5957             public OnnxType.TypeVariable typeVariable() {
 5958                 return typeVariable;
 5959             }
 5960         }
 5961 
 5962         public enum InputParameter implements OnnxParameter {
 5963             X(TypeConstraint.T.typeVariable(), Quantifier.REQUIRED),
 5964             W(TypeConstraint.T.typeVariable(), Quantifier.REQUIRED),
 5965             B(TypeConstraint.T.typeVariable(), Quantifier.OPTIONAL),
 5966             ;
 5967 
 5968             final OnnxType type;
 5969             final Quantifier quantifier;
 5970 
 5971             InputParameter(OnnxType type, Quantifier quantifier) {
 5972                 this.type = type;
 5973                 this.quantifier = quantifier;
 5974             }
 5975 
 5976             @Override
 5977             public OnnxType type() {
 5978                 return type;
 5979             }
 5980 
 5981             @Override
 5982             public Quantifier quantifier() {
 5983                 return quantifier;
 5984             }
 5985         }
 5986 
 5987         public enum OutputParameter implements OnnxParameter {
 5988             Y(TypeConstraint.T.typeVariable(), Quantifier.REQUIRED),
 5989             ;
 5990 
 5991             final OnnxType type;
 5992             final Quantifier quantifier;
 5993 
 5994             OutputParameter(OnnxType type, Quantifier quantifier) {
 5995                 this.type = type;
 5996                 this.quantifier = quantifier;
 5997             }
 5998 
 5999             @Override
 6000             public OnnxType type() {
 6001                 return type;
 6002             }
 6003 
 6004             @Override
 6005             public Quantifier quantifier() {
 6006                 return quantifier;
 6007             }
 6008         }
 6009 
 6010         public static final OnnxSchema SCHEMA = new OnnxSchemaRecord(
 6011                 NAME,
 6012                 List.of(Attribute.values()),
 6013                 List.of(TypeConstraint.values()),
 6014                 List.of(InputParameter.values()),
 6015                 List.of(OutputParameter.values())
 6016         );
 6017 
 6018         public ConvTranspose(ExternalizedOp def) {
 6019             super(SCHEMA, def);
 6020         }
 6021 
 6022         ConvTranspose(ConvTranspose that, CopyContext cc) {
 6023             super(that, cc);
 6024         }
 6025 
 6026         @Override
 6027         public ConvTranspose transform(CopyContext cc, OpTransformer ot) {
 6028             return new ConvTranspose(this, cc);
 6029         }
 6030 
 6031         ConvTranspose(TypeElement resultType, Value X, Value W, java.util.Optional<Value> B, java.util.Optional<int[]> output_shape, java.util.Optional<int[]> pads, java.util.Optional<int[]> dilations, java.util.Optional<String> auto_pad, java.util.Optional<int[]> strides, java.util.Optional<Integer> group, java.util.Optional<int[]> kernel_shape, java.util.Optional<int[]> output_padding) {
 6032             super(SCHEMA, resultType, Set.of(), List.of(X, W, B), List.of(output_shape, pads, dilations, auto_pad, strides, group, kernel_shape, output_padding));
 6033         }
 6034 
 6035         @Override
 6036         public SequencedSet<OnnxParameter> onnxOutputs() {
 6037             return onnxOutputs(SCHEMA);
 6038         }
 6039 
 6040         @Override
 6041         public SequencedMap<OnnxParameter, Object> onnxInputs() {
 6042             return onnxInputs(SCHEMA, List.of(X(), W(), B()));
 6043         }
 6044 
 6045         public Value X() {
 6046             return operands().get(0);
 6047         }
 6048 
 6049         public Value W() {
 6050             return operands().get(1);
 6051         }
 6052 
 6053         public java.util.Optional<Value> B() {
 6054             int i = optionalInputArguments.indexOf(InputParameter.B);
 6055             return i != -1 ? java.util.Optional.of(operands().get(2 + i)) : java.util.Optional.empty();
 6056         }
 6057 
 6058         public java.util.Optional<int[]> output_shape() {
 6059             int[] output_shape = Attribute.output_shape.access(int[].class, onnxAttributes);
 6060             return java.util.Optional.ofNullable(output_shape).map(int[]::clone);
 6061         }
 6062 
 6063         public java.util.Optional<int[]> pads() {
 6064             int[] pads = Attribute.pads.access(int[].class, onnxAttributes);
 6065             return java.util.Optional.ofNullable(pads).map(int[]::clone);
 6066         }
 6067 
 6068         public java.util.Optional<int[]> dilations() {
 6069             int[] dilations = Attribute.dilations.access(int[].class, onnxAttributes);
 6070             return java.util.Optional.ofNullable(dilations).map(int[]::clone);
 6071         }
 6072 
 6073         public java.util.Optional<String> auto_pad() {
 6074             String auto_pad = Attribute.auto_pad.access(String.class, onnxAttributes);
 6075             return java.util.Optional.ofNullable(auto_pad);
 6076         }
 6077 
 6078         public java.util.Optional<int[]> strides() {
 6079             int[] strides = Attribute.strides.access(int[].class, onnxAttributes);
 6080             return java.util.Optional.ofNullable(strides).map(int[]::clone);
 6081         }
 6082 
 6083         public java.util.Optional<Integer> group() {
 6084             Integer group = Attribute.group.access(Integer.class, onnxAttributes);
 6085             return java.util.Optional.ofNullable(group);
 6086         }
 6087 
 6088         public java.util.Optional<int[]> kernel_shape() {
 6089             int[] kernel_shape = Attribute.kernel_shape.access(int[].class, onnxAttributes);
 6090             return java.util.Optional.ofNullable(kernel_shape).map(int[]::clone);
 6091         }
 6092 
 6093         public java.util.Optional<int[]> output_padding() {
 6094             int[] output_padding = Attribute.output_padding.access(int[].class, onnxAttributes);
 6095             return java.util.Optional.ofNullable(output_padding).map(int[]::clone);
 6096         }
 6097 
 6098     }
 6099 
 6100     public static ConvTranspose ConvTranspose(TypeElement resultType, Value X, Value W, java.util.Optional<Value> B, java.util.Optional<int[]> output_shape, java.util.Optional<int[]> pads, java.util.Optional<int[]> dilations, java.util.Optional<String> auto_pad, java.util.Optional<int[]> strides, java.util.Optional<Integer> group, java.util.Optional<int[]> kernel_shape, java.util.Optional<int[]> output_padding) {
 6101         return new ConvTranspose(resultType, X, W, B, output_shape, pads, dilations, auto_pad, strides, group, kernel_shape, output_padding);
 6102     }
 6103 
 6104     @OpFactory.OpDeclaration(Cos.NAME)
 6105     public static final class Cos extends OnnxOp {
 6106         public static final String NAME = "Cos";
 6107 
 6108         public enum Attribute implements OnnxAttribute.None { }
 6109 
 6110         public enum TypeConstraint implements OnnxTypeConstraint {
 6111             T(new OnnxType.TypeVariable("T", List.of(OnnxType.tensor(OnnxType.bfloat16()), OnnxType.tensor(OnnxType.float16()), OnnxType.tensor(OnnxType.float32()), OnnxType.tensor(OnnxType.float64())))),
 6112             ;
 6113 
 6114             final OnnxType.TypeVariable typeVariable;
 6115 
 6116             TypeConstraint(OnnxType.TypeVariable typeVariable) {
 6117                 assert typeVariable.name().equals(name());
 6118                 this.typeVariable = typeVariable;
 6119             }
 6120 
 6121             @Override
 6122             public OnnxType.TypeVariable typeVariable() {
 6123                 return typeVariable;
 6124             }
 6125         }
 6126 
 6127         public enum InputParameter implements OnnxParameter {
 6128             input(TypeConstraint.T.typeVariable(), Quantifier.REQUIRED),
 6129             ;
 6130 
 6131             final OnnxType type;
 6132             final Quantifier quantifier;
 6133 
 6134             InputParameter(OnnxType type, Quantifier quantifier) {
 6135                 this.type = type;
 6136                 this.quantifier = quantifier;
 6137             }
 6138 
 6139             @Override
 6140             public OnnxType type() {
 6141                 return type;
 6142             }
 6143 
 6144             @Override
 6145             public Quantifier quantifier() {
 6146                 return quantifier;
 6147             }
 6148         }
 6149 
 6150         public enum OutputParameter implements OnnxParameter {
 6151             output(TypeConstraint.T.typeVariable(), Quantifier.REQUIRED),
 6152             ;
 6153 
 6154             final OnnxType type;
 6155             final Quantifier quantifier;
 6156 
 6157             OutputParameter(OnnxType type, Quantifier quantifier) {
 6158                 this.type = type;
 6159                 this.quantifier = quantifier;
 6160             }
 6161 
 6162             @Override
 6163             public OnnxType type() {
 6164                 return type;
 6165             }
 6166 
 6167             @Override
 6168             public Quantifier quantifier() {
 6169                 return quantifier;
 6170             }
 6171         }
 6172 
 6173         public static final OnnxSchema SCHEMA = new OnnxSchemaRecord(
 6174                 NAME,
 6175                 List.of(Attribute.values()),
 6176                 List.of(TypeConstraint.values()),
 6177                 List.of(InputParameter.values()),
 6178                 List.of(OutputParameter.values())
 6179         );
 6180 
 6181         public Cos(ExternalizedOp def) {
 6182             super(SCHEMA, def);
 6183         }
 6184 
 6185         Cos(Cos that, CopyContext cc) {
 6186             super(that, cc);
 6187         }
 6188 
 6189         @Override
 6190         public Cos transform(CopyContext cc, OpTransformer ot) {
 6191             return new Cos(this, cc);
 6192         }
 6193 
 6194         Cos(TypeElement resultType, Value input) {
 6195             super(SCHEMA, resultType, Set.of(), List.of(input), List.of());
 6196         }
 6197 
 6198         @Override
 6199         public SequencedSet<OnnxParameter> onnxOutputs() {
 6200             return onnxOutputs(SCHEMA);
 6201         }
 6202 
 6203         @Override
 6204         public SequencedMap<OnnxParameter, Object> onnxInputs() {
 6205             return onnxInputs(SCHEMA, List.of(input()));
 6206         }
 6207 
 6208         public Value input() {
 6209             return operands().get(0);
 6210         }
 6211 
 6212     }
 6213 
 6214     public static Cos Cos(TypeElement resultType, Value input) {
 6215         return new Cos(resultType, input);
 6216     }
 6217 
 6218     @OpFactory.OpDeclaration(Cosh.NAME)
 6219     public static final class Cosh extends OnnxOp {
 6220         public static final String NAME = "Cosh";
 6221 
 6222         public enum Attribute implements OnnxAttribute.None { }
 6223 
 6224         public enum TypeConstraint implements OnnxTypeConstraint {
 6225             T(new OnnxType.TypeVariable("T", List.of(OnnxType.tensor(OnnxType.bfloat16()), OnnxType.tensor(OnnxType.float16()), OnnxType.tensor(OnnxType.float32()), OnnxType.tensor(OnnxType.float64())))),
 6226             ;
 6227 
 6228             final OnnxType.TypeVariable typeVariable;
 6229 
 6230             TypeConstraint(OnnxType.TypeVariable typeVariable) {
 6231                 assert typeVariable.name().equals(name());
 6232                 this.typeVariable = typeVariable;
 6233             }
 6234 
 6235             @Override
 6236             public OnnxType.TypeVariable typeVariable() {
 6237                 return typeVariable;
 6238             }
 6239         }
 6240 
 6241         public enum InputParameter implements OnnxParameter {
 6242             input(TypeConstraint.T.typeVariable(), Quantifier.REQUIRED),
 6243             ;
 6244 
 6245             final OnnxType type;
 6246             final Quantifier quantifier;
 6247 
 6248             InputParameter(OnnxType type, Quantifier quantifier) {
 6249                 this.type = type;
 6250                 this.quantifier = quantifier;
 6251             }
 6252 
 6253             @Override
 6254             public OnnxType type() {
 6255                 return type;
 6256             }
 6257 
 6258             @Override
 6259             public Quantifier quantifier() {
 6260                 return quantifier;
 6261             }
 6262         }
 6263 
 6264         public enum OutputParameter implements OnnxParameter {
 6265             output(TypeConstraint.T.typeVariable(), Quantifier.REQUIRED),
 6266             ;
 6267 
 6268             final OnnxType type;
 6269             final Quantifier quantifier;
 6270 
 6271             OutputParameter(OnnxType type, Quantifier quantifier) {
 6272                 this.type = type;
 6273                 this.quantifier = quantifier;
 6274             }
 6275 
 6276             @Override
 6277             public OnnxType type() {
 6278                 return type;
 6279             }
 6280 
 6281             @Override
 6282             public Quantifier quantifier() {
 6283                 return quantifier;
 6284             }
 6285         }
 6286 
 6287         public static final OnnxSchema SCHEMA = new OnnxSchemaRecord(
 6288                 NAME,
 6289                 List.of(Attribute.values()),
 6290                 List.of(TypeConstraint.values()),
 6291                 List.of(InputParameter.values()),
 6292                 List.of(OutputParameter.values())
 6293         );
 6294 
 6295         public Cosh(ExternalizedOp def) {
 6296             super(SCHEMA, def);
 6297         }
 6298 
 6299         Cosh(Cosh that, CopyContext cc) {
 6300             super(that, cc);
 6301         }
 6302 
 6303         @Override
 6304         public Cosh transform(CopyContext cc, OpTransformer ot) {
 6305             return new Cosh(this, cc);
 6306         }
 6307 
 6308         Cosh(TypeElement resultType, Value input) {
 6309             super(SCHEMA, resultType, Set.of(), List.of(input), List.of());
 6310         }
 6311 
 6312         @Override
 6313         public SequencedSet<OnnxParameter> onnxOutputs() {
 6314             return onnxOutputs(SCHEMA);
 6315         }
 6316 
 6317         @Override
 6318         public SequencedMap<OnnxParameter, Object> onnxInputs() {
 6319             return onnxInputs(SCHEMA, List.of(input()));
 6320         }
 6321 
 6322         public Value input() {
 6323             return operands().get(0);
 6324         }
 6325 
 6326     }
 6327 
 6328     public static Cosh Cosh(TypeElement resultType, Value input) {
 6329         return new Cosh(resultType, input);
 6330     }
 6331 
 6332     @OpFactory.OpDeclaration(CumSum.NAME)
 6333     public static final class CumSum extends OnnxOp {
 6334         public static final String NAME = "CumSum";
 6335 
 6336         public enum Attribute implements OnnxAttribute {
 6337             exclusive(Integer.class, true, 0),
 6338             reverse(Integer.class, true, 0),
 6339             ;
 6340 
 6341                 final Class<?> t;
 6342                 final boolean optional;
 6343                 final Object defaultValue;
 6344 
 6345                 Attribute(Class<?> type, boolean optional, Object defaultValue) {
 6346                     this.t = type;
 6347                     this.optional = optional;
 6348                     this.defaultValue = defaultValue;
 6349                     assert optional || defaultValue == null;
 6350                 }
 6351 
 6352                 public Class<?> type() {
 6353                     return t;
 6354                 }
 6355 
 6356                 public boolean isOptional() {
 6357                     return optional;
 6358                 }
 6359 
 6360                 public Object defaultValue() {
 6361                     return defaultValue;
 6362                 }
 6363         }
 6364 
 6365         public enum TypeConstraint implements OnnxTypeConstraint {
 6366             T(new OnnxType.TypeVariable("T", List.of(OnnxType.tensor(OnnxType.uint32()), OnnxType.tensor(OnnxType.uint64()), OnnxType.tensor(OnnxType.int32()), OnnxType.tensor(OnnxType.int64()), OnnxType.tensor(OnnxType.float16()), OnnxType.tensor(OnnxType.float32()), OnnxType.tensor(OnnxType.float64()), OnnxType.tensor(OnnxType.bfloat16())))),
 6367             T2(new OnnxType.TypeVariable("T2", List.of(OnnxType.tensor(OnnxType.int32()), OnnxType.tensor(OnnxType.int64())))),
 6368             ;
 6369 
 6370             final OnnxType.TypeVariable typeVariable;
 6371 
 6372             TypeConstraint(OnnxType.TypeVariable typeVariable) {
 6373                 assert typeVariable.name().equals(name());
 6374                 this.typeVariable = typeVariable;
 6375             }
 6376 
 6377             @Override
 6378             public OnnxType.TypeVariable typeVariable() {
 6379                 return typeVariable;
 6380             }
 6381         }
 6382 
 6383         public enum InputParameter implements OnnxParameter {
 6384             x(TypeConstraint.T.typeVariable(), Quantifier.REQUIRED),
 6385             axis(TypeConstraint.T2.typeVariable(), Quantifier.REQUIRED),
 6386             ;
 6387 
 6388             final OnnxType type;
 6389             final Quantifier quantifier;
 6390 
 6391             InputParameter(OnnxType type, Quantifier quantifier) {
 6392                 this.type = type;
 6393                 this.quantifier = quantifier;
 6394             }
 6395 
 6396             @Override
 6397             public OnnxType type() {
 6398                 return type;
 6399             }
 6400 
 6401             @Override
 6402             public Quantifier quantifier() {
 6403                 return quantifier;
 6404             }
 6405         }
 6406 
 6407         public enum OutputParameter implements OnnxParameter {
 6408             y(TypeConstraint.T.typeVariable(), Quantifier.REQUIRED),
 6409             ;
 6410 
 6411             final OnnxType type;
 6412             final Quantifier quantifier;
 6413 
 6414             OutputParameter(OnnxType type, Quantifier quantifier) {
 6415                 this.type = type;
 6416                 this.quantifier = quantifier;
 6417             }
 6418 
 6419             @Override
 6420             public OnnxType type() {
 6421                 return type;
 6422             }
 6423 
 6424             @Override
 6425             public Quantifier quantifier() {
 6426                 return quantifier;
 6427             }
 6428         }
 6429 
 6430         public static final OnnxSchema SCHEMA = new OnnxSchemaRecord(
 6431                 NAME,
 6432                 List.of(Attribute.values()),
 6433                 List.of(TypeConstraint.values()),
 6434                 List.of(InputParameter.values()),
 6435                 List.of(OutputParameter.values())
 6436         );
 6437 
 6438         public CumSum(ExternalizedOp def) {
 6439             super(SCHEMA, def);
 6440         }
 6441 
 6442         CumSum(CumSum that, CopyContext cc) {
 6443             super(that, cc);
 6444         }
 6445 
 6446         @Override
 6447         public CumSum transform(CopyContext cc, OpTransformer ot) {
 6448             return new CumSum(this, cc);
 6449         }
 6450 
 6451         CumSum(TypeElement resultType, Value x, Value axis, java.util.Optional<Integer> exclusive, java.util.Optional<Integer> reverse) {
 6452             super(SCHEMA, resultType, Set.of(), List.of(x, axis), List.of(exclusive, reverse));
 6453         }
 6454 
 6455         @Override
 6456         public SequencedSet<OnnxParameter> onnxOutputs() {
 6457             return onnxOutputs(SCHEMA);
 6458         }
 6459 
 6460         @Override
 6461         public SequencedMap<OnnxParameter, Object> onnxInputs() {
 6462             return onnxInputs(SCHEMA, List.of(x(), axis()));
 6463         }
 6464 
 6465         public Value x() {
 6466             return operands().get(0);
 6467         }
 6468 
 6469         public Value axis() {
 6470             return operands().get(1);
 6471         }
 6472 
 6473         public java.util.Optional<Integer> exclusive() {
 6474             Integer exclusive = Attribute.exclusive.access(Integer.class, onnxAttributes);
 6475             return java.util.Optional.ofNullable(exclusive);
 6476         }
 6477 
 6478         public java.util.Optional<Integer> reverse() {
 6479             Integer reverse = Attribute.reverse.access(Integer.class, onnxAttributes);
 6480             return java.util.Optional.ofNullable(reverse);
 6481         }
 6482 
 6483     }
 6484 
 6485     public static CumSum CumSum(TypeElement resultType, Value x, Value axis, java.util.Optional<Integer> exclusive, java.util.Optional<Integer> reverse) {
 6486         return new CumSum(resultType, x, axis, exclusive, reverse);
 6487     }
 6488 
 6489     @OpFactory.OpDeclaration(DFT.NAME)
 6490     public static final class DFT extends OnnxOp {
 6491         public static final String NAME = "DFT";
 6492 
 6493         public enum Attribute implements OnnxAttribute {
 6494             inverse(Integer.class, true, 0),
 6495             onesided(Integer.class, true, 0),
 6496             ;
 6497 
 6498                 final Class<?> t;
 6499                 final boolean optional;
 6500                 final Object defaultValue;
 6501 
 6502                 Attribute(Class<?> type, boolean optional, Object defaultValue) {
 6503                     this.t = type;
 6504                     this.optional = optional;
 6505                     this.defaultValue = defaultValue;
 6506                     assert optional || defaultValue == null;
 6507                 }
 6508 
 6509                 public Class<?> type() {
 6510                     return t;
 6511                 }
 6512 
 6513                 public boolean isOptional() {
 6514                     return optional;
 6515                 }
 6516 
 6517                 public Object defaultValue() {
 6518                     return defaultValue;
 6519                 }
 6520         }
 6521 
 6522         public enum TypeConstraint implements OnnxTypeConstraint {
 6523             T1(new OnnxType.TypeVariable("T1", List.of(OnnxType.tensor(OnnxType.bfloat16()), OnnxType.tensor(OnnxType.float16()), OnnxType.tensor(OnnxType.float32()), OnnxType.tensor(OnnxType.float64())))),
 6524             T2(new OnnxType.TypeVariable("T2", List.of(OnnxType.tensor(OnnxType.int32()), OnnxType.tensor(OnnxType.int64())))),
 6525             ;
 6526 
 6527             final OnnxType.TypeVariable typeVariable;
 6528 
 6529             TypeConstraint(OnnxType.TypeVariable typeVariable) {
 6530                 assert typeVariable.name().equals(name());
 6531                 this.typeVariable = typeVariable;
 6532             }
 6533 
 6534             @Override
 6535             public OnnxType.TypeVariable typeVariable() {
 6536                 return typeVariable;
 6537             }
 6538         }
 6539 
 6540         public enum InputParameter implements OnnxParameter {
 6541             input(TypeConstraint.T1.typeVariable(), Quantifier.REQUIRED),
 6542             dft_length(TypeConstraint.T2.typeVariable(), Quantifier.OPTIONAL),
 6543             axis(OnnxType.tensor(OnnxType.int64()), Quantifier.OPTIONAL),
 6544             ;
 6545 
 6546             final OnnxType type;
 6547             final Quantifier quantifier;
 6548 
 6549             InputParameter(OnnxType type, Quantifier quantifier) {
 6550                 this.type = type;
 6551                 this.quantifier = quantifier;
 6552             }
 6553 
 6554             @Override
 6555             public OnnxType type() {
 6556                 return type;
 6557             }
 6558 
 6559             @Override
 6560             public Quantifier quantifier() {
 6561                 return quantifier;
 6562             }
 6563         }
 6564 
 6565         public enum OutputParameter implements OnnxParameter {
 6566             output(TypeConstraint.T1.typeVariable(), Quantifier.REQUIRED),
 6567             ;
 6568 
 6569             final OnnxType type;
 6570             final Quantifier quantifier;
 6571 
 6572             OutputParameter(OnnxType type, Quantifier quantifier) {
 6573                 this.type = type;
 6574                 this.quantifier = quantifier;
 6575             }
 6576 
 6577             @Override
 6578             public OnnxType type() {
 6579                 return type;
 6580             }
 6581 
 6582             @Override
 6583             public Quantifier quantifier() {
 6584                 return quantifier;
 6585             }
 6586         }
 6587 
 6588         public static final OnnxSchema SCHEMA = new OnnxSchemaRecord(
 6589                 NAME,
 6590                 List.of(Attribute.values()),
 6591                 List.of(TypeConstraint.values()),
 6592                 List.of(InputParameter.values()),
 6593                 List.of(OutputParameter.values())
 6594         );
 6595 
 6596         public DFT(ExternalizedOp def) {
 6597             super(SCHEMA, def);
 6598         }
 6599 
 6600         DFT(DFT that, CopyContext cc) {
 6601             super(that, cc);
 6602         }
 6603 
 6604         @Override
 6605         public DFT transform(CopyContext cc, OpTransformer ot) {
 6606             return new DFT(this, cc);
 6607         }
 6608 
 6609         DFT(TypeElement resultType, Value input, java.util.Optional<Value> dft_length, java.util.Optional<Value> axis, java.util.Optional<Integer> inverse, java.util.Optional<Integer> onesided) {
 6610             super(SCHEMA, resultType, Set.of(), List.of(input, dft_length, axis), List.of(inverse, onesided));
 6611         }
 6612 
 6613         @Override
 6614         public SequencedSet<OnnxParameter> onnxOutputs() {
 6615             return onnxOutputs(SCHEMA);
 6616         }
 6617 
 6618         @Override
 6619         public SequencedMap<OnnxParameter, Object> onnxInputs() {
 6620             return onnxInputs(SCHEMA, List.of(input(), dft_length(), axis()));
 6621         }
 6622 
 6623         public Value input() {
 6624             return operands().get(0);
 6625         }
 6626 
 6627         public java.util.Optional<Value> dft_length() {
 6628             int i = optionalInputArguments.indexOf(InputParameter.dft_length);
 6629             return i != -1 ? java.util.Optional.of(operands().get(1 + i)) : java.util.Optional.empty();
 6630         }
 6631 
 6632         public java.util.Optional<Value> axis() {
 6633             int i = optionalInputArguments.indexOf(InputParameter.axis);
 6634             return i != -1 ? java.util.Optional.of(operands().get(1 + i)) : java.util.Optional.empty();
 6635         }
 6636 
 6637         public java.util.Optional<Integer> inverse() {
 6638             Integer inverse = Attribute.inverse.access(Integer.class, onnxAttributes);
 6639             return java.util.Optional.ofNullable(inverse);
 6640         }
 6641 
 6642         public java.util.Optional<Integer> onesided() {
 6643             Integer onesided = Attribute.onesided.access(Integer.class, onnxAttributes);
 6644             return java.util.Optional.ofNullable(onesided);
 6645         }
 6646 
 6647     }
 6648 
 6649     public static DFT DFT(TypeElement resultType, Value input, java.util.Optional<Value> dft_length, java.util.Optional<Value> axis, java.util.Optional<Integer> inverse, java.util.Optional<Integer> onesided) {
 6650         return new DFT(resultType, input, dft_length, axis, inverse, onesided);
 6651     }
 6652 
 6653     @OpFactory.OpDeclaration(DeformConv.NAME)
 6654     public static final class DeformConv extends OnnxOp {
 6655         public static final String NAME = "DeformConv";
 6656 
 6657         public enum Attribute implements OnnxAttribute {
 6658             pads(int[].class, true, null),
 6659             dilations(int[].class, true, null),
 6660             strides(int[].class, true, null),
 6661             offset_group(Integer.class, true, 1),
 6662             group(Integer.class, true, 1),
 6663             kernel_shape(int[].class, true, null),
 6664             ;
 6665 
 6666                 final Class<?> t;
 6667                 final boolean optional;
 6668                 final Object defaultValue;
 6669 
 6670                 Attribute(Class<?> type, boolean optional, Object defaultValue) {
 6671                     this.t = type;
 6672                     this.optional = optional;
 6673                     this.defaultValue = defaultValue;
 6674                     assert optional || defaultValue == null;
 6675                 }
 6676 
 6677                 public Class<?> type() {
 6678                     return t;
 6679                 }
 6680 
 6681                 public boolean isOptional() {
 6682                     return optional;
 6683                 }
 6684 
 6685                 public Object defaultValue() {
 6686                     return defaultValue;
 6687                 }
 6688         }
 6689 
 6690         public enum TypeConstraint implements OnnxTypeConstraint {
 6691             T(new OnnxType.TypeVariable("T", List.of(OnnxType.tensor(OnnxType.bfloat16()), OnnxType.tensor(OnnxType.float16()), OnnxType.tensor(OnnxType.float32()), OnnxType.tensor(OnnxType.float64())))),
 6692             ;
 6693 
 6694             final OnnxType.TypeVariable typeVariable;
 6695 
 6696             TypeConstraint(OnnxType.TypeVariable typeVariable) {
 6697                 assert typeVariable.name().equals(name());
 6698                 this.typeVariable = typeVariable;
 6699             }
 6700 
 6701             @Override
 6702             public OnnxType.TypeVariable typeVariable() {
 6703                 return typeVariable;
 6704             }
 6705         }
 6706 
 6707         public enum InputParameter implements OnnxParameter {
 6708             X(TypeConstraint.T.typeVariable(), Quantifier.REQUIRED),
 6709             W(TypeConstraint.T.typeVariable(), Quantifier.REQUIRED),
 6710             offset(TypeConstraint.T.typeVariable(), Quantifier.REQUIRED),
 6711             B(TypeConstraint.T.typeVariable(), Quantifier.OPTIONAL),
 6712             mask(TypeConstraint.T.typeVariable(), Quantifier.OPTIONAL),
 6713             ;
 6714 
 6715             final OnnxType type;
 6716             final Quantifier quantifier;
 6717 
 6718             InputParameter(OnnxType type, Quantifier quantifier) {
 6719                 this.type = type;
 6720                 this.quantifier = quantifier;
 6721             }
 6722 
 6723             @Override
 6724             public OnnxType type() {
 6725                 return type;
 6726             }
 6727 
 6728             @Override
 6729             public Quantifier quantifier() {
 6730                 return quantifier;
 6731             }
 6732         }
 6733 
 6734         public enum OutputParameter implements OnnxParameter {
 6735             Y(TypeConstraint.T.typeVariable(), Quantifier.REQUIRED),
 6736             ;
 6737 
 6738             final OnnxType type;
 6739             final Quantifier quantifier;
 6740 
 6741             OutputParameter(OnnxType type, Quantifier quantifier) {
 6742                 this.type = type;
 6743                 this.quantifier = quantifier;
 6744             }
 6745 
 6746             @Override
 6747             public OnnxType type() {
 6748                 return type;
 6749             }
 6750 
 6751             @Override
 6752             public Quantifier quantifier() {
 6753                 return quantifier;
 6754             }
 6755         }
 6756 
 6757         public static final OnnxSchema SCHEMA = new OnnxSchemaRecord(
 6758                 NAME,
 6759                 List.of(Attribute.values()),
 6760                 List.of(TypeConstraint.values()),
 6761                 List.of(InputParameter.values()),
 6762                 List.of(OutputParameter.values())
 6763         );
 6764 
 6765         public DeformConv(ExternalizedOp def) {
 6766             super(SCHEMA, def);
 6767         }
 6768 
 6769         DeformConv(DeformConv that, CopyContext cc) {
 6770             super(that, cc);
 6771         }
 6772 
 6773         @Override
 6774         public DeformConv transform(CopyContext cc, OpTransformer ot) {
 6775             return new DeformConv(this, cc);
 6776         }
 6777 
 6778         DeformConv(TypeElement resultType, Value X, Value W, Value offset, java.util.Optional<Value> B, java.util.Optional<Value> mask, java.util.Optional<int[]> pads, java.util.Optional<int[]> dilations, java.util.Optional<int[]> strides, java.util.Optional<Integer> offset_group, java.util.Optional<Integer> group, java.util.Optional<int[]> kernel_shape) {
 6779             super(SCHEMA, resultType, Set.of(), List.of(X, W, offset, B, mask), List.of(pads, dilations, strides, offset_group, group, kernel_shape));
 6780         }
 6781 
 6782         @Override
 6783         public SequencedSet<OnnxParameter> onnxOutputs() {
 6784             return onnxOutputs(SCHEMA);
 6785         }
 6786 
 6787         @Override
 6788         public SequencedMap<OnnxParameter, Object> onnxInputs() {
 6789             return onnxInputs(SCHEMA, List.of(X(), W(), offset(), B(), mask()));
 6790         }
 6791 
 6792         public Value X() {
 6793             return operands().get(0);
 6794         }
 6795 
 6796         public Value W() {
 6797             return operands().get(1);
 6798         }
 6799 
 6800         public Value offset() {
 6801             return operands().get(2);
 6802         }
 6803 
 6804         public java.util.Optional<Value> B() {
 6805             int i = optionalInputArguments.indexOf(InputParameter.B);
 6806             return i != -1 ? java.util.Optional.of(operands().get(3 + i)) : java.util.Optional.empty();
 6807         }
 6808 
 6809         public java.util.Optional<Value> mask() {
 6810             int i = optionalInputArguments.indexOf(InputParameter.mask);
 6811             return i != -1 ? java.util.Optional.of(operands().get(3 + i)) : java.util.Optional.empty();
 6812         }
 6813 
 6814         public java.util.Optional<int[]> pads() {
 6815             int[] pads = Attribute.pads.access(int[].class, onnxAttributes);
 6816             return java.util.Optional.ofNullable(pads).map(int[]::clone);
 6817         }
 6818 
 6819         public java.util.Optional<int[]> dilations() {
 6820             int[] dilations = Attribute.dilations.access(int[].class, onnxAttributes);
 6821             return java.util.Optional.ofNullable(dilations).map(int[]::clone);
 6822         }
 6823 
 6824         public java.util.Optional<int[]> strides() {
 6825             int[] strides = Attribute.strides.access(int[].class, onnxAttributes);
 6826             return java.util.Optional.ofNullable(strides).map(int[]::clone);
 6827         }
 6828 
 6829         public java.util.Optional<Integer> offset_group() {
 6830             Integer offset_group = Attribute.offset_group.access(Integer.class, onnxAttributes);
 6831             return java.util.Optional.ofNullable(offset_group);
 6832         }
 6833 
 6834         public java.util.Optional<Integer> group() {
 6835             Integer group = Attribute.group.access(Integer.class, onnxAttributes);
 6836             return java.util.Optional.ofNullable(group);
 6837         }
 6838 
 6839         public java.util.Optional<int[]> kernel_shape() {
 6840             int[] kernel_shape = Attribute.kernel_shape.access(int[].class, onnxAttributes);
 6841             return java.util.Optional.ofNullable(kernel_shape).map(int[]::clone);
 6842         }
 6843 
 6844     }
 6845 
 6846     public static DeformConv DeformConv(TypeElement resultType, Value X, Value W, Value offset, java.util.Optional<Value> B, java.util.Optional<Value> mask, java.util.Optional<int[]> pads, java.util.Optional<int[]> dilations, java.util.Optional<int[]> strides, java.util.Optional<Integer> offset_group, java.util.Optional<Integer> group, java.util.Optional<int[]> kernel_shape) {
 6847         return new DeformConv(resultType, X, W, offset, B, mask, pads, dilations, strides, offset_group, group, kernel_shape);
 6848     }
 6849 
 6850     @OpFactory.OpDeclaration(DepthToSpace.NAME)
 6851     public static final class DepthToSpace extends OnnxOp {
 6852         public static final String NAME = "DepthToSpace";
 6853 
 6854         public enum Attribute implements OnnxAttribute {
 6855             mode(String.class, true, "DCR"),
 6856             blocksize(Integer.class, false, null),
 6857             ;
 6858 
 6859                 final Class<?> t;
 6860                 final boolean optional;
 6861                 final Object defaultValue;
 6862 
 6863                 Attribute(Class<?> type, boolean optional, Object defaultValue) {
 6864                     this.t = type;
 6865                     this.optional = optional;
 6866                     this.defaultValue = defaultValue;
 6867                     assert optional || defaultValue == null;
 6868                 }
 6869 
 6870                 public Class<?> type() {
 6871                     return t;
 6872                 }
 6873 
 6874                 public boolean isOptional() {
 6875                     return optional;
 6876                 }
 6877 
 6878                 public Object defaultValue() {
 6879                     return defaultValue;
 6880                 }
 6881         }
 6882 
 6883         public enum TypeConstraint implements OnnxTypeConstraint {
 6884             T(new OnnxType.TypeVariable("T", List.of(OnnxType.tensor(OnnxType.uint8()), OnnxType.tensor(OnnxType.uint16()), OnnxType.tensor(OnnxType.uint32()), OnnxType.tensor(OnnxType.uint64()), OnnxType.tensor(OnnxType.int8()), OnnxType.tensor(OnnxType.int16()), OnnxType.tensor(OnnxType.int32()), OnnxType.tensor(OnnxType.int64()), OnnxType.tensor(OnnxType.bfloat16()), OnnxType.tensor(OnnxType.float16()), OnnxType.tensor(OnnxType.float32()), OnnxType.tensor(OnnxType.float64()), OnnxType.tensor(OnnxType.string()), OnnxType.tensor(OnnxType.bool()), OnnxType.tensor(OnnxType.complex64()), OnnxType.tensor(OnnxType.complex128())))),
 6885             ;
 6886 
 6887             final OnnxType.TypeVariable typeVariable;
 6888 
 6889             TypeConstraint(OnnxType.TypeVariable typeVariable) {
 6890                 assert typeVariable.name().equals(name());
 6891                 this.typeVariable = typeVariable;
 6892             }
 6893 
 6894             @Override
 6895             public OnnxType.TypeVariable typeVariable() {
 6896                 return typeVariable;
 6897             }
 6898         }
 6899 
 6900         public enum InputParameter implements OnnxParameter {
 6901             input(TypeConstraint.T.typeVariable(), Quantifier.REQUIRED),
 6902             ;
 6903 
 6904             final OnnxType type;
 6905             final Quantifier quantifier;
 6906 
 6907             InputParameter(OnnxType type, Quantifier quantifier) {
 6908                 this.type = type;
 6909                 this.quantifier = quantifier;
 6910             }
 6911 
 6912             @Override
 6913             public OnnxType type() {
 6914                 return type;
 6915             }
 6916 
 6917             @Override
 6918             public Quantifier quantifier() {
 6919                 return quantifier;
 6920             }
 6921         }
 6922 
 6923         public enum OutputParameter implements OnnxParameter {
 6924             output(TypeConstraint.T.typeVariable(), Quantifier.REQUIRED),
 6925             ;
 6926 
 6927             final OnnxType type;
 6928             final Quantifier quantifier;
 6929 
 6930             OutputParameter(OnnxType type, Quantifier quantifier) {
 6931                 this.type = type;
 6932                 this.quantifier = quantifier;
 6933             }
 6934 
 6935             @Override
 6936             public OnnxType type() {
 6937                 return type;
 6938             }
 6939 
 6940             @Override
 6941             public Quantifier quantifier() {
 6942                 return quantifier;
 6943             }
 6944         }
 6945 
 6946         public static final OnnxSchema SCHEMA = new OnnxSchemaRecord(
 6947                 NAME,
 6948                 List.of(Attribute.values()),
 6949                 List.of(TypeConstraint.values()),
 6950                 List.of(InputParameter.values()),
 6951                 List.of(OutputParameter.values())
 6952         );
 6953 
 6954         public DepthToSpace(ExternalizedOp def) {
 6955             super(SCHEMA, def);
 6956         }
 6957 
 6958         DepthToSpace(DepthToSpace that, CopyContext cc) {
 6959             super(that, cc);
 6960         }
 6961 
 6962         @Override
 6963         public DepthToSpace transform(CopyContext cc, OpTransformer ot) {
 6964             return new DepthToSpace(this, cc);
 6965         }
 6966 
 6967         DepthToSpace(TypeElement resultType, Value input, java.util.Optional<String> mode, int blocksize) {
 6968             super(SCHEMA, resultType, Set.of(), List.of(input), List.of(mode, blocksize));
 6969         }
 6970 
 6971         @Override
 6972         public SequencedSet<OnnxParameter> onnxOutputs() {
 6973             return onnxOutputs(SCHEMA);
 6974         }
 6975 
 6976         @Override
 6977         public SequencedMap<OnnxParameter, Object> onnxInputs() {
 6978             return onnxInputs(SCHEMA, List.of(input()));
 6979         }
 6980 
 6981         public Value input() {
 6982             return operands().get(0);
 6983         }
 6984 
 6985         public java.util.Optional<String> mode() {
 6986             String mode = Attribute.mode.access(String.class, onnxAttributes);
 6987             return java.util.Optional.ofNullable(mode);
 6988         }
 6989 
 6990         public int blocksize() {
 6991             int blocksize = Attribute.blocksize.access(int.class, onnxAttributes);
 6992             return blocksize;
 6993         }
 6994 
 6995     }
 6996 
 6997     public static DepthToSpace DepthToSpace(TypeElement resultType, Value input, java.util.Optional<String> mode, int blocksize) {
 6998         return new DepthToSpace(resultType, input, mode, blocksize);
 6999     }
 7000 
 7001     @OpFactory.OpDeclaration(DequantizeLinear.NAME)
 7002     public static final class DequantizeLinear extends OnnxOp {
 7003         public static final String NAME = "DequantizeLinear";
 7004 
 7005         public enum Attribute implements OnnxAttribute {
 7006             axis(Integer.class, true, 1),
 7007             block_size(Integer.class, true, 0),
 7008             ;
 7009 
 7010                 final Class<?> t;
 7011                 final boolean optional;
 7012                 final Object defaultValue;
 7013 
 7014                 Attribute(Class<?> type, boolean optional, Object defaultValue) {
 7015                     this.t = type;
 7016                     this.optional = optional;
 7017                     this.defaultValue = defaultValue;
 7018                     assert optional || defaultValue == null;
 7019                 }
 7020 
 7021                 public Class<?> type() {
 7022                     return t;
 7023                 }
 7024 
 7025                 public boolean isOptional() {
 7026                     return optional;
 7027                 }
 7028 
 7029                 public Object defaultValue() {
 7030                     return defaultValue;
 7031                 }
 7032         }
 7033 
 7034         public enum TypeConstraint implements OnnxTypeConstraint {
 7035             T1(new OnnxType.TypeVariable("T1", List.of(OnnxType.tensor(OnnxType.int8()), OnnxType.tensor(OnnxType.uint8()), OnnxType.tensor(OnnxType.int16()), OnnxType.tensor(OnnxType.uint16()), OnnxType.tensor(OnnxType.int32()), OnnxType.tensor(OnnxType.float8e4m3fn()), OnnxType.tensor(OnnxType.float8e4m3fnuz()), OnnxType.tensor(OnnxType.float8e5m2()), OnnxType.tensor(OnnxType.float8e5m2fnuz()), OnnxType.tensor(OnnxType.uint4()), OnnxType.tensor(OnnxType.int4()), OnnxType.tensor(OnnxType.float4e2m1())))),
 7036             T2(new OnnxType.TypeVariable("T2", List.of(OnnxType.tensor(OnnxType.float32()), OnnxType.tensor(OnnxType.float16()), OnnxType.tensor(OnnxType.bfloat16())))),
 7037             ;
 7038 
 7039             final OnnxType.TypeVariable typeVariable;
 7040 
 7041             TypeConstraint(OnnxType.TypeVariable typeVariable) {
 7042                 assert typeVariable.name().equals(name());
 7043                 this.typeVariable = typeVariable;
 7044             }
 7045 
 7046             @Override
 7047             public OnnxType.TypeVariable typeVariable() {
 7048                 return typeVariable;
 7049             }
 7050         }
 7051 
 7052         public enum InputParameter implements OnnxParameter {
 7053             x(TypeConstraint.T1.typeVariable(), Quantifier.REQUIRED),
 7054             x_scale(TypeConstraint.T2.typeVariable(), Quantifier.REQUIRED),
 7055             x_zero_point(TypeConstraint.T1.typeVariable(), Quantifier.OPTIONAL),
 7056             ;
 7057 
 7058             final OnnxType type;
 7059             final Quantifier quantifier;
 7060 
 7061             InputParameter(OnnxType type, Quantifier quantifier) {
 7062                 this.type = type;
 7063                 this.quantifier = quantifier;
 7064             }
 7065 
 7066             @Override
 7067             public OnnxType type() {
 7068                 return type;
 7069             }
 7070 
 7071             @Override
 7072             public Quantifier quantifier() {
 7073                 return quantifier;
 7074             }
 7075         }
 7076 
 7077         public enum OutputParameter implements OnnxParameter {
 7078             y(TypeConstraint.T2.typeVariable(), Quantifier.REQUIRED),
 7079             ;
 7080 
 7081             final OnnxType type;
 7082             final Quantifier quantifier;
 7083 
 7084             OutputParameter(OnnxType type, Quantifier quantifier) {
 7085                 this.type = type;
 7086                 this.quantifier = quantifier;
 7087             }
 7088 
 7089             @Override
 7090             public OnnxType type() {
 7091                 return type;
 7092             }
 7093 
 7094             @Override
 7095             public Quantifier quantifier() {
 7096                 return quantifier;
 7097             }
 7098         }
 7099 
 7100         public static final OnnxSchema SCHEMA = new OnnxSchemaRecord(
 7101                 NAME,
 7102                 List.of(Attribute.values()),
 7103                 List.of(TypeConstraint.values()),
 7104                 List.of(InputParameter.values()),
 7105                 List.of(OutputParameter.values())
 7106         );
 7107 
 7108         public DequantizeLinear(ExternalizedOp def) {
 7109             super(SCHEMA, def);
 7110         }
 7111 
 7112         DequantizeLinear(DequantizeLinear that, CopyContext cc) {
 7113             super(that, cc);
 7114         }
 7115 
 7116         @Override
 7117         public DequantizeLinear transform(CopyContext cc, OpTransformer ot) {
 7118             return new DequantizeLinear(this, cc);
 7119         }
 7120 
 7121         DequantizeLinear(TypeElement resultType, Value x, Value x_scale, java.util.Optional<Value> x_zero_point, java.util.Optional<Integer> axis, java.util.Optional<Integer> block_size) {
 7122             super(SCHEMA, resultType, Set.of(), List.of(x, x_scale, x_zero_point), List.of(axis, block_size));
 7123         }
 7124 
 7125         @Override
 7126         public SequencedSet<OnnxParameter> onnxOutputs() {
 7127             return onnxOutputs(SCHEMA);
 7128         }
 7129 
 7130         @Override
 7131         public SequencedMap<OnnxParameter, Object> onnxInputs() {
 7132             return onnxInputs(SCHEMA, List.of(x(), x_scale(), x_zero_point()));
 7133         }
 7134 
 7135         public Value x() {
 7136             return operands().get(0);
 7137         }
 7138 
 7139         public Value x_scale() {
 7140             return operands().get(1);
 7141         }
 7142 
 7143         public java.util.Optional<Value> x_zero_point() {
 7144             int i = optionalInputArguments.indexOf(InputParameter.x_zero_point);
 7145             return i != -1 ? java.util.Optional.of(operands().get(2 + i)) : java.util.Optional.empty();
 7146         }
 7147 
 7148         public java.util.Optional<Integer> axis() {
 7149             Integer axis = Attribute.axis.access(Integer.class, onnxAttributes);
 7150             return java.util.Optional.ofNullable(axis);
 7151         }
 7152 
 7153         public java.util.Optional<Integer> block_size() {
 7154             Integer block_size = Attribute.block_size.access(Integer.class, onnxAttributes);
 7155             return java.util.Optional.ofNullable(block_size);
 7156         }
 7157 
 7158     }
 7159 
 7160     public static DequantizeLinear DequantizeLinear(TypeElement resultType, Value x, Value x_scale, java.util.Optional<Value> x_zero_point, java.util.Optional<Integer> axis, java.util.Optional<Integer> block_size) {
 7161         return new DequantizeLinear(resultType, x, x_scale, x_zero_point, axis, block_size);
 7162     }
 7163 
 7164     @OpFactory.OpDeclaration(Det.NAME)
 7165     public static final class Det extends OnnxOp {
 7166         public static final String NAME = "Det";
 7167 
 7168         public enum Attribute implements OnnxAttribute.None { }
 7169 
 7170         public enum TypeConstraint implements OnnxTypeConstraint {
 7171             T(new OnnxType.TypeVariable("T", List.of(OnnxType.tensor(OnnxType.bfloat16()), OnnxType.tensor(OnnxType.float16()), OnnxType.tensor(OnnxType.float32()), OnnxType.tensor(OnnxType.float64())))),
 7172             ;
 7173 
 7174             final OnnxType.TypeVariable typeVariable;
 7175 
 7176             TypeConstraint(OnnxType.TypeVariable typeVariable) {
 7177                 assert typeVariable.name().equals(name());
 7178                 this.typeVariable = typeVariable;
 7179             }
 7180 
 7181             @Override
 7182             public OnnxType.TypeVariable typeVariable() {
 7183                 return typeVariable;
 7184             }
 7185         }
 7186 
 7187         public enum InputParameter implements OnnxParameter {
 7188             X(TypeConstraint.T.typeVariable(), Quantifier.REQUIRED),
 7189             ;
 7190 
 7191             final OnnxType type;
 7192             final Quantifier quantifier;
 7193 
 7194             InputParameter(OnnxType type, Quantifier quantifier) {
 7195                 this.type = type;
 7196                 this.quantifier = quantifier;
 7197             }
 7198 
 7199             @Override
 7200             public OnnxType type() {
 7201                 return type;
 7202             }
 7203 
 7204             @Override
 7205             public Quantifier quantifier() {
 7206                 return quantifier;
 7207             }
 7208         }
 7209 
 7210         public enum OutputParameter implements OnnxParameter {
 7211             Y(TypeConstraint.T.typeVariable(), Quantifier.REQUIRED),
 7212             ;
 7213 
 7214             final OnnxType type;
 7215             final Quantifier quantifier;
 7216 
 7217             OutputParameter(OnnxType type, Quantifier quantifier) {
 7218                 this.type = type;
 7219                 this.quantifier = quantifier;
 7220             }
 7221 
 7222             @Override
 7223             public OnnxType type() {
 7224                 return type;
 7225             }
 7226 
 7227             @Override
 7228             public Quantifier quantifier() {
 7229                 return quantifier;
 7230             }
 7231         }
 7232 
 7233         public static final OnnxSchema SCHEMA = new OnnxSchemaRecord(
 7234                 NAME,
 7235                 List.of(Attribute.values()),
 7236                 List.of(TypeConstraint.values()),
 7237                 List.of(InputParameter.values()),
 7238                 List.of(OutputParameter.values())
 7239         );
 7240 
 7241         public Det(ExternalizedOp def) {
 7242             super(SCHEMA, def);
 7243         }
 7244 
 7245         Det(Det that, CopyContext cc) {
 7246             super(that, cc);
 7247         }
 7248 
 7249         @Override
 7250         public Det transform(CopyContext cc, OpTransformer ot) {
 7251             return new Det(this, cc);
 7252         }
 7253 
 7254         Det(TypeElement resultType, Value X) {
 7255             super(SCHEMA, resultType, Set.of(), List.of(X), List.of());
 7256         }
 7257 
 7258         @Override
 7259         public SequencedSet<OnnxParameter> onnxOutputs() {
 7260             return onnxOutputs(SCHEMA);
 7261         }
 7262 
 7263         @Override
 7264         public SequencedMap<OnnxParameter, Object> onnxInputs() {
 7265             return onnxInputs(SCHEMA, List.of(X()));
 7266         }
 7267 
 7268         public Value X() {
 7269             return operands().get(0);
 7270         }
 7271 
 7272     }
 7273 
 7274     public static Det Det(TypeElement resultType, Value X) {
 7275         return new Det(resultType, X);
 7276     }
 7277 
 7278     @OpFactory.OpDeclaration(DictVectorizer.NAME)
 7279     public static final class DictVectorizer extends OnnxOp {
 7280         public static final String NAME = "DictVectorizer";
 7281 
 7282         public enum Attribute implements OnnxAttribute {
 7283             string_vocabulary(String[].class, true, null),
 7284             int64_vocabulary(int[].class, true, null),
 7285             ;
 7286 
 7287                 final Class<?> t;
 7288                 final boolean optional;
 7289                 final Object defaultValue;
 7290 
 7291                 Attribute(Class<?> type, boolean optional, Object defaultValue) {
 7292                     this.t = type;
 7293                     this.optional = optional;
 7294                     this.defaultValue = defaultValue;
 7295                     assert optional || defaultValue == null;
 7296                 }
 7297 
 7298                 public Class<?> type() {
 7299                     return t;
 7300                 }
 7301 
 7302                 public boolean isOptional() {
 7303                     return optional;
 7304                 }
 7305 
 7306                 public Object defaultValue() {
 7307                     return defaultValue;
 7308                 }
 7309         }
 7310 
 7311         public enum TypeConstraint implements OnnxTypeConstraint {
 7312             T1(new OnnxType.TypeVariable("T1", List.of(OnnxType.map(OnnxType.string(), OnnxType.int64()), OnnxType.map(OnnxType.int64(), OnnxType.string()), OnnxType.map(OnnxType.int64(), OnnxType.float32()), OnnxType.map(OnnxType.int64(), OnnxType.float64()), OnnxType.map(OnnxType.string(), OnnxType.float32()), OnnxType.map(OnnxType.string(), OnnxType.float64())))),
 7313             T2(new OnnxType.TypeVariable("T2", List.of(OnnxType.tensor(OnnxType.int64()), OnnxType.tensor(OnnxType.float32()), OnnxType.tensor(OnnxType.float64()), OnnxType.tensor(OnnxType.string())))),
 7314             ;
 7315 
 7316             final OnnxType.TypeVariable typeVariable;
 7317 
 7318             TypeConstraint(OnnxType.TypeVariable typeVariable) {
 7319                 assert typeVariable.name().equals(name());
 7320                 this.typeVariable = typeVariable;
 7321             }
 7322 
 7323             @Override
 7324             public OnnxType.TypeVariable typeVariable() {
 7325                 return typeVariable;
 7326             }
 7327         }
 7328 
 7329         public enum InputParameter implements OnnxParameter {
 7330             X(TypeConstraint.T1.typeVariable(), Quantifier.REQUIRED),
 7331             ;
 7332 
 7333             final OnnxType type;
 7334             final Quantifier quantifier;
 7335 
 7336             InputParameter(OnnxType type, Quantifier quantifier) {
 7337                 this.type = type;
 7338                 this.quantifier = quantifier;
 7339             }
 7340 
 7341             @Override
 7342             public OnnxType type() {
 7343                 return type;
 7344             }
 7345 
 7346             @Override
 7347             public Quantifier quantifier() {
 7348                 return quantifier;
 7349             }
 7350         }
 7351 
 7352         public enum OutputParameter implements OnnxParameter {
 7353             Y(TypeConstraint.T2.typeVariable(), Quantifier.REQUIRED),
 7354             ;
 7355 
 7356             final OnnxType type;
 7357             final Quantifier quantifier;
 7358 
 7359             OutputParameter(OnnxType type, Quantifier quantifier) {
 7360                 this.type = type;
 7361                 this.quantifier = quantifier;
 7362             }
 7363 
 7364             @Override
 7365             public OnnxType type() {
 7366                 return type;
 7367             }
 7368 
 7369             @Override
 7370             public Quantifier quantifier() {
 7371                 return quantifier;
 7372             }
 7373         }
 7374 
 7375         public static final OnnxSchema SCHEMA = new OnnxSchemaRecord(
 7376                 NAME,
 7377                 List.of(Attribute.values()),
 7378                 List.of(TypeConstraint.values()),
 7379                 List.of(InputParameter.values()),
 7380                 List.of(OutputParameter.values())
 7381         );
 7382 
 7383         public DictVectorizer(ExternalizedOp def) {
 7384             super(SCHEMA, def);
 7385         }
 7386 
 7387         DictVectorizer(DictVectorizer that, CopyContext cc) {
 7388             super(that, cc);
 7389         }
 7390 
 7391         @Override
 7392         public DictVectorizer transform(CopyContext cc, OpTransformer ot) {
 7393             return new DictVectorizer(this, cc);
 7394         }
 7395 
 7396         DictVectorizer(TypeElement resultType, Value X, java.util.Optional<String[]> string_vocabulary, java.util.Optional<int[]> int64_vocabulary) {
 7397             super(SCHEMA, resultType, Set.of(), List.of(X), List.of(string_vocabulary, int64_vocabulary));
 7398         }
 7399 
 7400         @Override
 7401         public SequencedSet<OnnxParameter> onnxOutputs() {
 7402             return onnxOutputs(SCHEMA);
 7403         }
 7404 
 7405         @Override
 7406         public SequencedMap<OnnxParameter, Object> onnxInputs() {
 7407             return onnxInputs(SCHEMA, List.of(X()));
 7408         }
 7409 
 7410         public Value X() {
 7411             return operands().get(0);
 7412         }
 7413 
 7414         public java.util.Optional<String[]> string_vocabulary() {
 7415             String[] string_vocabulary = Attribute.string_vocabulary.access(String[].class, onnxAttributes);
 7416             return java.util.Optional.ofNullable(string_vocabulary).map(String[]::clone);
 7417         }
 7418 
 7419         public java.util.Optional<int[]> int64_vocabulary() {
 7420             int[] int64_vocabulary = Attribute.int64_vocabulary.access(int[].class, onnxAttributes);
 7421             return java.util.Optional.ofNullable(int64_vocabulary).map(int[]::clone);
 7422         }
 7423 
 7424     }
 7425 
 7426     public static DictVectorizer DictVectorizer(TypeElement resultType, Value X, java.util.Optional<String[]> string_vocabulary, java.util.Optional<int[]> int64_vocabulary) {
 7427         return new DictVectorizer(resultType, X, string_vocabulary, int64_vocabulary);
 7428     }
 7429 
 7430     @OpFactory.OpDeclaration(Div.NAME)
 7431     public static final class Div extends OnnxOp {
 7432         public static final String NAME = "Div";
 7433 
 7434         public enum Attribute implements OnnxAttribute.None { }
 7435 
 7436         public enum TypeConstraint implements OnnxTypeConstraint {
 7437             T(new OnnxType.TypeVariable("T", List.of(OnnxType.tensor(OnnxType.uint8()), OnnxType.tensor(OnnxType.uint16()), OnnxType.tensor(OnnxType.uint32()), OnnxType.tensor(OnnxType.uint64()), OnnxType.tensor(OnnxType.int8()), OnnxType.tensor(OnnxType.int16()), OnnxType.tensor(OnnxType.int32()), OnnxType.tensor(OnnxType.int64()), OnnxType.tensor(OnnxType.float16()), OnnxType.tensor(OnnxType.float32()), OnnxType.tensor(OnnxType.float64()), OnnxType.tensor(OnnxType.bfloat16())))),
 7438             ;
 7439 
 7440             final OnnxType.TypeVariable typeVariable;
 7441 
 7442             TypeConstraint(OnnxType.TypeVariable typeVariable) {
 7443                 assert typeVariable.name().equals(name());
 7444                 this.typeVariable = typeVariable;
 7445             }
 7446 
 7447             @Override
 7448             public OnnxType.TypeVariable typeVariable() {
 7449                 return typeVariable;
 7450             }
 7451         }
 7452 
 7453         public enum InputParameter implements OnnxParameter {
 7454             A(TypeConstraint.T.typeVariable(), Quantifier.REQUIRED),
 7455             B(TypeConstraint.T.typeVariable(), Quantifier.REQUIRED),
 7456             ;
 7457 
 7458             final OnnxType type;
 7459             final Quantifier quantifier;
 7460 
 7461             InputParameter(OnnxType type, Quantifier quantifier) {
 7462                 this.type = type;
 7463                 this.quantifier = quantifier;
 7464             }
 7465 
 7466             @Override
 7467             public OnnxType type() {
 7468                 return type;
 7469             }
 7470 
 7471             @Override
 7472             public Quantifier quantifier() {
 7473                 return quantifier;
 7474             }
 7475         }
 7476 
 7477         public enum OutputParameter implements OnnxParameter {
 7478             C(TypeConstraint.T.typeVariable(), Quantifier.REQUIRED),
 7479             ;
 7480 
 7481             final OnnxType type;
 7482             final Quantifier quantifier;
 7483 
 7484             OutputParameter(OnnxType type, Quantifier quantifier) {
 7485                 this.type = type;
 7486                 this.quantifier = quantifier;
 7487             }
 7488 
 7489             @Override
 7490             public OnnxType type() {
 7491                 return type;
 7492             }
 7493 
 7494             @Override
 7495             public Quantifier quantifier() {
 7496                 return quantifier;
 7497             }
 7498         }
 7499 
 7500         public static final OnnxSchema SCHEMA = new OnnxSchemaRecord(
 7501                 NAME,
 7502                 List.of(Attribute.values()),
 7503                 List.of(TypeConstraint.values()),
 7504                 List.of(InputParameter.values()),
 7505                 List.of(OutputParameter.values())
 7506         );
 7507 
 7508         public Div(ExternalizedOp def) {
 7509             super(SCHEMA, def);
 7510         }
 7511 
 7512         Div(Div that, CopyContext cc) {
 7513             super(that, cc);
 7514         }
 7515 
 7516         @Override
 7517         public Div transform(CopyContext cc, OpTransformer ot) {
 7518             return new Div(this, cc);
 7519         }
 7520 
 7521         Div(TypeElement resultType, Value A, Value B) {
 7522             super(SCHEMA, resultType, Set.of(), List.of(A, B), List.of());
 7523         }
 7524 
 7525         @Override
 7526         public SequencedSet<OnnxParameter> onnxOutputs() {
 7527             return onnxOutputs(SCHEMA);
 7528         }
 7529 
 7530         @Override
 7531         public SequencedMap<OnnxParameter, Object> onnxInputs() {
 7532             return onnxInputs(SCHEMA, List.of(A(), B()));
 7533         }
 7534 
 7535         public Value A() {
 7536             return operands().get(0);
 7537         }
 7538 
 7539         public Value B() {
 7540             return operands().get(1);
 7541         }
 7542 
 7543     }
 7544 
 7545     public static Div Div(TypeElement resultType, Value A, Value B) {
 7546         return new Div(resultType, A, B);
 7547     }
 7548 
 7549     @OpFactory.OpDeclaration(Dropout.NAME)
 7550     public static final class Dropout extends OnnxOp {
 7551         public static final String NAME = "Dropout";
 7552 
 7553         public enum Attribute implements OnnxAttribute {
 7554             seed(Integer.class, true, null),
 7555             ;
 7556 
 7557                 final Class<?> t;
 7558                 final boolean optional;
 7559                 final Object defaultValue;
 7560 
 7561                 Attribute(Class<?> type, boolean optional, Object defaultValue) {
 7562                     this.t = type;
 7563                     this.optional = optional;
 7564                     this.defaultValue = defaultValue;
 7565                     assert optional || defaultValue == null;
 7566                 }
 7567 
 7568                 public Class<?> type() {
 7569                     return t;
 7570                 }
 7571 
 7572                 public boolean isOptional() {
 7573                     return optional;
 7574                 }
 7575 
 7576                 public Object defaultValue() {
 7577                     return defaultValue;
 7578                 }
 7579         }
 7580 
 7581         public enum TypeConstraint implements OnnxTypeConstraint {
 7582             T(new OnnxType.TypeVariable("T", List.of(OnnxType.tensor(OnnxType.bfloat16()), OnnxType.tensor(OnnxType.float16()), OnnxType.tensor(OnnxType.float32()), OnnxType.tensor(OnnxType.float64()), OnnxType.tensor(OnnxType.float8e4m3fn()), OnnxType.tensor(OnnxType.float8e4m3fnuz()), OnnxType.tensor(OnnxType.float8e5m2()), OnnxType.tensor(OnnxType.float8e5m2fnuz())))),
 7583             T1(new OnnxType.TypeVariable("T1", List.of(OnnxType.tensor(OnnxType.bfloat16()), OnnxType.tensor(OnnxType.float16()), OnnxType.tensor(OnnxType.float32()), OnnxType.tensor(OnnxType.float64()), OnnxType.tensor(OnnxType.float8e4m3fn()), OnnxType.tensor(OnnxType.float8e4m3fnuz()), OnnxType.tensor(OnnxType.float8e5m2()), OnnxType.tensor(OnnxType.float8e5m2fnuz())))),
 7584             T2(new OnnxType.TypeVariable("T2", List.of(OnnxType.tensor(OnnxType.bool())))),
 7585             ;
 7586 
 7587             final OnnxType.TypeVariable typeVariable;
 7588 
 7589             TypeConstraint(OnnxType.TypeVariable typeVariable) {
 7590                 assert typeVariable.name().equals(name());
 7591                 this.typeVariable = typeVariable;
 7592             }
 7593 
 7594             @Override
 7595             public OnnxType.TypeVariable typeVariable() {
 7596                 return typeVariable;
 7597             }
 7598         }
 7599 
 7600         public enum InputParameter implements OnnxParameter {
 7601             data(TypeConstraint.T.typeVariable(), Quantifier.REQUIRED),
 7602             ratio(TypeConstraint.T1.typeVariable(), Quantifier.OPTIONAL),
 7603             training_mode(TypeConstraint.T2.typeVariable(), Quantifier.OPTIONAL),
 7604             ;
 7605 
 7606             final OnnxType type;
 7607             final Quantifier quantifier;
 7608 
 7609             InputParameter(OnnxType type, Quantifier quantifier) {
 7610                 this.type = type;
 7611                 this.quantifier = quantifier;
 7612             }
 7613 
 7614             @Override
 7615             public OnnxType type() {
 7616                 return type;
 7617             }
 7618 
 7619             @Override
 7620             public Quantifier quantifier() {
 7621                 return quantifier;
 7622             }
 7623         }
 7624 
 7625         public enum OutputParameter implements OnnxParameter {
 7626             output(TypeConstraint.T.typeVariable(), Quantifier.REQUIRED),
 7627             mask(TypeConstraint.T2.typeVariable(), Quantifier.OPTIONAL),
 7628             ;
 7629 
 7630             final OnnxType type;
 7631             final Quantifier quantifier;
 7632 
 7633             OutputParameter(OnnxType type, Quantifier quantifier) {
 7634                 this.type = type;
 7635                 this.quantifier = quantifier;
 7636             }
 7637 
 7638             @Override
 7639             public OnnxType type() {
 7640                 return type;
 7641             }
 7642 
 7643             @Override
 7644             public Quantifier quantifier() {
 7645                 return quantifier;
 7646             }
 7647         }
 7648 
 7649         public static final OnnxSchema SCHEMA = new OnnxSchemaRecord(
 7650                 NAME,
 7651                 List.of(Attribute.values()),
 7652                 List.of(TypeConstraint.values()),
 7653                 List.of(InputParameter.values()),
 7654                 List.of(OutputParameter.values())
 7655         );
 7656 
 7657         public Dropout(ExternalizedOp def) {
 7658             super(SCHEMA, def);
 7659         }
 7660 
 7661         Dropout(Dropout that, CopyContext cc) {
 7662             super(that, cc);
 7663         }
 7664 
 7665         @Override
 7666         public Dropout transform(CopyContext cc, OpTransformer ot) {
 7667             return new Dropout(this, cc);
 7668         }
 7669 
 7670         Dropout(TypeElement resultType, Set<OutputParameter> optionalOutputs, Value data, java.util.Optional<Value> ratio, java.util.Optional<Value> training_mode, java.util.Optional<Integer> seed) {
 7671             super(SCHEMA, resultType, optionalOutputs, List.of(data, ratio, training_mode), List.of(seed));
 7672         }
 7673 
 7674         @Override
 7675         public SequencedSet<OnnxParameter> onnxOutputs() {
 7676             return onnxOutputs(SCHEMA);
 7677         }
 7678 
 7679         @Override
 7680         public SequencedMap<OnnxParameter, Object> onnxInputs() {
 7681             return onnxInputs(SCHEMA, List.of(data(), ratio(), training_mode()));
 7682         }
 7683 
 7684         public Value data() {
 7685             return operands().get(0);
 7686         }
 7687 
 7688         public java.util.Optional<Value> ratio() {
 7689             int i = optionalInputArguments.indexOf(InputParameter.ratio);
 7690             return i != -1 ? java.util.Optional.of(operands().get(1 + i)) : java.util.Optional.empty();
 7691         }
 7692 
 7693         public java.util.Optional<Value> training_mode() {
 7694             int i = optionalInputArguments.indexOf(InputParameter.training_mode);
 7695             return i != -1 ? java.util.Optional.of(operands().get(1 + i)) : java.util.Optional.empty();
 7696         }
 7697 
 7698         public java.util.Optional<Integer> seed() {
 7699             Integer seed = Attribute.seed.access(Integer.class, onnxAttributes);
 7700             return java.util.Optional.ofNullable(seed);
 7701         }
 7702 
 7703     }
 7704 
 7705     public static Dropout Dropout(TypeElement resultType, Set<Dropout.OutputParameter> optionalOutputs, Value data, java.util.Optional<Value> ratio, java.util.Optional<Value> training_mode, java.util.Optional<Integer> seed) {
 7706         return new Dropout(resultType, optionalOutputs, data, ratio, training_mode, seed);
 7707     }
 7708 
 7709     @OpFactory.OpDeclaration(DynamicQuantizeLinear.NAME)
 7710     public static final class DynamicQuantizeLinear extends OnnxOp {
 7711         public static final String NAME = "DynamicQuantizeLinear";
 7712 
 7713         public enum Attribute implements OnnxAttribute.None { }
 7714 
 7715         public enum TypeConstraint implements OnnxTypeConstraint {
 7716             T1(new OnnxType.TypeVariable("T1", List.of(OnnxType.tensor(OnnxType.float32())))),
 7717             T2(new OnnxType.TypeVariable("T2", List.of(OnnxType.tensor(OnnxType.uint8())))),
 7718             ;
 7719 
 7720             final OnnxType.TypeVariable typeVariable;
 7721 
 7722             TypeConstraint(OnnxType.TypeVariable typeVariable) {
 7723                 assert typeVariable.name().equals(name());
 7724                 this.typeVariable = typeVariable;
 7725             }
 7726 
 7727             @Override
 7728             public OnnxType.TypeVariable typeVariable() {
 7729                 return typeVariable;
 7730             }
 7731         }
 7732 
 7733         public enum InputParameter implements OnnxParameter {
 7734             x(TypeConstraint.T1.typeVariable(), Quantifier.REQUIRED),
 7735             ;
 7736 
 7737             final OnnxType type;
 7738             final Quantifier quantifier;
 7739 
 7740             InputParameter(OnnxType type, Quantifier quantifier) {
 7741                 this.type = type;
 7742                 this.quantifier = quantifier;
 7743             }
 7744 
 7745             @Override
 7746             public OnnxType type() {
 7747                 return type;
 7748             }
 7749 
 7750             @Override
 7751             public Quantifier quantifier() {
 7752                 return quantifier;
 7753             }
 7754         }
 7755 
 7756         public enum OutputParameter implements OnnxParameter {
 7757             y(TypeConstraint.T2.typeVariable(), Quantifier.REQUIRED),
 7758             y_scale(OnnxType.tensor(OnnxType.float32()), Quantifier.REQUIRED),
 7759             y_zero_point(TypeConstraint.T2.typeVariable(), Quantifier.REQUIRED),
 7760             ;
 7761 
 7762             final OnnxType type;
 7763             final Quantifier quantifier;
 7764 
 7765             OutputParameter(OnnxType type, Quantifier quantifier) {
 7766                 this.type = type;
 7767                 this.quantifier = quantifier;
 7768             }
 7769 
 7770             @Override
 7771             public OnnxType type() {
 7772                 return type;
 7773             }
 7774 
 7775             @Override
 7776             public Quantifier quantifier() {
 7777                 return quantifier;
 7778             }
 7779         }
 7780 
 7781         public static final OnnxSchema SCHEMA = new OnnxSchemaRecord(
 7782                 NAME,
 7783                 List.of(Attribute.values()),
 7784                 List.of(TypeConstraint.values()),
 7785                 List.of(InputParameter.values()),
 7786                 List.of(OutputParameter.values())
 7787         );
 7788 
 7789         public DynamicQuantizeLinear(ExternalizedOp def) {
 7790             super(SCHEMA, def);
 7791         }
 7792 
 7793         DynamicQuantizeLinear(DynamicQuantizeLinear that, CopyContext cc) {
 7794             super(that, cc);
 7795         }
 7796 
 7797         @Override
 7798         public DynamicQuantizeLinear transform(CopyContext cc, OpTransformer ot) {
 7799             return new DynamicQuantizeLinear(this, cc);
 7800         }
 7801 
 7802         DynamicQuantizeLinear(TypeElement resultType, Value x) {
 7803             super(SCHEMA, resultType, Set.of(), List.of(x), List.of());
 7804         }
 7805 
 7806         @Override
 7807         public SequencedSet<OnnxParameter> onnxOutputs() {
 7808             return onnxOutputs(SCHEMA);
 7809         }
 7810 
 7811         @Override
 7812         public SequencedMap<OnnxParameter, Object> onnxInputs() {
 7813             return onnxInputs(SCHEMA, List.of(x()));
 7814         }
 7815 
 7816         public Value x() {
 7817             return operands().get(0);
 7818         }
 7819 
 7820     }
 7821 
 7822     public static DynamicQuantizeLinear DynamicQuantizeLinear(TypeElement resultType, Value x) {
 7823         return new DynamicQuantizeLinear(resultType, x);
 7824     }
 7825 
 7826     @OpFactory.OpDeclaration(Einsum.NAME)
 7827     public static final class Einsum extends OnnxOp {
 7828         public static final String NAME = "Einsum";
 7829 
 7830         public enum Attribute implements OnnxAttribute {
 7831             equation(String.class, false, null),
 7832             ;
 7833 
 7834                 final Class<?> t;
 7835                 final boolean optional;
 7836                 final Object defaultValue;
 7837 
 7838                 Attribute(Class<?> type, boolean optional, Object defaultValue) {
 7839                     this.t = type;
 7840                     this.optional = optional;
 7841                     this.defaultValue = defaultValue;
 7842                     assert optional || defaultValue == null;
 7843                 }
 7844 
 7845                 public Class<?> type() {
 7846                     return t;
 7847                 }
 7848 
 7849                 public boolean isOptional() {
 7850                     return optional;
 7851                 }
 7852 
 7853                 public Object defaultValue() {
 7854                     return defaultValue;
 7855                 }
 7856         }
 7857 
 7858         public enum TypeConstraint implements OnnxTypeConstraint {
 7859             T(new OnnxType.TypeVariable("T", List.of(OnnxType.tensor(OnnxType.uint8()), OnnxType.tensor(OnnxType.uint16()), OnnxType.tensor(OnnxType.uint32()), OnnxType.tensor(OnnxType.uint64()), OnnxType.tensor(OnnxType.int8()), OnnxType.tensor(OnnxType.int16()), OnnxType.tensor(OnnxType.int32()), OnnxType.tensor(OnnxType.int64()), OnnxType.tensor(OnnxType.float16()), OnnxType.tensor(OnnxType.float32()), OnnxType.tensor(OnnxType.float64())))),
 7860             ;
 7861 
 7862             final OnnxType.TypeVariable typeVariable;
 7863 
 7864             TypeConstraint(OnnxType.TypeVariable typeVariable) {
 7865                 assert typeVariable.name().equals(name());
 7866                 this.typeVariable = typeVariable;
 7867             }
 7868 
 7869             @Override
 7870             public OnnxType.TypeVariable typeVariable() {
 7871                 return typeVariable;
 7872             }
 7873         }
 7874 
 7875         public enum InputParameter implements OnnxParameter {
 7876             Inputs(TypeConstraint.T.typeVariable(), Quantifier.VARIADIC),
 7877             ;
 7878 
 7879             final OnnxType type;
 7880             final Quantifier quantifier;
 7881 
 7882             InputParameter(OnnxType type, Quantifier quantifier) {
 7883                 this.type = type;
 7884                 this.quantifier = quantifier;
 7885             }
 7886 
 7887             @Override
 7888             public OnnxType type() {
 7889                 return type;
 7890             }
 7891 
 7892             @Override
 7893             public Quantifier quantifier() {
 7894                 return quantifier;
 7895             }
 7896         }
 7897 
 7898         public enum OutputParameter implements OnnxParameter {
 7899             Output(TypeConstraint.T.typeVariable(), Quantifier.REQUIRED),
 7900             ;
 7901 
 7902             final OnnxType type;
 7903             final Quantifier quantifier;
 7904 
 7905             OutputParameter(OnnxType type, Quantifier quantifier) {
 7906                 this.type = type;
 7907                 this.quantifier = quantifier;
 7908             }
 7909 
 7910             @Override
 7911             public OnnxType type() {
 7912                 return type;
 7913             }
 7914 
 7915             @Override
 7916             public Quantifier quantifier() {
 7917                 return quantifier;
 7918             }
 7919         }
 7920 
 7921         public static final OnnxSchema SCHEMA = new OnnxSchemaRecord(
 7922                 NAME,
 7923                 List.of(Attribute.values()),
 7924                 List.of(TypeConstraint.values()),
 7925                 List.of(InputParameter.values()),
 7926                 List.of(OutputParameter.values())
 7927         );
 7928 
 7929         public Einsum(ExternalizedOp def) {
 7930             super(SCHEMA, def);
 7931         }
 7932 
 7933         Einsum(Einsum that, CopyContext cc) {
 7934             super(that, cc);
 7935         }
 7936 
 7937         @Override
 7938         public Einsum transform(CopyContext cc, OpTransformer ot) {
 7939             return new Einsum(this, cc);
 7940         }
 7941 
 7942         Einsum(TypeElement resultType, List<Value> Inputs, String equation) {
 7943             super(SCHEMA, resultType, Set.of(), List.of(Inputs), List.of(equation));
 7944         }
 7945 
 7946         @Override
 7947         public SequencedSet<OnnxParameter> onnxOutputs() {
 7948             return onnxOutputs(SCHEMA);
 7949         }
 7950 
 7951         @Override
 7952         public SequencedMap<OnnxParameter, Object> onnxInputs() {
 7953             return onnxInputs(SCHEMA, List.of(Inputs()));
 7954         }
 7955 
 7956         public List<Value> Inputs() {
 7957             return operands();
 7958         }
 7959 
 7960         public String equation() {
 7961             String equation = Attribute.equation.access(String.class, onnxAttributes);
 7962             return equation;
 7963         }
 7964 
 7965     }
 7966 
 7967     public static Einsum Einsum(TypeElement resultType, List<Value> Inputs, String equation) {
 7968         return new Einsum(resultType, Inputs, equation);
 7969     }
 7970 
 7971     @OpFactory.OpDeclaration(Elu.NAME)
 7972     public static final class Elu extends OnnxOp {
 7973         public static final String NAME = "Elu";
 7974 
 7975         public enum Attribute implements OnnxAttribute {
 7976             alpha(Float.class, true, 1.0f),
 7977             ;
 7978 
 7979                 final Class<?> t;
 7980                 final boolean optional;
 7981                 final Object defaultValue;
 7982 
 7983                 Attribute(Class<?> type, boolean optional, Object defaultValue) {
 7984                     this.t = type;
 7985                     this.optional = optional;
 7986                     this.defaultValue = defaultValue;
 7987                     assert optional || defaultValue == null;
 7988                 }
 7989 
 7990                 public Class<?> type() {
 7991                     return t;
 7992                 }
 7993 
 7994                 public boolean isOptional() {
 7995                     return optional;
 7996                 }
 7997 
 7998                 public Object defaultValue() {
 7999                     return defaultValue;
 8000                 }
 8001         }
 8002 
 8003         public enum TypeConstraint implements OnnxTypeConstraint {
 8004             T(new OnnxType.TypeVariable("T", List.of(OnnxType.tensor(OnnxType.bfloat16()), OnnxType.tensor(OnnxType.float16()), OnnxType.tensor(OnnxType.float32()), OnnxType.tensor(OnnxType.float64())))),
 8005             ;
 8006 
 8007             final OnnxType.TypeVariable typeVariable;
 8008 
 8009             TypeConstraint(OnnxType.TypeVariable typeVariable) {
 8010                 assert typeVariable.name().equals(name());
 8011                 this.typeVariable = typeVariable;
 8012             }
 8013 
 8014             @Override
 8015             public OnnxType.TypeVariable typeVariable() {
 8016                 return typeVariable;
 8017             }
 8018         }
 8019 
 8020         public enum InputParameter implements OnnxParameter {
 8021             X(TypeConstraint.T.typeVariable(), Quantifier.REQUIRED),
 8022             ;
 8023 
 8024             final OnnxType type;
 8025             final Quantifier quantifier;
 8026 
 8027             InputParameter(OnnxType type, Quantifier quantifier) {
 8028                 this.type = type;
 8029                 this.quantifier = quantifier;
 8030             }
 8031 
 8032             @Override
 8033             public OnnxType type() {
 8034                 return type;
 8035             }
 8036 
 8037             @Override
 8038             public Quantifier quantifier() {
 8039                 return quantifier;
 8040             }
 8041         }
 8042 
 8043         public enum OutputParameter implements OnnxParameter {
 8044             Y(TypeConstraint.T.typeVariable(), Quantifier.REQUIRED),
 8045             ;
 8046 
 8047             final OnnxType type;
 8048             final Quantifier quantifier;
 8049 
 8050             OutputParameter(OnnxType type, Quantifier quantifier) {
 8051                 this.type = type;
 8052                 this.quantifier = quantifier;
 8053             }
 8054 
 8055             @Override
 8056             public OnnxType type() {
 8057                 return type;
 8058             }
 8059 
 8060             @Override
 8061             public Quantifier quantifier() {
 8062                 return quantifier;
 8063             }
 8064         }
 8065 
 8066         public static final OnnxSchema SCHEMA = new OnnxSchemaRecord(
 8067                 NAME,
 8068                 List.of(Attribute.values()),
 8069                 List.of(TypeConstraint.values()),
 8070                 List.of(InputParameter.values()),
 8071                 List.of(OutputParameter.values())
 8072         );
 8073 
 8074         public Elu(ExternalizedOp def) {
 8075             super(SCHEMA, def);
 8076         }
 8077 
 8078         Elu(Elu that, CopyContext cc) {
 8079             super(that, cc);
 8080         }
 8081 
 8082         @Override
 8083         public Elu transform(CopyContext cc, OpTransformer ot) {
 8084             return new Elu(this, cc);
 8085         }
 8086 
 8087         Elu(TypeElement resultType, Value X, java.util.Optional<Float> alpha) {
 8088             super(SCHEMA, resultType, Set.of(), List.of(X), List.of(alpha));
 8089         }
 8090 
 8091         @Override
 8092         public SequencedSet<OnnxParameter> onnxOutputs() {
 8093             return onnxOutputs(SCHEMA);
 8094         }
 8095 
 8096         @Override
 8097         public SequencedMap<OnnxParameter, Object> onnxInputs() {
 8098             return onnxInputs(SCHEMA, List.of(X()));
 8099         }
 8100 
 8101         public Value X() {
 8102             return operands().get(0);
 8103         }
 8104 
 8105         public java.util.Optional<Float> alpha() {
 8106             Float alpha = Attribute.alpha.access(Float.class, onnxAttributes);
 8107             return java.util.Optional.ofNullable(alpha);
 8108         }
 8109 
 8110     }
 8111 
 8112     public static Elu Elu(TypeElement resultType, Value X, java.util.Optional<Float> alpha) {
 8113         return new Elu(resultType, X, alpha);
 8114     }
 8115 
 8116     @OpFactory.OpDeclaration(Equal.NAME)
 8117     public static final class Equal extends OnnxOp {
 8118         public static final String NAME = "Equal";
 8119 
 8120         public enum Attribute implements OnnxAttribute.None { }
 8121 
 8122         public enum TypeConstraint implements OnnxTypeConstraint {
 8123             T(new OnnxType.TypeVariable("T", List.of(OnnxType.tensor(OnnxType.bool()), OnnxType.tensor(OnnxType.uint8()), OnnxType.tensor(OnnxType.uint16()), OnnxType.tensor(OnnxType.uint32()), OnnxType.tensor(OnnxType.uint64()), OnnxType.tensor(OnnxType.int8()), OnnxType.tensor(OnnxType.int16()), OnnxType.tensor(OnnxType.int32()), OnnxType.tensor(OnnxType.int64()), OnnxType.tensor(OnnxType.float16()), OnnxType.tensor(OnnxType.float32()), OnnxType.tensor(OnnxType.float64()), OnnxType.tensor(OnnxType.bfloat16()), OnnxType.tensor(OnnxType.string())))),
 8124             T1(new OnnxType.TypeVariable("T1", List.of(OnnxType.tensor(OnnxType.bool())))),
 8125             ;
 8126 
 8127             final OnnxType.TypeVariable typeVariable;
 8128 
 8129             TypeConstraint(OnnxType.TypeVariable typeVariable) {
 8130                 assert typeVariable.name().equals(name());
 8131                 this.typeVariable = typeVariable;
 8132             }
 8133 
 8134             @Override
 8135             public OnnxType.TypeVariable typeVariable() {
 8136                 return typeVariable;
 8137             }
 8138         }
 8139 
 8140         public enum InputParameter implements OnnxParameter {
 8141             A(TypeConstraint.T.typeVariable(), Quantifier.REQUIRED),
 8142             B(TypeConstraint.T.typeVariable(), Quantifier.REQUIRED),
 8143             ;
 8144 
 8145             final OnnxType type;
 8146             final Quantifier quantifier;
 8147 
 8148             InputParameter(OnnxType type, Quantifier quantifier) {
 8149                 this.type = type;
 8150                 this.quantifier = quantifier;
 8151             }
 8152 
 8153             @Override
 8154             public OnnxType type() {
 8155                 return type;
 8156             }
 8157 
 8158             @Override
 8159             public Quantifier quantifier() {
 8160                 return quantifier;
 8161             }
 8162         }
 8163 
 8164         public enum OutputParameter implements OnnxParameter {
 8165             C(TypeConstraint.T1.typeVariable(), Quantifier.REQUIRED),
 8166             ;
 8167 
 8168             final OnnxType type;
 8169             final Quantifier quantifier;
 8170 
 8171             OutputParameter(OnnxType type, Quantifier quantifier) {
 8172                 this.type = type;
 8173                 this.quantifier = quantifier;
 8174             }
 8175 
 8176             @Override
 8177             public OnnxType type() {
 8178                 return type;
 8179             }
 8180 
 8181             @Override
 8182             public Quantifier quantifier() {
 8183                 return quantifier;
 8184             }
 8185         }
 8186 
 8187         public static final OnnxSchema SCHEMA = new OnnxSchemaRecord(
 8188                 NAME,
 8189                 List.of(Attribute.values()),
 8190                 List.of(TypeConstraint.values()),
 8191                 List.of(InputParameter.values()),
 8192                 List.of(OutputParameter.values())
 8193         );
 8194 
 8195         public Equal(ExternalizedOp def) {
 8196             super(SCHEMA, def);
 8197         }
 8198 
 8199         Equal(Equal that, CopyContext cc) {
 8200             super(that, cc);
 8201         }
 8202 
 8203         @Override
 8204         public Equal transform(CopyContext cc, OpTransformer ot) {
 8205             return new Equal(this, cc);
 8206         }
 8207 
 8208         Equal(TypeElement resultType, Value A, Value B) {
 8209             super(SCHEMA, resultType, Set.of(), List.of(A, B), List.of());
 8210         }
 8211 
 8212         @Override
 8213         public SequencedSet<OnnxParameter> onnxOutputs() {
 8214             return onnxOutputs(SCHEMA);
 8215         }
 8216 
 8217         @Override
 8218         public SequencedMap<OnnxParameter, Object> onnxInputs() {
 8219             return onnxInputs(SCHEMA, List.of(A(), B()));
 8220         }
 8221 
 8222         public Value A() {
 8223             return operands().get(0);
 8224         }
 8225 
 8226         public Value B() {
 8227             return operands().get(1);
 8228         }
 8229 
 8230     }
 8231 
 8232     public static Equal Equal(TypeElement resultType, Value A, Value B) {
 8233         return new Equal(resultType, A, B);
 8234     }
 8235 
 8236     @OpFactory.OpDeclaration(Erf.NAME)
 8237     public static final class Erf extends OnnxOp {
 8238         public static final String NAME = "Erf";
 8239 
 8240         public enum Attribute implements OnnxAttribute.None { }
 8241 
 8242         public enum TypeConstraint implements OnnxTypeConstraint {
 8243             T(new OnnxType.TypeVariable("T", List.of(OnnxType.tensor(OnnxType.uint8()), OnnxType.tensor(OnnxType.uint16()), OnnxType.tensor(OnnxType.uint32()), OnnxType.tensor(OnnxType.uint64()), OnnxType.tensor(OnnxType.int8()), OnnxType.tensor(OnnxType.int16()), OnnxType.tensor(OnnxType.int32()), OnnxType.tensor(OnnxType.int64()), OnnxType.tensor(OnnxType.float16()), OnnxType.tensor(OnnxType.float32()), OnnxType.tensor(OnnxType.float64()), OnnxType.tensor(OnnxType.bfloat16())))),
 8244             ;
 8245 
 8246             final OnnxType.TypeVariable typeVariable;
 8247 
 8248             TypeConstraint(OnnxType.TypeVariable typeVariable) {
 8249                 assert typeVariable.name().equals(name());
 8250                 this.typeVariable = typeVariable;
 8251             }
 8252 
 8253             @Override
 8254             public OnnxType.TypeVariable typeVariable() {
 8255                 return typeVariable;
 8256             }
 8257         }
 8258 
 8259         public enum InputParameter implements OnnxParameter {
 8260             input(TypeConstraint.T.typeVariable(), Quantifier.REQUIRED),
 8261             ;
 8262 
 8263             final OnnxType type;
 8264             final Quantifier quantifier;
 8265 
 8266             InputParameter(OnnxType type, Quantifier quantifier) {
 8267                 this.type = type;
 8268                 this.quantifier = quantifier;
 8269             }
 8270 
 8271             @Override
 8272             public OnnxType type() {
 8273                 return type;
 8274             }
 8275 
 8276             @Override
 8277             public Quantifier quantifier() {
 8278                 return quantifier;
 8279             }
 8280         }
 8281 
 8282         public enum OutputParameter implements OnnxParameter {
 8283             output(TypeConstraint.T.typeVariable(), Quantifier.REQUIRED),
 8284             ;
 8285 
 8286             final OnnxType type;
 8287             final Quantifier quantifier;
 8288 
 8289             OutputParameter(OnnxType type, Quantifier quantifier) {
 8290                 this.type = type;
 8291                 this.quantifier = quantifier;
 8292             }
 8293 
 8294             @Override
 8295             public OnnxType type() {
 8296                 return type;
 8297             }
 8298 
 8299             @Override
 8300             public Quantifier quantifier() {
 8301                 return quantifier;
 8302             }
 8303         }
 8304 
 8305         public static final OnnxSchema SCHEMA = new OnnxSchemaRecord(
 8306                 NAME,
 8307                 List.of(Attribute.values()),
 8308                 List.of(TypeConstraint.values()),
 8309                 List.of(InputParameter.values()),
 8310                 List.of(OutputParameter.values())
 8311         );
 8312 
 8313         public Erf(ExternalizedOp def) {
 8314             super(SCHEMA, def);
 8315         }
 8316 
 8317         Erf(Erf that, CopyContext cc) {
 8318             super(that, cc);
 8319         }
 8320 
 8321         @Override
 8322         public Erf transform(CopyContext cc, OpTransformer ot) {
 8323             return new Erf(this, cc);
 8324         }
 8325 
 8326         Erf(TypeElement resultType, Value input) {
 8327             super(SCHEMA, resultType, Set.of(), List.of(input), List.of());
 8328         }
 8329 
 8330         @Override
 8331         public SequencedSet<OnnxParameter> onnxOutputs() {
 8332             return onnxOutputs(SCHEMA);
 8333         }
 8334 
 8335         @Override
 8336         public SequencedMap<OnnxParameter, Object> onnxInputs() {
 8337             return onnxInputs(SCHEMA, List.of(input()));
 8338         }
 8339 
 8340         public Value input() {
 8341             return operands().get(0);
 8342         }
 8343 
 8344     }
 8345 
 8346     public static Erf Erf(TypeElement resultType, Value input) {
 8347         return new Erf(resultType, input);
 8348     }
 8349 
 8350     @OpFactory.OpDeclaration(Exp.NAME)
 8351     public static final class Exp extends OnnxOp {
 8352         public static final String NAME = "Exp";
 8353 
 8354         public enum Attribute implements OnnxAttribute.None { }
 8355 
 8356         public enum TypeConstraint implements OnnxTypeConstraint {
 8357             T(new OnnxType.TypeVariable("T", List.of(OnnxType.tensor(OnnxType.bfloat16()), OnnxType.tensor(OnnxType.float16()), OnnxType.tensor(OnnxType.float32()), OnnxType.tensor(OnnxType.float64())))),
 8358             ;
 8359 
 8360             final OnnxType.TypeVariable typeVariable;
 8361 
 8362             TypeConstraint(OnnxType.TypeVariable typeVariable) {
 8363                 assert typeVariable.name().equals(name());
 8364                 this.typeVariable = typeVariable;
 8365             }
 8366 
 8367             @Override
 8368             public OnnxType.TypeVariable typeVariable() {
 8369                 return typeVariable;
 8370             }
 8371         }
 8372 
 8373         public enum InputParameter implements OnnxParameter {
 8374             input(TypeConstraint.T.typeVariable(), Quantifier.REQUIRED),
 8375             ;
 8376 
 8377             final OnnxType type;
 8378             final Quantifier quantifier;
 8379 
 8380             InputParameter(OnnxType type, Quantifier quantifier) {
 8381                 this.type = type;
 8382                 this.quantifier = quantifier;
 8383             }
 8384 
 8385             @Override
 8386             public OnnxType type() {
 8387                 return type;
 8388             }
 8389 
 8390             @Override
 8391             public Quantifier quantifier() {
 8392                 return quantifier;
 8393             }
 8394         }
 8395 
 8396         public enum OutputParameter implements OnnxParameter {
 8397             output(TypeConstraint.T.typeVariable(), Quantifier.REQUIRED),
 8398             ;
 8399 
 8400             final OnnxType type;
 8401             final Quantifier quantifier;
 8402 
 8403             OutputParameter(OnnxType type, Quantifier quantifier) {
 8404                 this.type = type;
 8405                 this.quantifier = quantifier;
 8406             }
 8407 
 8408             @Override
 8409             public OnnxType type() {
 8410                 return type;
 8411             }
 8412 
 8413             @Override
 8414             public Quantifier quantifier() {
 8415                 return quantifier;
 8416             }
 8417         }
 8418 
 8419         public static final OnnxSchema SCHEMA = new OnnxSchemaRecord(
 8420                 NAME,
 8421                 List.of(Attribute.values()),
 8422                 List.of(TypeConstraint.values()),
 8423                 List.of(InputParameter.values()),
 8424                 List.of(OutputParameter.values())
 8425         );
 8426 
 8427         public Exp(ExternalizedOp def) {
 8428             super(SCHEMA, def);
 8429         }
 8430 
 8431         Exp(Exp that, CopyContext cc) {
 8432             super(that, cc);
 8433         }
 8434 
 8435         @Override
 8436         public Exp transform(CopyContext cc, OpTransformer ot) {
 8437             return new Exp(this, cc);
 8438         }
 8439 
 8440         Exp(TypeElement resultType, Value input) {
 8441             super(SCHEMA, resultType, Set.of(), List.of(input), List.of());
 8442         }
 8443 
 8444         @Override
 8445         public SequencedSet<OnnxParameter> onnxOutputs() {
 8446             return onnxOutputs(SCHEMA);
 8447         }
 8448 
 8449         @Override
 8450         public SequencedMap<OnnxParameter, Object> onnxInputs() {
 8451             return onnxInputs(SCHEMA, List.of(input()));
 8452         }
 8453 
 8454         public Value input() {
 8455             return operands().get(0);
 8456         }
 8457 
 8458     }
 8459 
 8460     public static Exp Exp(TypeElement resultType, Value input) {
 8461         return new Exp(resultType, input);
 8462     }
 8463 
 8464     @OpFactory.OpDeclaration(Expand.NAME)
 8465     public static final class Expand extends OnnxOp {
 8466         public static final String NAME = "Expand";
 8467 
 8468         public enum Attribute implements OnnxAttribute.None { }
 8469 
 8470         public enum TypeConstraint implements OnnxTypeConstraint {
 8471             T(new OnnxType.TypeVariable("T", List.of(OnnxType.tensor(OnnxType.uint8()), OnnxType.tensor(OnnxType.uint16()), OnnxType.tensor(OnnxType.uint32()), OnnxType.tensor(OnnxType.uint64()), OnnxType.tensor(OnnxType.int8()), OnnxType.tensor(OnnxType.int16()), OnnxType.tensor(OnnxType.int32()), OnnxType.tensor(OnnxType.int64()), OnnxType.tensor(OnnxType.bfloat16()), OnnxType.tensor(OnnxType.float16()), OnnxType.tensor(OnnxType.float32()), OnnxType.tensor(OnnxType.float64()), OnnxType.tensor(OnnxType.string()), OnnxType.tensor(OnnxType.bool()), OnnxType.tensor(OnnxType.complex64()), OnnxType.tensor(OnnxType.complex128())))),
 8472             ;
 8473 
 8474             final OnnxType.TypeVariable typeVariable;
 8475 
 8476             TypeConstraint(OnnxType.TypeVariable typeVariable) {
 8477                 assert typeVariable.name().equals(name());
 8478                 this.typeVariable = typeVariable;
 8479             }
 8480 
 8481             @Override
 8482             public OnnxType.TypeVariable typeVariable() {
 8483                 return typeVariable;
 8484             }
 8485         }
 8486 
 8487         public enum InputParameter implements OnnxParameter {
 8488             input(TypeConstraint.T.typeVariable(), Quantifier.REQUIRED),
 8489             shape(OnnxType.tensor(OnnxType.int64()), Quantifier.REQUIRED),
 8490             ;
 8491 
 8492             final OnnxType type;
 8493             final Quantifier quantifier;
 8494 
 8495             InputParameter(OnnxType type, Quantifier quantifier) {
 8496                 this.type = type;
 8497                 this.quantifier = quantifier;
 8498             }
 8499 
 8500             @Override
 8501             public OnnxType type() {
 8502                 return type;
 8503             }
 8504 
 8505             @Override
 8506             public Quantifier quantifier() {
 8507                 return quantifier;
 8508             }
 8509         }
 8510 
 8511         public enum OutputParameter implements OnnxParameter {
 8512             output(TypeConstraint.T.typeVariable(), Quantifier.REQUIRED),
 8513             ;
 8514 
 8515             final OnnxType type;
 8516             final Quantifier quantifier;
 8517 
 8518             OutputParameter(OnnxType type, Quantifier quantifier) {
 8519                 this.type = type;
 8520                 this.quantifier = quantifier;
 8521             }
 8522 
 8523             @Override
 8524             public OnnxType type() {
 8525                 return type;
 8526             }
 8527 
 8528             @Override
 8529             public Quantifier quantifier() {
 8530                 return quantifier;
 8531             }
 8532         }
 8533 
 8534         public static final OnnxSchema SCHEMA = new OnnxSchemaRecord(
 8535                 NAME,
 8536                 List.of(Attribute.values()),
 8537                 List.of(TypeConstraint.values()),
 8538                 List.of(InputParameter.values()),
 8539                 List.of(OutputParameter.values())
 8540         );
 8541 
 8542         public Expand(ExternalizedOp def) {
 8543             super(SCHEMA, def);
 8544         }
 8545 
 8546         Expand(Expand that, CopyContext cc) {
 8547             super(that, cc);
 8548         }
 8549 
 8550         @Override
 8551         public Expand transform(CopyContext cc, OpTransformer ot) {
 8552             return new Expand(this, cc);
 8553         }
 8554 
 8555         Expand(TypeElement resultType, Value input, Value shape) {
 8556             super(SCHEMA, resultType, Set.of(), List.of(input, shape), List.of());
 8557         }
 8558 
 8559         @Override
 8560         public SequencedSet<OnnxParameter> onnxOutputs() {
 8561             return onnxOutputs(SCHEMA);
 8562         }
 8563 
 8564         @Override
 8565         public SequencedMap<OnnxParameter, Object> onnxInputs() {
 8566             return onnxInputs(SCHEMA, List.of(input(), shape()));
 8567         }
 8568 
 8569         public Value input() {
 8570             return operands().get(0);
 8571         }
 8572 
 8573         public Value shape() {
 8574             return operands().get(1);
 8575         }
 8576 
 8577     }
 8578 
 8579     public static Expand Expand(TypeElement resultType, Value input, Value shape) {
 8580         return new Expand(resultType, input, shape);
 8581     }
 8582 
 8583     @OpFactory.OpDeclaration(EyeLike.NAME)
 8584     public static final class EyeLike extends OnnxOp {
 8585         public static final String NAME = "EyeLike";
 8586 
 8587         public enum Attribute implements OnnxAttribute {
 8588             dtype(Integer.class, true, null),
 8589             k(Integer.class, true, 0),
 8590             ;
 8591 
 8592                 final Class<?> t;
 8593                 final boolean optional;
 8594                 final Object defaultValue;
 8595 
 8596                 Attribute(Class<?> type, boolean optional, Object defaultValue) {
 8597                     this.t = type;
 8598                     this.optional = optional;
 8599                     this.defaultValue = defaultValue;
 8600                     assert optional || defaultValue == null;
 8601                 }
 8602 
 8603                 public Class<?> type() {
 8604                     return t;
 8605                 }
 8606 
 8607                 public boolean isOptional() {
 8608                     return optional;
 8609                 }
 8610 
 8611                 public Object defaultValue() {
 8612                     return defaultValue;
 8613                 }
 8614         }
 8615 
 8616         public enum TypeConstraint implements OnnxTypeConstraint {
 8617             T1(new OnnxType.TypeVariable("T1", List.of(OnnxType.tensor(OnnxType.uint8()), OnnxType.tensor(OnnxType.uint16()), OnnxType.tensor(OnnxType.uint32()), OnnxType.tensor(OnnxType.uint64()), OnnxType.tensor(OnnxType.int8()), OnnxType.tensor(OnnxType.int16()), OnnxType.tensor(OnnxType.int32()), OnnxType.tensor(OnnxType.int64()), OnnxType.tensor(OnnxType.bfloat16()), OnnxType.tensor(OnnxType.float16()), OnnxType.tensor(OnnxType.float32()), OnnxType.tensor(OnnxType.float64()), OnnxType.tensor(OnnxType.bool())))),
 8618             T2(new OnnxType.TypeVariable("T2", List.of(OnnxType.tensor(OnnxType.uint8()), OnnxType.tensor(OnnxType.uint16()), OnnxType.tensor(OnnxType.uint32()), OnnxType.tensor(OnnxType.uint64()), OnnxType.tensor(OnnxType.int8()), OnnxType.tensor(OnnxType.int16()), OnnxType.tensor(OnnxType.int32()), OnnxType.tensor(OnnxType.int64()), OnnxType.tensor(OnnxType.bfloat16()), OnnxType.tensor(OnnxType.float16()), OnnxType.tensor(OnnxType.float32()), OnnxType.tensor(OnnxType.float64()), OnnxType.tensor(OnnxType.bool())))),
 8619             ;
 8620 
 8621             final OnnxType.TypeVariable typeVariable;
 8622 
 8623             TypeConstraint(OnnxType.TypeVariable typeVariable) {
 8624                 assert typeVariable.name().equals(name());
 8625                 this.typeVariable = typeVariable;
 8626             }
 8627 
 8628             @Override
 8629             public OnnxType.TypeVariable typeVariable() {
 8630                 return typeVariable;
 8631             }
 8632         }
 8633 
 8634         public enum InputParameter implements OnnxParameter {
 8635             input(TypeConstraint.T1.typeVariable(), Quantifier.REQUIRED),
 8636             ;
 8637 
 8638             final OnnxType type;
 8639             final Quantifier quantifier;
 8640 
 8641             InputParameter(OnnxType type, Quantifier quantifier) {
 8642                 this.type = type;
 8643                 this.quantifier = quantifier;
 8644             }
 8645 
 8646             @Override
 8647             public OnnxType type() {
 8648                 return type;
 8649             }
 8650 
 8651             @Override
 8652             public Quantifier quantifier() {
 8653                 return quantifier;
 8654             }
 8655         }
 8656 
 8657         public enum OutputParameter implements OnnxParameter {
 8658             output(TypeConstraint.T2.typeVariable(), Quantifier.REQUIRED),
 8659             ;
 8660 
 8661             final OnnxType type;
 8662             final Quantifier quantifier;
 8663 
 8664             OutputParameter(OnnxType type, Quantifier quantifier) {
 8665                 this.type = type;
 8666                 this.quantifier = quantifier;
 8667             }
 8668 
 8669             @Override
 8670             public OnnxType type() {
 8671                 return type;
 8672             }
 8673 
 8674             @Override
 8675             public Quantifier quantifier() {
 8676                 return quantifier;
 8677             }
 8678         }
 8679 
 8680         public static final OnnxSchema SCHEMA = new OnnxSchemaRecord(
 8681                 NAME,
 8682                 List.of(Attribute.values()),
 8683                 List.of(TypeConstraint.values()),
 8684                 List.of(InputParameter.values()),
 8685                 List.of(OutputParameter.values())
 8686         );
 8687 
 8688         public EyeLike(ExternalizedOp def) {
 8689             super(SCHEMA, def);
 8690         }
 8691 
 8692         EyeLike(EyeLike that, CopyContext cc) {
 8693             super(that, cc);
 8694         }
 8695 
 8696         @Override
 8697         public EyeLike transform(CopyContext cc, OpTransformer ot) {
 8698             return new EyeLike(this, cc);
 8699         }
 8700 
 8701         EyeLike(TypeElement resultType, Value input, java.util.Optional<Integer> dtype, java.util.Optional<Integer> k) {
 8702             super(SCHEMA, resultType, Set.of(), List.of(input), List.of(dtype, k));
 8703         }
 8704 
 8705         @Override
 8706         public SequencedSet<OnnxParameter> onnxOutputs() {
 8707             return onnxOutputs(SCHEMA);
 8708         }
 8709 
 8710         @Override
 8711         public SequencedMap<OnnxParameter, Object> onnxInputs() {
 8712             return onnxInputs(SCHEMA, List.of(input()));
 8713         }
 8714 
 8715         public Value input() {
 8716             return operands().get(0);
 8717         }
 8718 
 8719         public java.util.Optional<Integer> dtype() {
 8720             Integer dtype = Attribute.dtype.access(Integer.class, onnxAttributes);
 8721             return java.util.Optional.ofNullable(dtype);
 8722         }
 8723 
 8724         public java.util.Optional<Integer> k() {
 8725             Integer k = Attribute.k.access(Integer.class, onnxAttributes);
 8726             return java.util.Optional.ofNullable(k);
 8727         }
 8728 
 8729     }
 8730 
 8731     public static EyeLike EyeLike(TypeElement resultType, Value input, java.util.Optional<Integer> dtype, java.util.Optional<Integer> k) {
 8732         return new EyeLike(resultType, input, dtype, k);
 8733     }
 8734 
 8735     @OpFactory.OpDeclaration(FeatureVectorizer.NAME)
 8736     public static final class FeatureVectorizer extends OnnxOp {
 8737         public static final String NAME = "FeatureVectorizer";
 8738 
 8739         public enum Attribute implements OnnxAttribute {
 8740             inputdimensions(int[].class, true, null),
 8741             ;
 8742 
 8743                 final Class<?> t;
 8744                 final boolean optional;
 8745                 final Object defaultValue;
 8746 
 8747                 Attribute(Class<?> type, boolean optional, Object defaultValue) {
 8748                     this.t = type;
 8749                     this.optional = optional;
 8750                     this.defaultValue = defaultValue;
 8751                     assert optional || defaultValue == null;
 8752                 }
 8753 
 8754                 public Class<?> type() {
 8755                     return t;
 8756                 }
 8757 
 8758                 public boolean isOptional() {
 8759                     return optional;
 8760                 }
 8761 
 8762                 public Object defaultValue() {
 8763                     return defaultValue;
 8764                 }
 8765         }
 8766 
 8767         public enum TypeConstraint implements OnnxTypeConstraint {
 8768             T1(new OnnxType.TypeVariable("T1", List.of(OnnxType.tensor(OnnxType.int32()), OnnxType.tensor(OnnxType.int64()), OnnxType.tensor(OnnxType.float32()), OnnxType.tensor(OnnxType.float64())))),
 8769             ;
 8770 
 8771             final OnnxType.TypeVariable typeVariable;
 8772 
 8773             TypeConstraint(OnnxType.TypeVariable typeVariable) {
 8774                 assert typeVariable.name().equals(name());
 8775                 this.typeVariable = typeVariable;
 8776             }
 8777 
 8778             @Override
 8779             public OnnxType.TypeVariable typeVariable() {
 8780                 return typeVariable;
 8781             }
 8782         }
 8783 
 8784         public enum InputParameter implements OnnxParameter {
 8785             X(TypeConstraint.T1.typeVariable(), Quantifier.VARIADIC),
 8786             ;
 8787 
 8788             final OnnxType type;
 8789             final Quantifier quantifier;
 8790 
 8791             InputParameter(OnnxType type, Quantifier quantifier) {
 8792                 this.type = type;
 8793                 this.quantifier = quantifier;
 8794             }
 8795 
 8796             @Override
 8797             public OnnxType type() {
 8798                 return type;
 8799             }
 8800 
 8801             @Override
 8802             public Quantifier quantifier() {
 8803                 return quantifier;
 8804             }
 8805         }
 8806 
 8807         public enum OutputParameter implements OnnxParameter {
 8808             Y(OnnxType.tensor(OnnxType.float32()), Quantifier.REQUIRED),
 8809             ;
 8810 
 8811             final OnnxType type;
 8812             final Quantifier quantifier;
 8813 
 8814             OutputParameter(OnnxType type, Quantifier quantifier) {
 8815                 this.type = type;
 8816                 this.quantifier = quantifier;
 8817             }
 8818 
 8819             @Override
 8820             public OnnxType type() {
 8821                 return type;
 8822             }
 8823 
 8824             @Override
 8825             public Quantifier quantifier() {
 8826                 return quantifier;
 8827             }
 8828         }
 8829 
 8830         public static final OnnxSchema SCHEMA = new OnnxSchemaRecord(
 8831                 NAME,
 8832                 List.of(Attribute.values()),
 8833                 List.of(TypeConstraint.values()),
 8834                 List.of(InputParameter.values()),
 8835                 List.of(OutputParameter.values())
 8836         );
 8837 
 8838         public FeatureVectorizer(ExternalizedOp def) {
 8839             super(SCHEMA, def);
 8840         }
 8841 
 8842         FeatureVectorizer(FeatureVectorizer that, CopyContext cc) {
 8843             super(that, cc);
 8844         }
 8845 
 8846         @Override
 8847         public FeatureVectorizer transform(CopyContext cc, OpTransformer ot) {
 8848             return new FeatureVectorizer(this, cc);
 8849         }
 8850 
 8851         FeatureVectorizer(TypeElement resultType, List<Value> X, java.util.Optional<int[]> inputdimensions) {
 8852             super(SCHEMA, resultType, Set.of(), List.of(X), List.of(inputdimensions));
 8853         }
 8854 
 8855         @Override
 8856         public SequencedSet<OnnxParameter> onnxOutputs() {
 8857             return onnxOutputs(SCHEMA);
 8858         }
 8859 
 8860         @Override
 8861         public SequencedMap<OnnxParameter, Object> onnxInputs() {
 8862             return onnxInputs(SCHEMA, List.of(X()));
 8863         }
 8864 
 8865         public List<Value> X() {
 8866             return operands();
 8867         }
 8868 
 8869         public java.util.Optional<int[]> inputdimensions() {
 8870             int[] inputdimensions = Attribute.inputdimensions.access(int[].class, onnxAttributes);
 8871             return java.util.Optional.ofNullable(inputdimensions).map(int[]::clone);
 8872         }
 8873 
 8874     }
 8875 
 8876     public static FeatureVectorizer FeatureVectorizer(TypeElement resultType, List<Value> X, java.util.Optional<int[]> inputdimensions) {
 8877         return new FeatureVectorizer(resultType, X, inputdimensions);
 8878     }
 8879 
 8880     @OpFactory.OpDeclaration(Flatten.NAME)
 8881     public static final class Flatten extends OnnxOp {
 8882         public static final String NAME = "Flatten";
 8883 
 8884         public enum Attribute implements OnnxAttribute {
 8885             axis(Integer.class, true, 1),
 8886             ;
 8887 
 8888                 final Class<?> t;
 8889                 final boolean optional;
 8890                 final Object defaultValue;
 8891 
 8892                 Attribute(Class<?> type, boolean optional, Object defaultValue) {
 8893                     this.t = type;
 8894                     this.optional = optional;
 8895                     this.defaultValue = defaultValue;
 8896                     assert optional || defaultValue == null;
 8897                 }
 8898 
 8899                 public Class<?> type() {
 8900                     return t;
 8901                 }
 8902 
 8903                 public boolean isOptional() {
 8904                     return optional;
 8905                 }
 8906 
 8907                 public Object defaultValue() {
 8908                     return defaultValue;
 8909                 }
 8910         }
 8911 
 8912         public enum TypeConstraint implements OnnxTypeConstraint {
 8913             T(new OnnxType.TypeVariable("T", List.of(OnnxType.tensor(OnnxType.uint8()), OnnxType.tensor(OnnxType.uint16()), OnnxType.tensor(OnnxType.uint32()), OnnxType.tensor(OnnxType.uint64()), OnnxType.tensor(OnnxType.int8()), OnnxType.tensor(OnnxType.int16()), OnnxType.tensor(OnnxType.int32()), OnnxType.tensor(OnnxType.int64()), OnnxType.tensor(OnnxType.bfloat16()), OnnxType.tensor(OnnxType.float16()), OnnxType.tensor(OnnxType.float32()), OnnxType.tensor(OnnxType.float64()), OnnxType.tensor(OnnxType.string()), OnnxType.tensor(OnnxType.bool()), OnnxType.tensor(OnnxType.complex64()), OnnxType.tensor(OnnxType.complex128()), OnnxType.tensor(OnnxType.float8e4m3fn()), OnnxType.tensor(OnnxType.float8e4m3fnuz()), OnnxType.tensor(OnnxType.float8e5m2()), OnnxType.tensor(OnnxType.float8e5m2fnuz()), OnnxType.tensor(OnnxType.uint4()), OnnxType.tensor(OnnxType.int4()), OnnxType.tensor(OnnxType.float4e2m1())))),
 8914             ;
 8915 
 8916             final OnnxType.TypeVariable typeVariable;
 8917 
 8918             TypeConstraint(OnnxType.TypeVariable typeVariable) {
 8919                 assert typeVariable.name().equals(name());
 8920                 this.typeVariable = typeVariable;
 8921             }
 8922 
 8923             @Override
 8924             public OnnxType.TypeVariable typeVariable() {
 8925                 return typeVariable;
 8926             }
 8927         }
 8928 
 8929         public enum InputParameter implements OnnxParameter {
 8930             input(TypeConstraint.T.typeVariable(), Quantifier.REQUIRED),
 8931             ;
 8932 
 8933             final OnnxType type;
 8934             final Quantifier quantifier;
 8935 
 8936             InputParameter(OnnxType type, Quantifier quantifier) {
 8937                 this.type = type;
 8938                 this.quantifier = quantifier;
 8939             }
 8940 
 8941             @Override
 8942             public OnnxType type() {
 8943                 return type;
 8944             }
 8945 
 8946             @Override
 8947             public Quantifier quantifier() {
 8948                 return quantifier;
 8949             }
 8950         }
 8951 
 8952         public enum OutputParameter implements OnnxParameter {
 8953             output(TypeConstraint.T.typeVariable(), Quantifier.REQUIRED),
 8954             ;
 8955 
 8956             final OnnxType type;
 8957             final Quantifier quantifier;
 8958 
 8959             OutputParameter(OnnxType type, Quantifier quantifier) {
 8960                 this.type = type;
 8961                 this.quantifier = quantifier;
 8962             }
 8963 
 8964             @Override
 8965             public OnnxType type() {
 8966                 return type;
 8967             }
 8968 
 8969             @Override
 8970             public Quantifier quantifier() {
 8971                 return quantifier;
 8972             }
 8973         }
 8974 
 8975         public static final OnnxSchema SCHEMA = new OnnxSchemaRecord(
 8976                 NAME,
 8977                 List.of(Attribute.values()),
 8978                 List.of(TypeConstraint.values()),
 8979                 List.of(InputParameter.values()),
 8980                 List.of(OutputParameter.values())
 8981         );
 8982 
 8983         public Flatten(ExternalizedOp def) {
 8984             super(SCHEMA, def);
 8985         }
 8986 
 8987         Flatten(Flatten that, CopyContext cc) {
 8988             super(that, cc);
 8989         }
 8990 
 8991         @Override
 8992         public Flatten transform(CopyContext cc, OpTransformer ot) {
 8993             return new Flatten(this, cc);
 8994         }
 8995 
 8996         Flatten(TypeElement resultType, Value input, java.util.Optional<Integer> axis) {
 8997             super(SCHEMA, resultType, Set.of(), List.of(input), List.of(axis));
 8998         }
 8999 
 9000         @Override
 9001         public SequencedSet<OnnxParameter> onnxOutputs() {
 9002             return onnxOutputs(SCHEMA);
 9003         }
 9004 
 9005         @Override
 9006         public SequencedMap<OnnxParameter, Object> onnxInputs() {
 9007             return onnxInputs(SCHEMA, List.of(input()));
 9008         }
 9009 
 9010         public Value input() {
 9011             return operands().get(0);
 9012         }
 9013 
 9014         public java.util.Optional<Integer> axis() {
 9015             Integer axis = Attribute.axis.access(Integer.class, onnxAttributes);
 9016             return java.util.Optional.ofNullable(axis);
 9017         }
 9018 
 9019     }
 9020 
 9021     public static Flatten Flatten(TypeElement resultType, Value input, java.util.Optional<Integer> axis) {
 9022         return new Flatten(resultType, input, axis);
 9023     }
 9024 
 9025     @OpFactory.OpDeclaration(Floor.NAME)
 9026     public static final class Floor extends OnnxOp {
 9027         public static final String NAME = "Floor";
 9028 
 9029         public enum Attribute implements OnnxAttribute.None { }
 9030 
 9031         public enum TypeConstraint implements OnnxTypeConstraint {
 9032             T(new OnnxType.TypeVariable("T", List.of(OnnxType.tensor(OnnxType.float16()), OnnxType.tensor(OnnxType.float32()), OnnxType.tensor(OnnxType.float64()), OnnxType.tensor(OnnxType.bfloat16())))),
 9033             ;
 9034 
 9035             final OnnxType.TypeVariable typeVariable;
 9036 
 9037             TypeConstraint(OnnxType.TypeVariable typeVariable) {
 9038                 assert typeVariable.name().equals(name());
 9039                 this.typeVariable = typeVariable;
 9040             }
 9041 
 9042             @Override
 9043             public OnnxType.TypeVariable typeVariable() {
 9044                 return typeVariable;
 9045             }
 9046         }
 9047 
 9048         public enum InputParameter implements OnnxParameter {
 9049             X(TypeConstraint.T.typeVariable(), Quantifier.REQUIRED),
 9050             ;
 9051 
 9052             final OnnxType type;
 9053             final Quantifier quantifier;
 9054 
 9055             InputParameter(OnnxType type, Quantifier quantifier) {
 9056                 this.type = type;
 9057                 this.quantifier = quantifier;
 9058             }
 9059 
 9060             @Override
 9061             public OnnxType type() {
 9062                 return type;
 9063             }
 9064 
 9065             @Override
 9066             public Quantifier quantifier() {
 9067                 return quantifier;
 9068             }
 9069         }
 9070 
 9071         public enum OutputParameter implements OnnxParameter {
 9072             Y(TypeConstraint.T.typeVariable(), Quantifier.REQUIRED),
 9073             ;
 9074 
 9075             final OnnxType type;
 9076             final Quantifier quantifier;
 9077 
 9078             OutputParameter(OnnxType type, Quantifier quantifier) {
 9079                 this.type = type;
 9080                 this.quantifier = quantifier;
 9081             }
 9082 
 9083             @Override
 9084             public OnnxType type() {
 9085                 return type;
 9086             }
 9087 
 9088             @Override
 9089             public Quantifier quantifier() {
 9090                 return quantifier;
 9091             }
 9092         }
 9093 
 9094         public static final OnnxSchema SCHEMA = new OnnxSchemaRecord(
 9095                 NAME,
 9096                 List.of(Attribute.values()),
 9097                 List.of(TypeConstraint.values()),
 9098                 List.of(InputParameter.values()),
 9099                 List.of(OutputParameter.values())
 9100         );
 9101 
 9102         public Floor(ExternalizedOp def) {
 9103             super(SCHEMA, def);
 9104         }
 9105 
 9106         Floor(Floor that, CopyContext cc) {
 9107             super(that, cc);
 9108         }
 9109 
 9110         @Override
 9111         public Floor transform(CopyContext cc, OpTransformer ot) {
 9112             return new Floor(this, cc);
 9113         }
 9114 
 9115         Floor(TypeElement resultType, Value X) {
 9116             super(SCHEMA, resultType, Set.of(), List.of(X), List.of());
 9117         }
 9118 
 9119         @Override
 9120         public SequencedSet<OnnxParameter> onnxOutputs() {
 9121             return onnxOutputs(SCHEMA);
 9122         }
 9123 
 9124         @Override
 9125         public SequencedMap<OnnxParameter, Object> onnxInputs() {
 9126             return onnxInputs(SCHEMA, List.of(X()));
 9127         }
 9128 
 9129         public Value X() {
 9130             return operands().get(0);
 9131         }
 9132 
 9133     }
 9134 
 9135     public static Floor Floor(TypeElement resultType, Value X) {
 9136         return new Floor(resultType, X);
 9137     }
 9138 
 9139     @OpFactory.OpDeclaration(GRU.NAME)
 9140     public static final class GRU extends OnnxOp {
 9141         public static final String NAME = "GRU";
 9142 
 9143         public enum Attribute implements OnnxAttribute {
 9144             layout(Integer.class, true, 0),
 9145             activation_alpha(float[].class, true, null),
 9146             hidden_size(Integer.class, true, null),
 9147             activation_beta(float[].class, true, null),
 9148             activations(String[].class, true, null),
 9149             linear_before_reset(Integer.class, true, 0),
 9150             clip(Float.class, true, null),
 9151             direction(String.class, true, "forward"),
 9152             ;
 9153 
 9154                 final Class<?> t;
 9155                 final boolean optional;
 9156                 final Object defaultValue;
 9157 
 9158                 Attribute(Class<?> type, boolean optional, Object defaultValue) {
 9159                     this.t = type;
 9160                     this.optional = optional;
 9161                     this.defaultValue = defaultValue;
 9162                     assert optional || defaultValue == null;
 9163                 }
 9164 
 9165                 public Class<?> type() {
 9166                     return t;
 9167                 }
 9168 
 9169                 public boolean isOptional() {
 9170                     return optional;
 9171                 }
 9172 
 9173                 public Object defaultValue() {
 9174                     return defaultValue;
 9175                 }
 9176         }
 9177 
 9178         public enum TypeConstraint implements OnnxTypeConstraint {
 9179             T(new OnnxType.TypeVariable("T", List.of(OnnxType.tensor(OnnxType.bfloat16()), OnnxType.tensor(OnnxType.float16()), OnnxType.tensor(OnnxType.float32()), OnnxType.tensor(OnnxType.float64())))),
 9180             T1(new OnnxType.TypeVariable("T1", List.of(OnnxType.tensor(OnnxType.int32())))),
 9181             ;
 9182 
 9183             final OnnxType.TypeVariable typeVariable;
 9184 
 9185             TypeConstraint(OnnxType.TypeVariable typeVariable) {
 9186                 assert typeVariable.name().equals(name());
 9187                 this.typeVariable = typeVariable;
 9188             }
 9189 
 9190             @Override
 9191             public OnnxType.TypeVariable typeVariable() {
 9192                 return typeVariable;
 9193             }
 9194         }
 9195 
 9196         public enum InputParameter implements OnnxParameter {
 9197             X(TypeConstraint.T.typeVariable(), Quantifier.REQUIRED),
 9198             W(TypeConstraint.T.typeVariable(), Quantifier.REQUIRED),
 9199             R(TypeConstraint.T.typeVariable(), Quantifier.REQUIRED),
 9200             B(TypeConstraint.T.typeVariable(), Quantifier.OPTIONAL),
 9201             sequence_lens(TypeConstraint.T1.typeVariable(), Quantifier.OPTIONAL),
 9202             initial_h(TypeConstraint.T.typeVariable(), Quantifier.OPTIONAL),
 9203             ;
 9204 
 9205             final OnnxType type;
 9206             final Quantifier quantifier;
 9207 
 9208             InputParameter(OnnxType type, Quantifier quantifier) {
 9209                 this.type = type;
 9210                 this.quantifier = quantifier;
 9211             }
 9212 
 9213             @Override
 9214             public OnnxType type() {
 9215                 return type;
 9216             }
 9217 
 9218             @Override
 9219             public Quantifier quantifier() {
 9220                 return quantifier;
 9221             }
 9222         }
 9223 
 9224         public enum OutputParameter implements OnnxParameter {
 9225             Y(TypeConstraint.T.typeVariable(), Quantifier.OPTIONAL),
 9226             Y_h(TypeConstraint.T.typeVariable(), Quantifier.OPTIONAL),
 9227             ;
 9228 
 9229             final OnnxType type;
 9230             final Quantifier quantifier;
 9231 
 9232             OutputParameter(OnnxType type, Quantifier quantifier) {
 9233                 this.type = type;
 9234                 this.quantifier = quantifier;
 9235             }
 9236 
 9237             @Override
 9238             public OnnxType type() {
 9239                 return type;
 9240             }
 9241 
 9242             @Override
 9243             public Quantifier quantifier() {
 9244                 return quantifier;
 9245             }
 9246         }
 9247 
 9248         public static final OnnxSchema SCHEMA = new OnnxSchemaRecord(
 9249                 NAME,
 9250                 List.of(Attribute.values()),
 9251                 List.of(TypeConstraint.values()),
 9252                 List.of(InputParameter.values()),
 9253                 List.of(OutputParameter.values())
 9254         );
 9255 
 9256         public GRU(ExternalizedOp def) {
 9257             super(SCHEMA, def);
 9258         }
 9259 
 9260         GRU(GRU that, CopyContext cc) {
 9261             super(that, cc);
 9262         }
 9263 
 9264         @Override
 9265         public GRU transform(CopyContext cc, OpTransformer ot) {
 9266             return new GRU(this, cc);
 9267         }
 9268 
 9269         GRU(TypeElement resultType, Set<OutputParameter> optionalOutputs, Value X, Value W, Value R, java.util.Optional<Value> B, java.util.Optional<Value> sequence_lens, java.util.Optional<Value> initial_h, java.util.Optional<Integer> layout, java.util.Optional<float[]> activation_alpha, java.util.Optional<Integer> hidden_size, java.util.Optional<float[]> activation_beta, java.util.Optional<String[]> activations, java.util.Optional<Integer> linear_before_reset, java.util.Optional<Float> clip, java.util.Optional<String> direction) {
 9270             super(SCHEMA, resultType, optionalOutputs, List.of(X, W, R, B, sequence_lens, initial_h), List.of(layout, activation_alpha, hidden_size, activation_beta, activations, linear_before_reset, clip, direction));
 9271         }
 9272 
 9273         @Override
 9274         public SequencedSet<OnnxParameter> onnxOutputs() {
 9275             return onnxOutputs(SCHEMA);
 9276         }
 9277 
 9278         @Override
 9279         public SequencedMap<OnnxParameter, Object> onnxInputs() {
 9280             return onnxInputs(SCHEMA, List.of(X(), W(), R(), B(), sequence_lens(), initial_h()));
 9281         }
 9282 
 9283         public Value X() {
 9284             return operands().get(0);
 9285         }
 9286 
 9287         public Value W() {
 9288             return operands().get(1);
 9289         }
 9290 
 9291         public Value R() {
 9292             return operands().get(2);
 9293         }
 9294 
 9295         public java.util.Optional<Value> B() {
 9296             int i = optionalInputArguments.indexOf(InputParameter.B);
 9297             return i != -1 ? java.util.Optional.of(operands().get(3 + i)) : java.util.Optional.empty();
 9298         }
 9299 
 9300         public java.util.Optional<Value> sequence_lens() {
 9301             int i = optionalInputArguments.indexOf(InputParameter.sequence_lens);
 9302             return i != -1 ? java.util.Optional.of(operands().get(3 + i)) : java.util.Optional.empty();
 9303         }
 9304 
 9305         public java.util.Optional<Value> initial_h() {
 9306             int i = optionalInputArguments.indexOf(InputParameter.initial_h);
 9307             return i != -1 ? java.util.Optional.of(operands().get(3 + i)) : java.util.Optional.empty();
 9308         }
 9309 
 9310         public java.util.Optional<Integer> layout() {
 9311             Integer layout = Attribute.layout.access(Integer.class, onnxAttributes);
 9312             return java.util.Optional.ofNullable(layout);
 9313         }
 9314 
 9315         public java.util.Optional<float[]> activation_alpha() {
 9316             float[] activation_alpha = Attribute.activation_alpha.access(float[].class, onnxAttributes);
 9317             return java.util.Optional.ofNullable(activation_alpha).map(float[]::clone);
 9318         }
 9319 
 9320         public java.util.Optional<Integer> hidden_size() {
 9321             Integer hidden_size = Attribute.hidden_size.access(Integer.class, onnxAttributes);
 9322             return java.util.Optional.ofNullable(hidden_size);
 9323         }
 9324 
 9325         public java.util.Optional<float[]> activation_beta() {
 9326             float[] activation_beta = Attribute.activation_beta.access(float[].class, onnxAttributes);
 9327             return java.util.Optional.ofNullable(activation_beta).map(float[]::clone);
 9328         }
 9329 
 9330         public java.util.Optional<String[]> activations() {
 9331             String[] activations = Attribute.activations.access(String[].class, onnxAttributes);
 9332             return java.util.Optional.ofNullable(activations).map(String[]::clone);
 9333         }
 9334 
 9335         public java.util.Optional<Integer> linear_before_reset() {
 9336             Integer linear_before_reset = Attribute.linear_before_reset.access(Integer.class, onnxAttributes);
 9337             return java.util.Optional.ofNullable(linear_before_reset);
 9338         }
 9339 
 9340         public java.util.Optional<Float> clip() {
 9341             Float clip = Attribute.clip.access(Float.class, onnxAttributes);
 9342             return java.util.Optional.ofNullable(clip);
 9343         }
 9344 
 9345         public java.util.Optional<String> direction() {
 9346             String direction = Attribute.direction.access(String.class, onnxAttributes);
 9347             return java.util.Optional.ofNullable(direction);
 9348         }
 9349 
 9350     }
 9351 
 9352     public static GRU GRU(TypeElement resultType, Set<GRU.OutputParameter> optionalOutputs, Value X, Value W, Value R, java.util.Optional<Value> B, java.util.Optional<Value> sequence_lens, java.util.Optional<Value> initial_h, java.util.Optional<Integer> layout, java.util.Optional<float[]> activation_alpha, java.util.Optional<Integer> hidden_size, java.util.Optional<float[]> activation_beta, java.util.Optional<String[]> activations, java.util.Optional<Integer> linear_before_reset, java.util.Optional<Float> clip, java.util.Optional<String> direction) {
 9353         return new GRU(resultType, optionalOutputs, X, W, R, B, sequence_lens, initial_h, layout, activation_alpha, hidden_size, activation_beta, activations, linear_before_reset, clip, direction);
 9354     }
 9355 
 9356     @OpFactory.OpDeclaration(Gather.NAME)
 9357     public static final class Gather extends OnnxOp {
 9358         public static final String NAME = "Gather";
 9359 
 9360         public enum Attribute implements OnnxAttribute {
 9361             axis(Integer.class, true, 0),
 9362             ;
 9363 
 9364                 final Class<?> t;
 9365                 final boolean optional;
 9366                 final Object defaultValue;
 9367 
 9368                 Attribute(Class<?> type, boolean optional, Object defaultValue) {
 9369                     this.t = type;
 9370                     this.optional = optional;
 9371                     this.defaultValue = defaultValue;
 9372                     assert optional || defaultValue == null;
 9373                 }
 9374 
 9375                 public Class<?> type() {
 9376                     return t;
 9377                 }
 9378 
 9379                 public boolean isOptional() {
 9380                     return optional;
 9381                 }
 9382 
 9383                 public Object defaultValue() {
 9384                     return defaultValue;
 9385                 }
 9386         }
 9387 
 9388         public enum TypeConstraint implements OnnxTypeConstraint {
 9389             T(new OnnxType.TypeVariable("T", List.of(OnnxType.tensor(OnnxType.uint8()), OnnxType.tensor(OnnxType.uint16()), OnnxType.tensor(OnnxType.uint32()), OnnxType.tensor(OnnxType.uint64()), OnnxType.tensor(OnnxType.int8()), OnnxType.tensor(OnnxType.int16()), OnnxType.tensor(OnnxType.int32()), OnnxType.tensor(OnnxType.int64()), OnnxType.tensor(OnnxType.bfloat16()), OnnxType.tensor(OnnxType.float16()), OnnxType.tensor(OnnxType.float32()), OnnxType.tensor(OnnxType.float64()), OnnxType.tensor(OnnxType.string()), OnnxType.tensor(OnnxType.bool()), OnnxType.tensor(OnnxType.complex64()), OnnxType.tensor(OnnxType.complex128())))),
 9390             Tind(new OnnxType.TypeVariable("Tind", List.of(OnnxType.tensor(OnnxType.int32()), OnnxType.tensor(OnnxType.int64())))),
 9391             ;
 9392 
 9393             final OnnxType.TypeVariable typeVariable;
 9394 
 9395             TypeConstraint(OnnxType.TypeVariable typeVariable) {
 9396                 assert typeVariable.name().equals(name());
 9397                 this.typeVariable = typeVariable;
 9398             }
 9399 
 9400             @Override
 9401             public OnnxType.TypeVariable typeVariable() {
 9402                 return typeVariable;
 9403             }
 9404         }
 9405 
 9406         public enum InputParameter implements OnnxParameter {
 9407             data(TypeConstraint.T.typeVariable(), Quantifier.REQUIRED),
 9408             indices(TypeConstraint.Tind.typeVariable(), Quantifier.REQUIRED),
 9409             ;
 9410 
 9411             final OnnxType type;
 9412             final Quantifier quantifier;
 9413 
 9414             InputParameter(OnnxType type, Quantifier quantifier) {
 9415                 this.type = type;
 9416                 this.quantifier = quantifier;
 9417             }
 9418 
 9419             @Override
 9420             public OnnxType type() {
 9421                 return type;
 9422             }
 9423 
 9424             @Override
 9425             public Quantifier quantifier() {
 9426                 return quantifier;
 9427             }
 9428         }
 9429 
 9430         public enum OutputParameter implements OnnxParameter {
 9431             output(TypeConstraint.T.typeVariable(), Quantifier.REQUIRED),
 9432             ;
 9433 
 9434             final OnnxType type;
 9435             final Quantifier quantifier;
 9436 
 9437             OutputParameter(OnnxType type, Quantifier quantifier) {
 9438                 this.type = type;
 9439                 this.quantifier = quantifier;
 9440             }
 9441 
 9442             @Override
 9443             public OnnxType type() {
 9444                 return type;
 9445             }
 9446 
 9447             @Override
 9448             public Quantifier quantifier() {
 9449                 return quantifier;
 9450             }
 9451         }
 9452 
 9453         public static final OnnxSchema SCHEMA = new OnnxSchemaRecord(
 9454                 NAME,
 9455                 List.of(Attribute.values()),
 9456                 List.of(TypeConstraint.values()),
 9457                 List.of(InputParameter.values()),
 9458                 List.of(OutputParameter.values())
 9459         );
 9460 
 9461         public Gather(ExternalizedOp def) {
 9462             super(SCHEMA, def);
 9463         }
 9464 
 9465         Gather(Gather that, CopyContext cc) {
 9466             super(that, cc);
 9467         }
 9468 
 9469         @Override
 9470         public Gather transform(CopyContext cc, OpTransformer ot) {
 9471             return new Gather(this, cc);
 9472         }
 9473 
 9474         Gather(TypeElement resultType, Value data, Value indices, java.util.Optional<Integer> axis) {
 9475             super(SCHEMA, resultType, Set.of(), List.of(data, indices), List.of(axis));
 9476         }
 9477 
 9478         @Override
 9479         public SequencedSet<OnnxParameter> onnxOutputs() {
 9480             return onnxOutputs(SCHEMA);
 9481         }
 9482 
 9483         @Override
 9484         public SequencedMap<OnnxParameter, Object> onnxInputs() {
 9485             return onnxInputs(SCHEMA, List.of(data(), indices()));
 9486         }
 9487 
 9488         public Value data() {
 9489             return operands().get(0);
 9490         }
 9491 
 9492         public Value indices() {
 9493             return operands().get(1);
 9494         }
 9495 
 9496         public java.util.Optional<Integer> axis() {
 9497             Integer axis = Attribute.axis.access(Integer.class, onnxAttributes);
 9498             return java.util.Optional.ofNullable(axis);
 9499         }
 9500 
 9501     }
 9502 
 9503     public static Gather Gather(TypeElement resultType, Value data, Value indices, java.util.Optional<Integer> axis) {
 9504         return new Gather(resultType, data, indices, axis);
 9505     }
 9506 
 9507     @OpFactory.OpDeclaration(GatherElements.NAME)
 9508     public static final class GatherElements extends OnnxOp {
 9509         public static final String NAME = "GatherElements";
 9510 
 9511         public enum Attribute implements OnnxAttribute {
 9512             axis(Integer.class, true, 0),
 9513             ;
 9514 
 9515                 final Class<?> t;
 9516                 final boolean optional;
 9517                 final Object defaultValue;
 9518 
 9519                 Attribute(Class<?> type, boolean optional, Object defaultValue) {
 9520                     this.t = type;
 9521                     this.optional = optional;
 9522                     this.defaultValue = defaultValue;
 9523                     assert optional || defaultValue == null;
 9524                 }
 9525 
 9526                 public Class<?> type() {
 9527                     return t;
 9528                 }
 9529 
 9530                 public boolean isOptional() {
 9531                     return optional;
 9532                 }
 9533 
 9534                 public Object defaultValue() {
 9535                     return defaultValue;
 9536                 }
 9537         }
 9538 
 9539         public enum TypeConstraint implements OnnxTypeConstraint {
 9540             T(new OnnxType.TypeVariable("T", List.of(OnnxType.tensor(OnnxType.uint8()), OnnxType.tensor(OnnxType.uint16()), OnnxType.tensor(OnnxType.uint32()), OnnxType.tensor(OnnxType.uint64()), OnnxType.tensor(OnnxType.int8()), OnnxType.tensor(OnnxType.int16()), OnnxType.tensor(OnnxType.int32()), OnnxType.tensor(OnnxType.int64()), OnnxType.tensor(OnnxType.bfloat16()), OnnxType.tensor(OnnxType.float16()), OnnxType.tensor(OnnxType.float32()), OnnxType.tensor(OnnxType.float64()), OnnxType.tensor(OnnxType.string()), OnnxType.tensor(OnnxType.bool()), OnnxType.tensor(OnnxType.complex64()), OnnxType.tensor(OnnxType.complex128())))),
 9541             Tind(new OnnxType.TypeVariable("Tind", List.of(OnnxType.tensor(OnnxType.int32()), OnnxType.tensor(OnnxType.int64())))),
 9542             ;
 9543 
 9544             final OnnxType.TypeVariable typeVariable;
 9545 
 9546             TypeConstraint(OnnxType.TypeVariable typeVariable) {
 9547                 assert typeVariable.name().equals(name());
 9548                 this.typeVariable = typeVariable;
 9549             }
 9550 
 9551             @Override
 9552             public OnnxType.TypeVariable typeVariable() {
 9553                 return typeVariable;
 9554             }
 9555         }
 9556 
 9557         public enum InputParameter implements OnnxParameter {
 9558             data(TypeConstraint.T.typeVariable(), Quantifier.REQUIRED),
 9559             indices(TypeConstraint.Tind.typeVariable(), Quantifier.REQUIRED),
 9560             ;
 9561 
 9562             final OnnxType type;
 9563             final Quantifier quantifier;
 9564 
 9565             InputParameter(OnnxType type, Quantifier quantifier) {
 9566                 this.type = type;
 9567                 this.quantifier = quantifier;
 9568             }
 9569 
 9570             @Override
 9571             public OnnxType type() {
 9572                 return type;
 9573             }
 9574 
 9575             @Override
 9576             public Quantifier quantifier() {
 9577                 return quantifier;
 9578             }
 9579         }
 9580 
 9581         public enum OutputParameter implements OnnxParameter {
 9582             output(TypeConstraint.T.typeVariable(), Quantifier.REQUIRED),
 9583             ;
 9584 
 9585             final OnnxType type;
 9586             final Quantifier quantifier;
 9587 
 9588             OutputParameter(OnnxType type, Quantifier quantifier) {
 9589                 this.type = type;
 9590                 this.quantifier = quantifier;
 9591             }
 9592 
 9593             @Override
 9594             public OnnxType type() {
 9595                 return type;
 9596             }
 9597 
 9598             @Override
 9599             public Quantifier quantifier() {
 9600                 return quantifier;
 9601             }
 9602         }
 9603 
 9604         public static final OnnxSchema SCHEMA = new OnnxSchemaRecord(
 9605                 NAME,
 9606                 List.of(Attribute.values()),
 9607                 List.of(TypeConstraint.values()),
 9608                 List.of(InputParameter.values()),
 9609                 List.of(OutputParameter.values())
 9610         );
 9611 
 9612         public GatherElements(ExternalizedOp def) {
 9613             super(SCHEMA, def);
 9614         }
 9615 
 9616         GatherElements(GatherElements that, CopyContext cc) {
 9617             super(that, cc);
 9618         }
 9619 
 9620         @Override
 9621         public GatherElements transform(CopyContext cc, OpTransformer ot) {
 9622             return new GatherElements(this, cc);
 9623         }
 9624 
 9625         GatherElements(TypeElement resultType, Value data, Value indices, java.util.Optional<Integer> axis) {
 9626             super(SCHEMA, resultType, Set.of(), List.of(data, indices), List.of(axis));
 9627         }
 9628 
 9629         @Override
 9630         public SequencedSet<OnnxParameter> onnxOutputs() {
 9631             return onnxOutputs(SCHEMA);
 9632         }
 9633 
 9634         @Override
 9635         public SequencedMap<OnnxParameter, Object> onnxInputs() {
 9636             return onnxInputs(SCHEMA, List.of(data(), indices()));
 9637         }
 9638 
 9639         public Value data() {
 9640             return operands().get(0);
 9641         }
 9642 
 9643         public Value indices() {
 9644             return operands().get(1);
 9645         }
 9646 
 9647         public java.util.Optional<Integer> axis() {
 9648             Integer axis = Attribute.axis.access(Integer.class, onnxAttributes);
 9649             return java.util.Optional.ofNullable(axis);
 9650         }
 9651 
 9652     }
 9653 
 9654     public static GatherElements GatherElements(TypeElement resultType, Value data, Value indices, java.util.Optional<Integer> axis) {
 9655         return new GatherElements(resultType, data, indices, axis);
 9656     }
 9657 
 9658     @OpFactory.OpDeclaration(GatherND.NAME)
 9659     public static final class GatherND extends OnnxOp {
 9660         public static final String NAME = "GatherND";
 9661 
 9662         public enum Attribute implements OnnxAttribute {
 9663             batch_dims(Integer.class, true, 0),
 9664             ;
 9665 
 9666                 final Class<?> t;
 9667                 final boolean optional;
 9668                 final Object defaultValue;
 9669 
 9670                 Attribute(Class<?> type, boolean optional, Object defaultValue) {
 9671                     this.t = type;
 9672                     this.optional = optional;
 9673                     this.defaultValue = defaultValue;
 9674                     assert optional || defaultValue == null;
 9675                 }
 9676 
 9677                 public Class<?> type() {
 9678                     return t;
 9679                 }
 9680 
 9681                 public boolean isOptional() {
 9682                     return optional;
 9683                 }
 9684 
 9685                 public Object defaultValue() {
 9686                     return defaultValue;
 9687                 }
 9688         }
 9689 
 9690         public enum TypeConstraint implements OnnxTypeConstraint {
 9691             T(new OnnxType.TypeVariable("T", List.of(OnnxType.tensor(OnnxType.uint8()), OnnxType.tensor(OnnxType.uint16()), OnnxType.tensor(OnnxType.uint32()), OnnxType.tensor(OnnxType.uint64()), OnnxType.tensor(OnnxType.int8()), OnnxType.tensor(OnnxType.int16()), OnnxType.tensor(OnnxType.int32()), OnnxType.tensor(OnnxType.int64()), OnnxType.tensor(OnnxType.bfloat16()), OnnxType.tensor(OnnxType.float16()), OnnxType.tensor(OnnxType.float32()), OnnxType.tensor(OnnxType.float64()), OnnxType.tensor(OnnxType.string()), OnnxType.tensor(OnnxType.bool()), OnnxType.tensor(OnnxType.complex64()), OnnxType.tensor(OnnxType.complex128())))),
 9692             ;
 9693 
 9694             final OnnxType.TypeVariable typeVariable;
 9695 
 9696             TypeConstraint(OnnxType.TypeVariable typeVariable) {
 9697                 assert typeVariable.name().equals(name());
 9698                 this.typeVariable = typeVariable;
 9699             }
 9700 
 9701             @Override
 9702             public OnnxType.TypeVariable typeVariable() {
 9703                 return typeVariable;
 9704             }
 9705         }
 9706 
 9707         public enum InputParameter implements OnnxParameter {
 9708             data(TypeConstraint.T.typeVariable(), Quantifier.REQUIRED),
 9709             indices(OnnxType.tensor(OnnxType.int64()), Quantifier.REQUIRED),
 9710             ;
 9711 
 9712             final OnnxType type;
 9713             final Quantifier quantifier;
 9714 
 9715             InputParameter(OnnxType type, Quantifier quantifier) {
 9716                 this.type = type;
 9717                 this.quantifier = quantifier;
 9718             }
 9719 
 9720             @Override
 9721             public OnnxType type() {
 9722                 return type;
 9723             }
 9724 
 9725             @Override
 9726             public Quantifier quantifier() {
 9727                 return quantifier;
 9728             }
 9729         }
 9730 
 9731         public enum OutputParameter implements OnnxParameter {
 9732             output(TypeConstraint.T.typeVariable(), Quantifier.REQUIRED),
 9733             ;
 9734 
 9735             final OnnxType type;
 9736             final Quantifier quantifier;
 9737 
 9738             OutputParameter(OnnxType type, Quantifier quantifier) {
 9739                 this.type = type;
 9740                 this.quantifier = quantifier;
 9741             }
 9742 
 9743             @Override
 9744             public OnnxType type() {
 9745                 return type;
 9746             }
 9747 
 9748             @Override
 9749             public Quantifier quantifier() {
 9750                 return quantifier;
 9751             }
 9752         }
 9753 
 9754         public static final OnnxSchema SCHEMA = new OnnxSchemaRecord(
 9755                 NAME,
 9756                 List.of(Attribute.values()),
 9757                 List.of(TypeConstraint.values()),
 9758                 List.of(InputParameter.values()),
 9759                 List.of(OutputParameter.values())
 9760         );
 9761 
 9762         public GatherND(ExternalizedOp def) {
 9763             super(SCHEMA, def);
 9764         }
 9765 
 9766         GatherND(GatherND that, CopyContext cc) {
 9767             super(that, cc);
 9768         }
 9769 
 9770         @Override
 9771         public GatherND transform(CopyContext cc, OpTransformer ot) {
 9772             return new GatherND(this, cc);
 9773         }
 9774 
 9775         GatherND(TypeElement resultType, Value data, Value indices, java.util.Optional<Integer> batch_dims) {
 9776             super(SCHEMA, resultType, Set.of(), List.of(data, indices), List.of(batch_dims));
 9777         }
 9778 
 9779         @Override
 9780         public SequencedSet<OnnxParameter> onnxOutputs() {
 9781             return onnxOutputs(SCHEMA);
 9782         }
 9783 
 9784         @Override
 9785         public SequencedMap<OnnxParameter, Object> onnxInputs() {
 9786             return onnxInputs(SCHEMA, List.of(data(), indices()));
 9787         }
 9788 
 9789         public Value data() {
 9790             return operands().get(0);
 9791         }
 9792 
 9793         public Value indices() {
 9794             return operands().get(1);
 9795         }
 9796 
 9797         public java.util.Optional<Integer> batch_dims() {
 9798             Integer batch_dims = Attribute.batch_dims.access(Integer.class, onnxAttributes);
 9799             return java.util.Optional.ofNullable(batch_dims);
 9800         }
 9801 
 9802     }
 9803 
 9804     public static GatherND GatherND(TypeElement resultType, Value data, Value indices, java.util.Optional<Integer> batch_dims) {
 9805         return new GatherND(resultType, data, indices, batch_dims);
 9806     }
 9807 
 9808     @OpFactory.OpDeclaration(Gelu.NAME)
 9809     public static final class Gelu extends OnnxOp {
 9810         public static final String NAME = "Gelu";
 9811 
 9812         public enum Attribute implements OnnxAttribute {
 9813             approximate(String.class, true, "none"),
 9814             ;
 9815 
 9816                 final Class<?> t;
 9817                 final boolean optional;
 9818                 final Object defaultValue;
 9819 
 9820                 Attribute(Class<?> type, boolean optional, Object defaultValue) {
 9821                     this.t = type;
 9822                     this.optional = optional;
 9823                     this.defaultValue = defaultValue;
 9824                     assert optional || defaultValue == null;
 9825                 }
 9826 
 9827                 public Class<?> type() {
 9828                     return t;
 9829                 }
 9830 
 9831                 public boolean isOptional() {
 9832                     return optional;
 9833                 }
 9834 
 9835                 public Object defaultValue() {
 9836                     return defaultValue;
 9837                 }
 9838         }
 9839 
 9840         public enum TypeConstraint implements OnnxTypeConstraint {
 9841             T(new OnnxType.TypeVariable("T", List.of(OnnxType.tensor(OnnxType.float16()), OnnxType.tensor(OnnxType.float32()), OnnxType.tensor(OnnxType.float64()), OnnxType.tensor(OnnxType.bfloat16())))),
 9842             ;
 9843 
 9844             final OnnxType.TypeVariable typeVariable;
 9845 
 9846             TypeConstraint(OnnxType.TypeVariable typeVariable) {
 9847                 assert typeVariable.name().equals(name());
 9848                 this.typeVariable = typeVariable;
 9849             }
 9850 
 9851             @Override
 9852             public OnnxType.TypeVariable typeVariable() {
 9853                 return typeVariable;
 9854             }
 9855         }
 9856 
 9857         public enum InputParameter implements OnnxParameter {
 9858             X(TypeConstraint.T.typeVariable(), Quantifier.REQUIRED),
 9859             ;
 9860 
 9861             final OnnxType type;
 9862             final Quantifier quantifier;
 9863 
 9864             InputParameter(OnnxType type, Quantifier quantifier) {
 9865                 this.type = type;
 9866                 this.quantifier = quantifier;
 9867             }
 9868 
 9869             @Override
 9870             public OnnxType type() {
 9871                 return type;
 9872             }
 9873 
 9874             @Override
 9875             public Quantifier quantifier() {
 9876                 return quantifier;
 9877             }
 9878         }
 9879 
 9880         public enum OutputParameter implements OnnxParameter {
 9881             Y(TypeConstraint.T.typeVariable(), Quantifier.REQUIRED),
 9882             ;
 9883 
 9884             final OnnxType type;
 9885             final Quantifier quantifier;
 9886 
 9887             OutputParameter(OnnxType type, Quantifier quantifier) {
 9888                 this.type = type;
 9889                 this.quantifier = quantifier;
 9890             }
 9891 
 9892             @Override
 9893             public OnnxType type() {
 9894                 return type;
 9895             }
 9896 
 9897             @Override
 9898             public Quantifier quantifier() {
 9899                 return quantifier;
 9900             }
 9901         }
 9902 
 9903         public static final OnnxSchema SCHEMA = new OnnxSchemaRecord(
 9904                 NAME,
 9905                 List.of(Attribute.values()),
 9906                 List.of(TypeConstraint.values()),
 9907                 List.of(InputParameter.values()),
 9908                 List.of(OutputParameter.values())
 9909         );
 9910 
 9911         public Gelu(ExternalizedOp def) {
 9912             super(SCHEMA, def);
 9913         }
 9914 
 9915         Gelu(Gelu that, CopyContext cc) {
 9916             super(that, cc);
 9917         }
 9918 
 9919         @Override
 9920         public Gelu transform(CopyContext cc, OpTransformer ot) {
 9921             return new Gelu(this, cc);
 9922         }
 9923 
 9924         Gelu(TypeElement resultType, Value X, java.util.Optional<String> approximate) {
 9925             super(SCHEMA, resultType, Set.of(), List.of(X), List.of(approximate));
 9926         }
 9927 
 9928         @Override
 9929         public SequencedSet<OnnxParameter> onnxOutputs() {
 9930             return onnxOutputs(SCHEMA);
 9931         }
 9932 
 9933         @Override
 9934         public SequencedMap<OnnxParameter, Object> onnxInputs() {
 9935             return onnxInputs(SCHEMA, List.of(X()));
 9936         }
 9937 
 9938         public Value X() {
 9939             return operands().get(0);
 9940         }
 9941 
 9942         public java.util.Optional<String> approximate() {
 9943             String approximate = Attribute.approximate.access(String.class, onnxAttributes);
 9944             return java.util.Optional.ofNullable(approximate);
 9945         }
 9946 
 9947     }
 9948 
 9949     public static Gelu Gelu(TypeElement resultType, Value X, java.util.Optional<String> approximate) {
 9950         return new Gelu(resultType, X, approximate);
 9951     }
 9952 
 9953     @OpFactory.OpDeclaration(Gemm.NAME)
 9954     public static final class Gemm extends OnnxOp {
 9955         public static final String NAME = "Gemm";
 9956 
 9957         public enum Attribute implements OnnxAttribute {
 9958             alpha(Float.class, true, 1.0f),
 9959             transB(Integer.class, true, 0),
 9960             beta(Float.class, true, 1.0f),
 9961             transA(Integer.class, true, 0),
 9962             ;
 9963 
 9964                 final Class<?> t;
 9965                 final boolean optional;
 9966                 final Object defaultValue;
 9967 
 9968                 Attribute(Class<?> type, boolean optional, Object defaultValue) {
 9969                     this.t = type;
 9970                     this.optional = optional;
 9971                     this.defaultValue = defaultValue;
 9972                     assert optional || defaultValue == null;
 9973                 }
 9974 
 9975                 public Class<?> type() {
 9976                     return t;
 9977                 }
 9978 
 9979                 public boolean isOptional() {
 9980                     return optional;
 9981                 }
 9982 
 9983                 public Object defaultValue() {
 9984                     return defaultValue;
 9985                 }
 9986         }
 9987 
 9988         public enum TypeConstraint implements OnnxTypeConstraint {
 9989             T(new OnnxType.TypeVariable("T", List.of(OnnxType.tensor(OnnxType.float16()), OnnxType.tensor(OnnxType.float32()), OnnxType.tensor(OnnxType.float64()), OnnxType.tensor(OnnxType.uint32()), OnnxType.tensor(OnnxType.uint64()), OnnxType.tensor(OnnxType.int32()), OnnxType.tensor(OnnxType.int64()), OnnxType.tensor(OnnxType.bfloat16())))),
 9990             ;
 9991 
 9992             final OnnxType.TypeVariable typeVariable;
 9993 
 9994             TypeConstraint(OnnxType.TypeVariable typeVariable) {
 9995                 assert typeVariable.name().equals(name());
 9996                 this.typeVariable = typeVariable;
 9997             }
 9998 
 9999             @Override
10000             public OnnxType.TypeVariable typeVariable() {
10001                 return typeVariable;
10002             }
10003         }
10004 
10005         public enum InputParameter implements OnnxParameter {
10006             A(TypeConstraint.T.typeVariable(), Quantifier.REQUIRED),
10007             B(TypeConstraint.T.typeVariable(), Quantifier.REQUIRED),
10008             C(TypeConstraint.T.typeVariable(), Quantifier.OPTIONAL),
10009             ;
10010 
10011             final OnnxType type;
10012             final Quantifier quantifier;
10013 
10014             InputParameter(OnnxType type, Quantifier quantifier) {
10015                 this.type = type;
10016                 this.quantifier = quantifier;
10017             }
10018 
10019             @Override
10020             public OnnxType type() {
10021                 return type;
10022             }
10023 
10024             @Override
10025             public Quantifier quantifier() {
10026                 return quantifier;
10027             }
10028         }
10029 
10030         public enum OutputParameter implements OnnxParameter {
10031             Y(TypeConstraint.T.typeVariable(), Quantifier.REQUIRED),
10032             ;
10033 
10034             final OnnxType type;
10035             final Quantifier quantifier;
10036 
10037             OutputParameter(OnnxType type, Quantifier quantifier) {
10038                 this.type = type;
10039                 this.quantifier = quantifier;
10040             }
10041 
10042             @Override
10043             public OnnxType type() {
10044                 return type;
10045             }
10046 
10047             @Override
10048             public Quantifier quantifier() {
10049                 return quantifier;
10050             }
10051         }
10052 
10053         public static final OnnxSchema SCHEMA = new OnnxSchemaRecord(
10054                 NAME,
10055                 List.of(Attribute.values()),
10056                 List.of(TypeConstraint.values()),
10057                 List.of(InputParameter.values()),
10058                 List.of(OutputParameter.values())
10059         );
10060 
10061         public Gemm(ExternalizedOp def) {
10062             super(SCHEMA, def);
10063         }
10064 
10065         Gemm(Gemm that, CopyContext cc) {
10066             super(that, cc);
10067         }
10068 
10069         @Override
10070         public Gemm transform(CopyContext cc, OpTransformer ot) {
10071             return new Gemm(this, cc);
10072         }
10073 
10074         Gemm(TypeElement resultType, Value A, Value B, java.util.Optional<Value> C, java.util.Optional<Float> alpha, java.util.Optional<Integer> transB, java.util.Optional<Float> beta, java.util.Optional<Integer> transA) {
10075             super(SCHEMA, resultType, Set.of(), List.of(A, B, C), List.of(alpha, transB, beta, transA));
10076         }
10077 
10078         @Override
10079         public SequencedSet<OnnxParameter> onnxOutputs() {
10080             return onnxOutputs(SCHEMA);
10081         }
10082 
10083         @Override
10084         public SequencedMap<OnnxParameter, Object> onnxInputs() {
10085             return onnxInputs(SCHEMA, List.of(A(), B(), C()));
10086         }
10087 
10088         public Value A() {
10089             return operands().get(0);
10090         }
10091 
10092         public Value B() {
10093             return operands().get(1);
10094         }
10095 
10096         public java.util.Optional<Value> C() {
10097             int i = optionalInputArguments.indexOf(InputParameter.C);
10098             return i != -1 ? java.util.Optional.of(operands().get(2 + i)) : java.util.Optional.empty();
10099         }
10100 
10101         public java.util.Optional<Float> alpha() {
10102             Float alpha = Attribute.alpha.access(Float.class, onnxAttributes);
10103             return java.util.Optional.ofNullable(alpha);
10104         }
10105 
10106         public java.util.Optional<Integer> transB() {
10107             Integer transB = Attribute.transB.access(Integer.class, onnxAttributes);
10108             return java.util.Optional.ofNullable(transB);
10109         }
10110 
10111         public java.util.Optional<Float> beta() {
10112             Float beta = Attribute.beta.access(Float.class, onnxAttributes);
10113             return java.util.Optional.ofNullable(beta);
10114         }
10115 
10116         public java.util.Optional<Integer> transA() {
10117             Integer transA = Attribute.transA.access(Integer.class, onnxAttributes);
10118             return java.util.Optional.ofNullable(transA);
10119         }
10120 
10121     }
10122 
10123     public static Gemm Gemm(TypeElement resultType, Value A, Value B, java.util.Optional<Value> C, java.util.Optional<Float> alpha, java.util.Optional<Integer> transB, java.util.Optional<Float> beta, java.util.Optional<Integer> transA) {
10124         return new Gemm(resultType, A, B, C, alpha, transB, beta, transA);
10125     }
10126 
10127     @OpFactory.OpDeclaration(GlobalAveragePool.NAME)
10128     public static final class GlobalAveragePool extends OnnxOp {
10129         public static final String NAME = "GlobalAveragePool";
10130 
10131         public enum Attribute implements OnnxAttribute.None { }
10132 
10133         public enum TypeConstraint implements OnnxTypeConstraint {
10134             T(new OnnxType.TypeVariable("T", List.of(OnnxType.tensor(OnnxType.bfloat16()), OnnxType.tensor(OnnxType.float16()), OnnxType.tensor(OnnxType.float32()), OnnxType.tensor(OnnxType.float64())))),
10135             ;
10136 
10137             final OnnxType.TypeVariable typeVariable;
10138 
10139             TypeConstraint(OnnxType.TypeVariable typeVariable) {
10140                 assert typeVariable.name().equals(name());
10141                 this.typeVariable = typeVariable;
10142             }
10143 
10144             @Override
10145             public OnnxType.TypeVariable typeVariable() {
10146                 return typeVariable;
10147             }
10148         }
10149 
10150         public enum InputParameter implements OnnxParameter {
10151             X(TypeConstraint.T.typeVariable(), Quantifier.REQUIRED),
10152             ;
10153 
10154             final OnnxType type;
10155             final Quantifier quantifier;
10156 
10157             InputParameter(OnnxType type, Quantifier quantifier) {
10158                 this.type = type;
10159                 this.quantifier = quantifier;
10160             }
10161 
10162             @Override
10163             public OnnxType type() {
10164                 return type;
10165             }
10166 
10167             @Override
10168             public Quantifier quantifier() {
10169                 return quantifier;
10170             }
10171         }
10172 
10173         public enum OutputParameter implements OnnxParameter {
10174             Y(TypeConstraint.T.typeVariable(), Quantifier.REQUIRED),
10175             ;
10176 
10177             final OnnxType type;
10178             final Quantifier quantifier;
10179 
10180             OutputParameter(OnnxType type, Quantifier quantifier) {
10181                 this.type = type;
10182                 this.quantifier = quantifier;
10183             }
10184 
10185             @Override
10186             public OnnxType type() {
10187                 return type;
10188             }
10189 
10190             @Override
10191             public Quantifier quantifier() {
10192                 return quantifier;
10193             }
10194         }
10195 
10196         public static final OnnxSchema SCHEMA = new OnnxSchemaRecord(
10197                 NAME,
10198                 List.of(Attribute.values()),
10199                 List.of(TypeConstraint.values()),
10200                 List.of(InputParameter.values()),
10201                 List.of(OutputParameter.values())
10202         );
10203 
10204         public GlobalAveragePool(ExternalizedOp def) {
10205             super(SCHEMA, def);
10206         }
10207 
10208         GlobalAveragePool(GlobalAveragePool that, CopyContext cc) {
10209             super(that, cc);
10210         }
10211 
10212         @Override
10213         public GlobalAveragePool transform(CopyContext cc, OpTransformer ot) {
10214             return new GlobalAveragePool(this, cc);
10215         }
10216 
10217         GlobalAveragePool(TypeElement resultType, Value X) {
10218             super(SCHEMA, resultType, Set.of(), List.of(X), List.of());
10219         }
10220 
10221         @Override
10222         public SequencedSet<OnnxParameter> onnxOutputs() {
10223             return onnxOutputs(SCHEMA);
10224         }
10225 
10226         @Override
10227         public SequencedMap<OnnxParameter, Object> onnxInputs() {
10228             return onnxInputs(SCHEMA, List.of(X()));
10229         }
10230 
10231         public Value X() {
10232             return operands().get(0);
10233         }
10234 
10235     }
10236 
10237     public static GlobalAveragePool GlobalAveragePool(TypeElement resultType, Value X) {
10238         return new GlobalAveragePool(resultType, X);
10239     }
10240 
10241     @OpFactory.OpDeclaration(GlobalLpPool.NAME)
10242     public static final class GlobalLpPool extends OnnxOp {
10243         public static final String NAME = "GlobalLpPool";
10244 
10245         public enum Attribute implements OnnxAttribute {
10246             p(Integer.class, true, 2),
10247             ;
10248 
10249                 final Class<?> t;
10250                 final boolean optional;
10251                 final Object defaultValue;
10252 
10253                 Attribute(Class<?> type, boolean optional, Object defaultValue) {
10254                     this.t = type;
10255                     this.optional = optional;
10256                     this.defaultValue = defaultValue;
10257                     assert optional || defaultValue == null;
10258                 }
10259 
10260                 public Class<?> type() {
10261                     return t;
10262                 }
10263 
10264                 public boolean isOptional() {
10265                     return optional;
10266                 }
10267 
10268                 public Object defaultValue() {
10269                     return defaultValue;
10270                 }
10271         }
10272 
10273         public enum TypeConstraint implements OnnxTypeConstraint {
10274             T(new OnnxType.TypeVariable("T", List.of(OnnxType.tensor(OnnxType.bfloat16()), OnnxType.tensor(OnnxType.float16()), OnnxType.tensor(OnnxType.float32()), OnnxType.tensor(OnnxType.float64())))),
10275             ;
10276 
10277             final OnnxType.TypeVariable typeVariable;
10278 
10279             TypeConstraint(OnnxType.TypeVariable typeVariable) {
10280                 assert typeVariable.name().equals(name());
10281                 this.typeVariable = typeVariable;
10282             }
10283 
10284             @Override
10285             public OnnxType.TypeVariable typeVariable() {
10286                 return typeVariable;
10287             }
10288         }
10289 
10290         public enum InputParameter implements OnnxParameter {
10291             X(TypeConstraint.T.typeVariable(), Quantifier.REQUIRED),
10292             ;
10293 
10294             final OnnxType type;
10295             final Quantifier quantifier;
10296 
10297             InputParameter(OnnxType type, Quantifier quantifier) {
10298                 this.type = type;
10299                 this.quantifier = quantifier;
10300             }
10301 
10302             @Override
10303             public OnnxType type() {
10304                 return type;
10305             }
10306 
10307             @Override
10308             public Quantifier quantifier() {
10309                 return quantifier;
10310             }
10311         }
10312 
10313         public enum OutputParameter implements OnnxParameter {
10314             Y(TypeConstraint.T.typeVariable(), Quantifier.REQUIRED),
10315             ;
10316 
10317             final OnnxType type;
10318             final Quantifier quantifier;
10319 
10320             OutputParameter(OnnxType type, Quantifier quantifier) {
10321                 this.type = type;
10322                 this.quantifier = quantifier;
10323             }
10324 
10325             @Override
10326             public OnnxType type() {
10327                 return type;
10328             }
10329 
10330             @Override
10331             public Quantifier quantifier() {
10332                 return quantifier;
10333             }
10334         }
10335 
10336         public static final OnnxSchema SCHEMA = new OnnxSchemaRecord(
10337                 NAME,
10338                 List.of(Attribute.values()),
10339                 List.of(TypeConstraint.values()),
10340                 List.of(InputParameter.values()),
10341                 List.of(OutputParameter.values())
10342         );
10343 
10344         public GlobalLpPool(ExternalizedOp def) {
10345             super(SCHEMA, def);
10346         }
10347 
10348         GlobalLpPool(GlobalLpPool that, CopyContext cc) {
10349             super(that, cc);
10350         }
10351 
10352         @Override
10353         public GlobalLpPool transform(CopyContext cc, OpTransformer ot) {
10354             return new GlobalLpPool(this, cc);
10355         }
10356 
10357         GlobalLpPool(TypeElement resultType, Value X, java.util.Optional<Integer> p) {
10358             super(SCHEMA, resultType, Set.of(), List.of(X), List.of(p));
10359         }
10360 
10361         @Override
10362         public SequencedSet<OnnxParameter> onnxOutputs() {
10363             return onnxOutputs(SCHEMA);
10364         }
10365 
10366         @Override
10367         public SequencedMap<OnnxParameter, Object> onnxInputs() {
10368             return onnxInputs(SCHEMA, List.of(X()));
10369         }
10370 
10371         public Value X() {
10372             return operands().get(0);
10373         }
10374 
10375         public java.util.Optional<Integer> p() {
10376             Integer p = Attribute.p.access(Integer.class, onnxAttributes);
10377             return java.util.Optional.ofNullable(p);
10378         }
10379 
10380     }
10381 
10382     public static GlobalLpPool GlobalLpPool(TypeElement resultType, Value X, java.util.Optional<Integer> p) {
10383         return new GlobalLpPool(resultType, X, p);
10384     }
10385 
10386     @OpFactory.OpDeclaration(GlobalMaxPool.NAME)
10387     public static final class GlobalMaxPool extends OnnxOp {
10388         public static final String NAME = "GlobalMaxPool";
10389 
10390         public enum Attribute implements OnnxAttribute.None { }
10391 
10392         public enum TypeConstraint implements OnnxTypeConstraint {
10393             T(new OnnxType.TypeVariable("T", List.of(OnnxType.tensor(OnnxType.bfloat16()), OnnxType.tensor(OnnxType.float16()), OnnxType.tensor(OnnxType.float32()), OnnxType.tensor(OnnxType.float64())))),
10394             ;
10395 
10396             final OnnxType.TypeVariable typeVariable;
10397 
10398             TypeConstraint(OnnxType.TypeVariable typeVariable) {
10399                 assert typeVariable.name().equals(name());
10400                 this.typeVariable = typeVariable;
10401             }
10402 
10403             @Override
10404             public OnnxType.TypeVariable typeVariable() {
10405                 return typeVariable;
10406             }
10407         }
10408 
10409         public enum InputParameter implements OnnxParameter {
10410             X(TypeConstraint.T.typeVariable(), Quantifier.REQUIRED),
10411             ;
10412 
10413             final OnnxType type;
10414             final Quantifier quantifier;
10415 
10416             InputParameter(OnnxType type, Quantifier quantifier) {
10417                 this.type = type;
10418                 this.quantifier = quantifier;
10419             }
10420 
10421             @Override
10422             public OnnxType type() {
10423                 return type;
10424             }
10425 
10426             @Override
10427             public Quantifier quantifier() {
10428                 return quantifier;
10429             }
10430         }
10431 
10432         public enum OutputParameter implements OnnxParameter {
10433             Y(TypeConstraint.T.typeVariable(), Quantifier.REQUIRED),
10434             ;
10435 
10436             final OnnxType type;
10437             final Quantifier quantifier;
10438 
10439             OutputParameter(OnnxType type, Quantifier quantifier) {
10440                 this.type = type;
10441                 this.quantifier = quantifier;
10442             }
10443 
10444             @Override
10445             public OnnxType type() {
10446                 return type;
10447             }
10448 
10449             @Override
10450             public Quantifier quantifier() {
10451                 return quantifier;
10452             }
10453         }
10454 
10455         public static final OnnxSchema SCHEMA = new OnnxSchemaRecord(
10456                 NAME,
10457                 List.of(Attribute.values()),
10458                 List.of(TypeConstraint.values()),
10459                 List.of(InputParameter.values()),
10460                 List.of(OutputParameter.values())
10461         );
10462 
10463         public GlobalMaxPool(ExternalizedOp def) {
10464             super(SCHEMA, def);
10465         }
10466 
10467         GlobalMaxPool(GlobalMaxPool that, CopyContext cc) {
10468             super(that, cc);
10469         }
10470 
10471         @Override
10472         public GlobalMaxPool transform(CopyContext cc, OpTransformer ot) {
10473             return new GlobalMaxPool(this, cc);
10474         }
10475 
10476         GlobalMaxPool(TypeElement resultType, Value X) {
10477             super(SCHEMA, resultType, Set.of(), List.of(X), List.of());
10478         }
10479 
10480         @Override
10481         public SequencedSet<OnnxParameter> onnxOutputs() {
10482             return onnxOutputs(SCHEMA);
10483         }
10484 
10485         @Override
10486         public SequencedMap<OnnxParameter, Object> onnxInputs() {
10487             return onnxInputs(SCHEMA, List.of(X()));
10488         }
10489 
10490         public Value X() {
10491             return operands().get(0);
10492         }
10493 
10494     }
10495 
10496     public static GlobalMaxPool GlobalMaxPool(TypeElement resultType, Value X) {
10497         return new GlobalMaxPool(resultType, X);
10498     }
10499 
10500     @OpFactory.OpDeclaration(Gradient.NAME)
10501     public static final class Gradient extends OnnxOp {
10502         public static final String NAME = "Gradient";
10503 
10504         public enum Attribute implements OnnxAttribute {
10505             y(String.class, false, null),
10506             zs(String[].class, true, null),
10507             xs(String[].class, false, null),
10508             ;
10509 
10510                 final Class<?> t;
10511                 final boolean optional;
10512                 final Object defaultValue;
10513 
10514                 Attribute(Class<?> type, boolean optional, Object defaultValue) {
10515                     this.t = type;
10516                     this.optional = optional;
10517                     this.defaultValue = defaultValue;
10518                     assert optional || defaultValue == null;
10519                 }
10520 
10521                 public Class<?> type() {
10522                     return t;
10523                 }
10524 
10525                 public boolean isOptional() {
10526                     return optional;
10527                 }
10528 
10529                 public Object defaultValue() {
10530                     return defaultValue;
10531                 }
10532         }
10533 
10534         public enum TypeConstraint implements OnnxTypeConstraint {
10535             T1(new OnnxType.TypeVariable("T1", List.of(OnnxType.tensor(OnnxType.uint8()), OnnxType.tensor(OnnxType.uint16()), OnnxType.tensor(OnnxType.uint32()), OnnxType.tensor(OnnxType.uint64()), OnnxType.tensor(OnnxType.int8()), OnnxType.tensor(OnnxType.int16()), OnnxType.tensor(OnnxType.int32()), OnnxType.tensor(OnnxType.int64()), OnnxType.tensor(OnnxType.float16()), OnnxType.tensor(OnnxType.float32()), OnnxType.tensor(OnnxType.float64()), OnnxType.tensor(OnnxType.string()), OnnxType.tensor(OnnxType.bool()), OnnxType.tensor(OnnxType.complex64()), OnnxType.tensor(OnnxType.complex128())))),
10536             T2(new OnnxType.TypeVariable("T2", List.of(OnnxType.tensor(OnnxType.float16()), OnnxType.tensor(OnnxType.float32()), OnnxType.tensor(OnnxType.float64())))),
10537             ;
10538 
10539             final OnnxType.TypeVariable typeVariable;
10540 
10541             TypeConstraint(OnnxType.TypeVariable typeVariable) {
10542                 assert typeVariable.name().equals(name());
10543                 this.typeVariable = typeVariable;
10544             }
10545 
10546             @Override
10547             public OnnxType.TypeVariable typeVariable() {
10548                 return typeVariable;
10549             }
10550         }
10551 
10552         public enum InputParameter implements OnnxParameter {
10553             Inputs(TypeConstraint.T1.typeVariable(), Quantifier.VARIADIC),
10554             ;
10555 
10556             final OnnxType type;
10557             final Quantifier quantifier;
10558 
10559             InputParameter(OnnxType type, Quantifier quantifier) {
10560                 this.type = type;
10561                 this.quantifier = quantifier;
10562             }
10563 
10564             @Override
10565             public OnnxType type() {
10566                 return type;
10567             }
10568 
10569             @Override
10570             public Quantifier quantifier() {
10571                 return quantifier;
10572             }
10573         }
10574 
10575         public enum OutputParameter implements OnnxParameter {
10576             Outputs(TypeConstraint.T2.typeVariable(), Quantifier.VARIADIC),
10577             ;
10578 
10579             final OnnxType type;
10580             final Quantifier quantifier;
10581 
10582             OutputParameter(OnnxType type, Quantifier quantifier) {
10583                 this.type = type;
10584                 this.quantifier = quantifier;
10585             }
10586 
10587             @Override
10588             public OnnxType type() {
10589                 return type;
10590             }
10591 
10592             @Override
10593             public Quantifier quantifier() {
10594                 return quantifier;
10595             }
10596         }
10597 
10598         public static final OnnxSchema SCHEMA = new OnnxSchemaRecord(
10599                 NAME,
10600                 List.of(Attribute.values()),
10601                 List.of(TypeConstraint.values()),
10602                 List.of(InputParameter.values()),
10603                 List.of(OutputParameter.values())
10604         );
10605 
10606         public Gradient(ExternalizedOp def) {
10607             super(SCHEMA, def);
10608         }
10609 
10610         Gradient(Gradient that, CopyContext cc) {
10611             super(that, cc);
10612         }
10613 
10614         @Override
10615         public Gradient transform(CopyContext cc, OpTransformer ot) {
10616             return new Gradient(this, cc);
10617         }
10618 
10619         Gradient(TypeElement resultType, List<Value> Inputs, String y, java.util.Optional<String[]> zs, String[] xs) {
10620             super(SCHEMA, resultType, Set.of(), List.of(Inputs), List.of(y, zs, xs));
10621         }
10622 
10623         @Override
10624         public SequencedSet<OnnxParameter> onnxOutputs() {
10625             return onnxOutputs(SCHEMA);
10626         }
10627 
10628         @Override
10629         public SequencedMap<OnnxParameter, Object> onnxInputs() {
10630             return onnxInputs(SCHEMA, List.of(Inputs()));
10631         }
10632 
10633         public List<Value> Inputs() {
10634             return operands();
10635         }
10636 
10637         public String y() {
10638             String y = Attribute.y.access(String.class, onnxAttributes);
10639             return y;
10640         }
10641 
10642         public java.util.Optional<String[]> zs() {
10643             String[] zs = Attribute.zs.access(String[].class, onnxAttributes);
10644             return java.util.Optional.ofNullable(zs).map(String[]::clone);
10645         }
10646 
10647         public String[] xs() {
10648             String[] xs = Attribute.xs.access(String[].class, onnxAttributes);
10649             return xs.clone();
10650         }
10651 
10652     }
10653 
10654     public static Gradient Gradient(TypeElement resultType, List<Value> Inputs, String y, java.util.Optional<String[]> zs, String[] xs) {
10655         return new Gradient(resultType, Inputs, y, zs, xs);
10656     }
10657 
10658     @OpFactory.OpDeclaration(Greater.NAME)
10659     public static final class Greater extends OnnxOp {
10660         public static final String NAME = "Greater";
10661 
10662         public enum Attribute implements OnnxAttribute.None { }
10663 
10664         public enum TypeConstraint implements OnnxTypeConstraint {
10665             T(new OnnxType.TypeVariable("T", List.of(OnnxType.tensor(OnnxType.uint8()), OnnxType.tensor(OnnxType.uint16()), OnnxType.tensor(OnnxType.uint32()), OnnxType.tensor(OnnxType.uint64()), OnnxType.tensor(OnnxType.int8()), OnnxType.tensor(OnnxType.int16()), OnnxType.tensor(OnnxType.int32()), OnnxType.tensor(OnnxType.int64()), OnnxType.tensor(OnnxType.float16()), OnnxType.tensor(OnnxType.float32()), OnnxType.tensor(OnnxType.float64()), OnnxType.tensor(OnnxType.bfloat16())))),
10666             T1(new OnnxType.TypeVariable("T1", List.of(OnnxType.tensor(OnnxType.bool())))),
10667             ;
10668 
10669             final OnnxType.TypeVariable typeVariable;
10670 
10671             TypeConstraint(OnnxType.TypeVariable typeVariable) {
10672                 assert typeVariable.name().equals(name());
10673                 this.typeVariable = typeVariable;
10674             }
10675 
10676             @Override
10677             public OnnxType.TypeVariable typeVariable() {
10678                 return typeVariable;
10679             }
10680         }
10681 
10682         public enum InputParameter implements OnnxParameter {
10683             A(TypeConstraint.T.typeVariable(), Quantifier.REQUIRED),
10684             B(TypeConstraint.T.typeVariable(), Quantifier.REQUIRED),
10685             ;
10686 
10687             final OnnxType type;
10688             final Quantifier quantifier;
10689 
10690             InputParameter(OnnxType type, Quantifier quantifier) {
10691                 this.type = type;
10692                 this.quantifier = quantifier;
10693             }
10694 
10695             @Override
10696             public OnnxType type() {
10697                 return type;
10698             }
10699 
10700             @Override
10701             public Quantifier quantifier() {
10702                 return quantifier;
10703             }
10704         }
10705 
10706         public enum OutputParameter implements OnnxParameter {
10707             C(TypeConstraint.T1.typeVariable(), Quantifier.REQUIRED),
10708             ;
10709 
10710             final OnnxType type;
10711             final Quantifier quantifier;
10712 
10713             OutputParameter(OnnxType type, Quantifier quantifier) {
10714                 this.type = type;
10715                 this.quantifier = quantifier;
10716             }
10717 
10718             @Override
10719             public OnnxType type() {
10720                 return type;
10721             }
10722 
10723             @Override
10724             public Quantifier quantifier() {
10725                 return quantifier;
10726             }
10727         }
10728 
10729         public static final OnnxSchema SCHEMA = new OnnxSchemaRecord(
10730                 NAME,
10731                 List.of(Attribute.values()),
10732                 List.of(TypeConstraint.values()),
10733                 List.of(InputParameter.values()),
10734                 List.of(OutputParameter.values())
10735         );
10736 
10737         public Greater(ExternalizedOp def) {
10738             super(SCHEMA, def);
10739         }
10740 
10741         Greater(Greater that, CopyContext cc) {
10742             super(that, cc);
10743         }
10744 
10745         @Override
10746         public Greater transform(CopyContext cc, OpTransformer ot) {
10747             return new Greater(this, cc);
10748         }
10749 
10750         Greater(TypeElement resultType, Value A, Value B) {
10751             super(SCHEMA, resultType, Set.of(), List.of(A, B), List.of());
10752         }
10753 
10754         @Override
10755         public SequencedSet<OnnxParameter> onnxOutputs() {
10756             return onnxOutputs(SCHEMA);
10757         }
10758 
10759         @Override
10760         public SequencedMap<OnnxParameter, Object> onnxInputs() {
10761             return onnxInputs(SCHEMA, List.of(A(), B()));
10762         }
10763 
10764         public Value A() {
10765             return operands().get(0);
10766         }
10767 
10768         public Value B() {
10769             return operands().get(1);
10770         }
10771 
10772     }
10773 
10774     public static Greater Greater(TypeElement resultType, Value A, Value B) {
10775         return new Greater(resultType, A, B);
10776     }
10777 
10778     @OpFactory.OpDeclaration(GreaterOrEqual.NAME)
10779     public static final class GreaterOrEqual extends OnnxOp {
10780         public static final String NAME = "GreaterOrEqual";
10781 
10782         public enum Attribute implements OnnxAttribute.None { }
10783 
10784         public enum TypeConstraint implements OnnxTypeConstraint {
10785             T(new OnnxType.TypeVariable("T", List.of(OnnxType.tensor(OnnxType.uint8()), OnnxType.tensor(OnnxType.uint16()), OnnxType.tensor(OnnxType.uint32()), OnnxType.tensor(OnnxType.uint64()), OnnxType.tensor(OnnxType.int8()), OnnxType.tensor(OnnxType.int16()), OnnxType.tensor(OnnxType.int32()), OnnxType.tensor(OnnxType.int64()), OnnxType.tensor(OnnxType.float16()), OnnxType.tensor(OnnxType.float32()), OnnxType.tensor(OnnxType.float64()), OnnxType.tensor(OnnxType.bfloat16())))),
10786             T1(new OnnxType.TypeVariable("T1", List.of(OnnxType.tensor(OnnxType.bool())))),
10787             ;
10788 
10789             final OnnxType.TypeVariable typeVariable;
10790 
10791             TypeConstraint(OnnxType.TypeVariable typeVariable) {
10792                 assert typeVariable.name().equals(name());
10793                 this.typeVariable = typeVariable;
10794             }
10795 
10796             @Override
10797             public OnnxType.TypeVariable typeVariable() {
10798                 return typeVariable;
10799             }
10800         }
10801 
10802         public enum InputParameter implements OnnxParameter {
10803             A(TypeConstraint.T.typeVariable(), Quantifier.REQUIRED),
10804             B(TypeConstraint.T.typeVariable(), Quantifier.REQUIRED),
10805             ;
10806 
10807             final OnnxType type;
10808             final Quantifier quantifier;
10809 
10810             InputParameter(OnnxType type, Quantifier quantifier) {
10811                 this.type = type;
10812                 this.quantifier = quantifier;
10813             }
10814 
10815             @Override
10816             public OnnxType type() {
10817                 return type;
10818             }
10819 
10820             @Override
10821             public Quantifier quantifier() {
10822                 return quantifier;
10823             }
10824         }
10825 
10826         public enum OutputParameter implements OnnxParameter {
10827             C(TypeConstraint.T1.typeVariable(), Quantifier.REQUIRED),
10828             ;
10829 
10830             final OnnxType type;
10831             final Quantifier quantifier;
10832 
10833             OutputParameter(OnnxType type, Quantifier quantifier) {
10834                 this.type = type;
10835                 this.quantifier = quantifier;
10836             }
10837 
10838             @Override
10839             public OnnxType type() {
10840                 return type;
10841             }
10842 
10843             @Override
10844             public Quantifier quantifier() {
10845                 return quantifier;
10846             }
10847         }
10848 
10849         public static final OnnxSchema SCHEMA = new OnnxSchemaRecord(
10850                 NAME,
10851                 List.of(Attribute.values()),
10852                 List.of(TypeConstraint.values()),
10853                 List.of(InputParameter.values()),
10854                 List.of(OutputParameter.values())
10855         );
10856 
10857         public GreaterOrEqual(ExternalizedOp def) {
10858             super(SCHEMA, def);
10859         }
10860 
10861         GreaterOrEqual(GreaterOrEqual that, CopyContext cc) {
10862             super(that, cc);
10863         }
10864 
10865         @Override
10866         public GreaterOrEqual transform(CopyContext cc, OpTransformer ot) {
10867             return new GreaterOrEqual(this, cc);
10868         }
10869 
10870         GreaterOrEqual(TypeElement resultType, Value A, Value B) {
10871             super(SCHEMA, resultType, Set.of(), List.of(A, B), List.of());
10872         }
10873 
10874         @Override
10875         public SequencedSet<OnnxParameter> onnxOutputs() {
10876             return onnxOutputs(SCHEMA);
10877         }
10878 
10879         @Override
10880         public SequencedMap<OnnxParameter, Object> onnxInputs() {
10881             return onnxInputs(SCHEMA, List.of(A(), B()));
10882         }
10883 
10884         public Value A() {
10885             return operands().get(0);
10886         }
10887 
10888         public Value B() {
10889             return operands().get(1);
10890         }
10891 
10892     }
10893 
10894     public static GreaterOrEqual GreaterOrEqual(TypeElement resultType, Value A, Value B) {
10895         return new GreaterOrEqual(resultType, A, B);
10896     }
10897 
10898     @OpFactory.OpDeclaration(GridSample.NAME)
10899     public static final class GridSample extends OnnxOp {
10900         public static final String NAME = "GridSample";
10901 
10902         public enum Attribute implements OnnxAttribute {
10903             mode(String.class, true, "linear"),
10904             align_corners(Integer.class, true, 0),
10905             padding_mode(String.class, true, "zeros"),
10906             ;
10907 
10908                 final Class<?> t;
10909                 final boolean optional;
10910                 final Object defaultValue;
10911 
10912                 Attribute(Class<?> type, boolean optional, Object defaultValue) {
10913                     this.t = type;
10914                     this.optional = optional;
10915                     this.defaultValue = defaultValue;
10916                     assert optional || defaultValue == null;
10917                 }
10918 
10919                 public Class<?> type() {
10920                     return t;
10921                 }
10922 
10923                 public boolean isOptional() {
10924                     return optional;
10925                 }
10926 
10927                 public Object defaultValue() {
10928                     return defaultValue;
10929                 }
10930         }
10931 
10932         public enum TypeConstraint implements OnnxTypeConstraint {
10933             T1(new OnnxType.TypeVariable("T1", List.of(OnnxType.tensor(OnnxType.uint8()), OnnxType.tensor(OnnxType.uint16()), OnnxType.tensor(OnnxType.uint32()), OnnxType.tensor(OnnxType.uint64()), OnnxType.tensor(OnnxType.int8()), OnnxType.tensor(OnnxType.int16()), OnnxType.tensor(OnnxType.int32()), OnnxType.tensor(OnnxType.int64()), OnnxType.tensor(OnnxType.bfloat16()), OnnxType.tensor(OnnxType.float16()), OnnxType.tensor(OnnxType.float32()), OnnxType.tensor(OnnxType.float64()), OnnxType.tensor(OnnxType.string()), OnnxType.tensor(OnnxType.bool()), OnnxType.tensor(OnnxType.complex64()), OnnxType.tensor(OnnxType.complex128())))),
10934             T2(new OnnxType.TypeVariable("T2", List.of(OnnxType.tensor(OnnxType.bfloat16()), OnnxType.tensor(OnnxType.float16()), OnnxType.tensor(OnnxType.float32()), OnnxType.tensor(OnnxType.float64())))),
10935             ;
10936 
10937             final OnnxType.TypeVariable typeVariable;
10938 
10939             TypeConstraint(OnnxType.TypeVariable typeVariable) {
10940                 assert typeVariable.name().equals(name());
10941                 this.typeVariable = typeVariable;
10942             }
10943 
10944             @Override
10945             public OnnxType.TypeVariable typeVariable() {
10946                 return typeVariable;
10947             }
10948         }
10949 
10950         public enum InputParameter implements OnnxParameter {
10951             X(TypeConstraint.T1.typeVariable(), Quantifier.REQUIRED),
10952             grid(TypeConstraint.T2.typeVariable(), Quantifier.REQUIRED),
10953             ;
10954 
10955             final OnnxType type;
10956             final Quantifier quantifier;
10957 
10958             InputParameter(OnnxType type, Quantifier quantifier) {
10959                 this.type = type;
10960                 this.quantifier = quantifier;
10961             }
10962 
10963             @Override
10964             public OnnxType type() {
10965                 return type;
10966             }
10967 
10968             @Override
10969             public Quantifier quantifier() {
10970                 return quantifier;
10971             }
10972         }
10973 
10974         public enum OutputParameter implements OnnxParameter {
10975             Y(TypeConstraint.T1.typeVariable(), Quantifier.REQUIRED),
10976             ;
10977 
10978             final OnnxType type;
10979             final Quantifier quantifier;
10980 
10981             OutputParameter(OnnxType type, Quantifier quantifier) {
10982                 this.type = type;
10983                 this.quantifier = quantifier;
10984             }
10985 
10986             @Override
10987             public OnnxType type() {
10988                 return type;
10989             }
10990 
10991             @Override
10992             public Quantifier quantifier() {
10993                 return quantifier;
10994             }
10995         }
10996 
10997         public static final OnnxSchema SCHEMA = new OnnxSchemaRecord(
10998                 NAME,
10999                 List.of(Attribute.values()),
11000                 List.of(TypeConstraint.values()),
11001                 List.of(InputParameter.values()),
11002                 List.of(OutputParameter.values())
11003         );
11004 
11005         public GridSample(ExternalizedOp def) {
11006             super(SCHEMA, def);
11007         }
11008 
11009         GridSample(GridSample that, CopyContext cc) {
11010             super(that, cc);
11011         }
11012 
11013         @Override
11014         public GridSample transform(CopyContext cc, OpTransformer ot) {
11015             return new GridSample(this, cc);
11016         }
11017 
11018         GridSample(TypeElement resultType, Value X, Value grid, java.util.Optional<String> mode, java.util.Optional<Integer> align_corners, java.util.Optional<String> padding_mode) {
11019             super(SCHEMA, resultType, Set.of(), List.of(X, grid), List.of(mode, align_corners, padding_mode));
11020         }
11021 
11022         @Override
11023         public SequencedSet<OnnxParameter> onnxOutputs() {
11024             return onnxOutputs(SCHEMA);
11025         }
11026 
11027         @Override
11028         public SequencedMap<OnnxParameter, Object> onnxInputs() {
11029             return onnxInputs(SCHEMA, List.of(X(), grid()));
11030         }
11031 
11032         public Value X() {
11033             return operands().get(0);
11034         }
11035 
11036         public Value grid() {
11037             return operands().get(1);
11038         }
11039 
11040         public java.util.Optional<String> mode() {
11041             String mode = Attribute.mode.access(String.class, onnxAttributes);
11042             return java.util.Optional.ofNullable(mode);
11043         }
11044 
11045         public java.util.Optional<Integer> align_corners() {
11046             Integer align_corners = Attribute.align_corners.access(Integer.class, onnxAttributes);
11047             return java.util.Optional.ofNullable(align_corners);
11048         }
11049 
11050         public java.util.Optional<String> padding_mode() {
11051             String padding_mode = Attribute.padding_mode.access(String.class, onnxAttributes);
11052             return java.util.Optional.ofNullable(padding_mode);
11053         }
11054 
11055     }
11056 
11057     public static GridSample GridSample(TypeElement resultType, Value X, Value grid, java.util.Optional<String> mode, java.util.Optional<Integer> align_corners, java.util.Optional<String> padding_mode) {
11058         return new GridSample(resultType, X, grid, mode, align_corners, padding_mode);
11059     }
11060 
11061     @OpFactory.OpDeclaration(GroupNormalization.NAME)
11062     public static final class GroupNormalization extends OnnxOp {
11063         public static final String NAME = "GroupNormalization";
11064 
11065         public enum Attribute implements OnnxAttribute {
11066             epsilon(Float.class, true, 1.0E-5f),
11067             stash_type(Integer.class, true, 1),
11068             num_groups(Integer.class, false, null),
11069             ;
11070 
11071                 final Class<?> t;
11072                 final boolean optional;
11073                 final Object defaultValue;
11074 
11075                 Attribute(Class<?> type, boolean optional, Object defaultValue) {
11076                     this.t = type;
11077                     this.optional = optional;
11078                     this.defaultValue = defaultValue;
11079                     assert optional || defaultValue == null;
11080                 }
11081 
11082                 public Class<?> type() {
11083                     return t;
11084                 }
11085 
11086                 public boolean isOptional() {
11087                     return optional;
11088                 }
11089 
11090                 public Object defaultValue() {
11091                     return defaultValue;
11092                 }
11093         }
11094 
11095         public enum TypeConstraint implements OnnxTypeConstraint {
11096             T(new OnnxType.TypeVariable("T", List.of(OnnxType.tensor(OnnxType.bfloat16()), OnnxType.tensor(OnnxType.float16()), OnnxType.tensor(OnnxType.float32()), OnnxType.tensor(OnnxType.float64())))),
11097             ;
11098 
11099             final OnnxType.TypeVariable typeVariable;
11100 
11101             TypeConstraint(OnnxType.TypeVariable typeVariable) {
11102                 assert typeVariable.name().equals(name());
11103                 this.typeVariable = typeVariable;
11104             }
11105 
11106             @Override
11107             public OnnxType.TypeVariable typeVariable() {
11108                 return typeVariable;
11109             }
11110         }
11111 
11112         public enum InputParameter implements OnnxParameter {
11113             X(TypeConstraint.T.typeVariable(), Quantifier.REQUIRED),
11114             scale(TypeConstraint.T.typeVariable(), Quantifier.REQUIRED),
11115             bias(TypeConstraint.T.typeVariable(), Quantifier.REQUIRED),
11116             ;
11117 
11118             final OnnxType type;
11119             final Quantifier quantifier;
11120 
11121             InputParameter(OnnxType type, Quantifier quantifier) {
11122                 this.type = type;
11123                 this.quantifier = quantifier;
11124             }
11125 
11126             @Override
11127             public OnnxType type() {
11128                 return type;
11129             }
11130 
11131             @Override
11132             public Quantifier quantifier() {
11133                 return quantifier;
11134             }
11135         }
11136 
11137         public enum OutputParameter implements OnnxParameter {
11138             Y(TypeConstraint.T.typeVariable(), Quantifier.REQUIRED),
11139             ;
11140 
11141             final OnnxType type;
11142             final Quantifier quantifier;
11143 
11144             OutputParameter(OnnxType type, Quantifier quantifier) {
11145                 this.type = type;
11146                 this.quantifier = quantifier;
11147             }
11148 
11149             @Override
11150             public OnnxType type() {
11151                 return type;
11152             }
11153 
11154             @Override
11155             public Quantifier quantifier() {
11156                 return quantifier;
11157             }
11158         }
11159 
11160         public static final OnnxSchema SCHEMA = new OnnxSchemaRecord(
11161                 NAME,
11162                 List.of(Attribute.values()),
11163                 List.of(TypeConstraint.values()),
11164                 List.of(InputParameter.values()),
11165                 List.of(OutputParameter.values())
11166         );
11167 
11168         public GroupNormalization(ExternalizedOp def) {
11169             super(SCHEMA, def);
11170         }
11171 
11172         GroupNormalization(GroupNormalization that, CopyContext cc) {
11173             super(that, cc);
11174         }
11175 
11176         @Override
11177         public GroupNormalization transform(CopyContext cc, OpTransformer ot) {
11178             return new GroupNormalization(this, cc);
11179         }
11180 
11181         GroupNormalization(TypeElement resultType, Value X, Value scale, Value bias, java.util.Optional<Float> epsilon, java.util.Optional<Integer> stash_type, int num_groups) {
11182             super(SCHEMA, resultType, Set.of(), List.of(X, scale, bias), List.of(epsilon, stash_type, num_groups));
11183         }
11184 
11185         @Override
11186         public SequencedSet<OnnxParameter> onnxOutputs() {
11187             return onnxOutputs(SCHEMA);
11188         }
11189 
11190         @Override
11191         public SequencedMap<OnnxParameter, Object> onnxInputs() {
11192             return onnxInputs(SCHEMA, List.of(X(), scale(), bias()));
11193         }
11194 
11195         public Value X() {
11196             return operands().get(0);
11197         }
11198 
11199         public Value scale() {
11200             return operands().get(1);
11201         }
11202 
11203         public Value bias() {
11204             return operands().get(2);
11205         }
11206 
11207         public java.util.Optional<Float> epsilon() {
11208             Float epsilon = Attribute.epsilon.access(Float.class, onnxAttributes);
11209             return java.util.Optional.ofNullable(epsilon);
11210         }
11211 
11212         public java.util.Optional<Integer> stash_type() {
11213             Integer stash_type = Attribute.stash_type.access(Integer.class, onnxAttributes);
11214             return java.util.Optional.ofNullable(stash_type);
11215         }
11216 
11217         public int num_groups() {
11218             int num_groups = Attribute.num_groups.access(int.class, onnxAttributes);
11219             return num_groups;
11220         }
11221 
11222     }
11223 
11224     public static GroupNormalization GroupNormalization(TypeElement resultType, Value X, Value scale, Value bias, java.util.Optional<Float> epsilon, java.util.Optional<Integer> stash_type, int num_groups) {
11225         return new GroupNormalization(resultType, X, scale, bias, epsilon, stash_type, num_groups);
11226     }
11227 
11228     @OpFactory.OpDeclaration(HammingWindow.NAME)
11229     public static final class HammingWindow extends OnnxOp {
11230         public static final String NAME = "HammingWindow";
11231 
11232         public enum Attribute implements OnnxAttribute {
11233             periodic(Integer.class, true, 1),
11234             output_datatype(Integer.class, true, 1),
11235             ;
11236 
11237                 final Class<?> t;
11238                 final boolean optional;
11239                 final Object defaultValue;
11240 
11241                 Attribute(Class<?> type, boolean optional, Object defaultValue) {
11242                     this.t = type;
11243                     this.optional = optional;
11244                     this.defaultValue = defaultValue;
11245                     assert optional || defaultValue == null;
11246                 }
11247 
11248                 public Class<?> type() {
11249                     return t;
11250                 }
11251 
11252                 public boolean isOptional() {
11253                     return optional;
11254                 }
11255 
11256                 public Object defaultValue() {
11257                     return defaultValue;
11258                 }
11259         }
11260 
11261         public enum TypeConstraint implements OnnxTypeConstraint {
11262             T1(new OnnxType.TypeVariable("T1", List.of(OnnxType.tensor(OnnxType.int32()), OnnxType.tensor(OnnxType.int64())))),
11263             T2(new OnnxType.TypeVariable("T2", List.of(OnnxType.tensor(OnnxType.uint8()), OnnxType.tensor(OnnxType.uint16()), OnnxType.tensor(OnnxType.uint32()), OnnxType.tensor(OnnxType.uint64()), OnnxType.tensor(OnnxType.int8()), OnnxType.tensor(OnnxType.int16()), OnnxType.tensor(OnnxType.int32()), OnnxType.tensor(OnnxType.int64()), OnnxType.tensor(OnnxType.float16()), OnnxType.tensor(OnnxType.float32()), OnnxType.tensor(OnnxType.float64()), OnnxType.tensor(OnnxType.bfloat16())))),
11264             ;
11265 
11266             final OnnxType.TypeVariable typeVariable;
11267 
11268             TypeConstraint(OnnxType.TypeVariable typeVariable) {
11269                 assert typeVariable.name().equals(name());
11270                 this.typeVariable = typeVariable;
11271             }
11272 
11273             @Override
11274             public OnnxType.TypeVariable typeVariable() {
11275                 return typeVariable;
11276             }
11277         }
11278 
11279         public enum InputParameter implements OnnxParameter {
11280             size(TypeConstraint.T1.typeVariable(), Quantifier.REQUIRED),
11281             ;
11282 
11283             final OnnxType type;
11284             final Quantifier quantifier;
11285 
11286             InputParameter(OnnxType type, Quantifier quantifier) {
11287                 this.type = type;
11288                 this.quantifier = quantifier;
11289             }
11290 
11291             @Override
11292             public OnnxType type() {
11293                 return type;
11294             }
11295 
11296             @Override
11297             public Quantifier quantifier() {
11298                 return quantifier;
11299             }
11300         }
11301 
11302         public enum OutputParameter implements OnnxParameter {
11303             output(TypeConstraint.T2.typeVariable(), Quantifier.REQUIRED),
11304             ;
11305 
11306             final OnnxType type;
11307             final Quantifier quantifier;
11308 
11309             OutputParameter(OnnxType type, Quantifier quantifier) {
11310                 this.type = type;
11311                 this.quantifier = quantifier;
11312             }
11313 
11314             @Override
11315             public OnnxType type() {
11316                 return type;
11317             }
11318 
11319             @Override
11320             public Quantifier quantifier() {
11321                 return quantifier;
11322             }
11323         }
11324 
11325         public static final OnnxSchema SCHEMA = new OnnxSchemaRecord(
11326                 NAME,
11327                 List.of(Attribute.values()),
11328                 List.of(TypeConstraint.values()),
11329                 List.of(InputParameter.values()),
11330                 List.of(OutputParameter.values())
11331         );
11332 
11333         public HammingWindow(ExternalizedOp def) {
11334             super(SCHEMA, def);
11335         }
11336 
11337         HammingWindow(HammingWindow that, CopyContext cc) {
11338             super(that, cc);
11339         }
11340 
11341         @Override
11342         public HammingWindow transform(CopyContext cc, OpTransformer ot) {
11343             return new HammingWindow(this, cc);
11344         }
11345 
11346         HammingWindow(TypeElement resultType, Value size, java.util.Optional<Integer> periodic, java.util.Optional<Integer> output_datatype) {
11347             super(SCHEMA, resultType, Set.of(), List.of(size), List.of(periodic, output_datatype));
11348         }
11349 
11350         @Override
11351         public SequencedSet<OnnxParameter> onnxOutputs() {
11352             return onnxOutputs(SCHEMA);
11353         }
11354 
11355         @Override
11356         public SequencedMap<OnnxParameter, Object> onnxInputs() {
11357             return onnxInputs(SCHEMA, List.of(size()));
11358         }
11359 
11360         public Value size() {
11361             return operands().get(0);
11362         }
11363 
11364         public java.util.Optional<Integer> periodic() {
11365             Integer periodic = Attribute.periodic.access(Integer.class, onnxAttributes);
11366             return java.util.Optional.ofNullable(periodic);
11367         }
11368 
11369         public java.util.Optional<Integer> output_datatype() {
11370             Integer output_datatype = Attribute.output_datatype.access(Integer.class, onnxAttributes);
11371             return java.util.Optional.ofNullable(output_datatype);
11372         }
11373 
11374     }
11375 
11376     public static HammingWindow HammingWindow(TypeElement resultType, Value size, java.util.Optional<Integer> periodic, java.util.Optional<Integer> output_datatype) {
11377         return new HammingWindow(resultType, size, periodic, output_datatype);
11378     }
11379 
11380     @OpFactory.OpDeclaration(HannWindow.NAME)
11381     public static final class HannWindow extends OnnxOp {
11382         public static final String NAME = "HannWindow";
11383 
11384         public enum Attribute implements OnnxAttribute {
11385             periodic(Integer.class, true, 1),
11386             output_datatype(Integer.class, true, 1),
11387             ;
11388 
11389                 final Class<?> t;
11390                 final boolean optional;
11391                 final Object defaultValue;
11392 
11393                 Attribute(Class<?> type, boolean optional, Object defaultValue) {
11394                     this.t = type;
11395                     this.optional = optional;
11396                     this.defaultValue = defaultValue;
11397                     assert optional || defaultValue == null;
11398                 }
11399 
11400                 public Class<?> type() {
11401                     return t;
11402                 }
11403 
11404                 public boolean isOptional() {
11405                     return optional;
11406                 }
11407 
11408                 public Object defaultValue() {
11409                     return defaultValue;
11410                 }
11411         }
11412 
11413         public enum TypeConstraint implements OnnxTypeConstraint {
11414             T1(new OnnxType.TypeVariable("T1", List.of(OnnxType.tensor(OnnxType.int32()), OnnxType.tensor(OnnxType.int64())))),
11415             T2(new OnnxType.TypeVariable("T2", List.of(OnnxType.tensor(OnnxType.uint8()), OnnxType.tensor(OnnxType.uint16()), OnnxType.tensor(OnnxType.uint32()), OnnxType.tensor(OnnxType.uint64()), OnnxType.tensor(OnnxType.int8()), OnnxType.tensor(OnnxType.int16()), OnnxType.tensor(OnnxType.int32()), OnnxType.tensor(OnnxType.int64()), OnnxType.tensor(OnnxType.float16()), OnnxType.tensor(OnnxType.float32()), OnnxType.tensor(OnnxType.float64()), OnnxType.tensor(OnnxType.bfloat16())))),
11416             ;
11417 
11418             final OnnxType.TypeVariable typeVariable;
11419 
11420             TypeConstraint(OnnxType.TypeVariable typeVariable) {
11421                 assert typeVariable.name().equals(name());
11422                 this.typeVariable = typeVariable;
11423             }
11424 
11425             @Override
11426             public OnnxType.TypeVariable typeVariable() {
11427                 return typeVariable;
11428             }
11429         }
11430 
11431         public enum InputParameter implements OnnxParameter {
11432             size(TypeConstraint.T1.typeVariable(), Quantifier.REQUIRED),
11433             ;
11434 
11435             final OnnxType type;
11436             final Quantifier quantifier;
11437 
11438             InputParameter(OnnxType type, Quantifier quantifier) {
11439                 this.type = type;
11440                 this.quantifier = quantifier;
11441             }
11442 
11443             @Override
11444             public OnnxType type() {
11445                 return type;
11446             }
11447 
11448             @Override
11449             public Quantifier quantifier() {
11450                 return quantifier;
11451             }
11452         }
11453 
11454         public enum OutputParameter implements OnnxParameter {
11455             output(TypeConstraint.T2.typeVariable(), Quantifier.REQUIRED),
11456             ;
11457 
11458             final OnnxType type;
11459             final Quantifier quantifier;
11460 
11461             OutputParameter(OnnxType type, Quantifier quantifier) {
11462                 this.type = type;
11463                 this.quantifier = quantifier;
11464             }
11465 
11466             @Override
11467             public OnnxType type() {
11468                 return type;
11469             }
11470 
11471             @Override
11472             public Quantifier quantifier() {
11473                 return quantifier;
11474             }
11475         }
11476 
11477         public static final OnnxSchema SCHEMA = new OnnxSchemaRecord(
11478                 NAME,
11479                 List.of(Attribute.values()),
11480                 List.of(TypeConstraint.values()),
11481                 List.of(InputParameter.values()),
11482                 List.of(OutputParameter.values())
11483         );
11484 
11485         public HannWindow(ExternalizedOp def) {
11486             super(SCHEMA, def);
11487         }
11488 
11489         HannWindow(HannWindow that, CopyContext cc) {
11490             super(that, cc);
11491         }
11492 
11493         @Override
11494         public HannWindow transform(CopyContext cc, OpTransformer ot) {
11495             return new HannWindow(this, cc);
11496         }
11497 
11498         HannWindow(TypeElement resultType, Value size, java.util.Optional<Integer> periodic, java.util.Optional<Integer> output_datatype) {
11499             super(SCHEMA, resultType, Set.of(), List.of(size), List.of(periodic, output_datatype));
11500         }
11501 
11502         @Override
11503         public SequencedSet<OnnxParameter> onnxOutputs() {
11504             return onnxOutputs(SCHEMA);
11505         }
11506 
11507         @Override
11508         public SequencedMap<OnnxParameter, Object> onnxInputs() {
11509             return onnxInputs(SCHEMA, List.of(size()));
11510         }
11511 
11512         public Value size() {
11513             return operands().get(0);
11514         }
11515 
11516         public java.util.Optional<Integer> periodic() {
11517             Integer periodic = Attribute.periodic.access(Integer.class, onnxAttributes);
11518             return java.util.Optional.ofNullable(periodic);
11519         }
11520 
11521         public java.util.Optional<Integer> output_datatype() {
11522             Integer output_datatype = Attribute.output_datatype.access(Integer.class, onnxAttributes);
11523             return java.util.Optional.ofNullable(output_datatype);
11524         }
11525 
11526     }
11527 
11528     public static HannWindow HannWindow(TypeElement resultType, Value size, java.util.Optional<Integer> periodic, java.util.Optional<Integer> output_datatype) {
11529         return new HannWindow(resultType, size, periodic, output_datatype);
11530     }
11531 
11532     @OpFactory.OpDeclaration(HardSigmoid.NAME)
11533     public static final class HardSigmoid extends OnnxOp {
11534         public static final String NAME = "HardSigmoid";
11535 
11536         public enum Attribute implements OnnxAttribute {
11537             alpha(Float.class, true, 0.2f),
11538             beta(Float.class, true, 0.5f),
11539             ;
11540 
11541                 final Class<?> t;
11542                 final boolean optional;
11543                 final Object defaultValue;
11544 
11545                 Attribute(Class<?> type, boolean optional, Object defaultValue) {
11546                     this.t = type;
11547                     this.optional = optional;
11548                     this.defaultValue = defaultValue;
11549                     assert optional || defaultValue == null;
11550                 }
11551 
11552                 public Class<?> type() {
11553                     return t;
11554                 }
11555 
11556                 public boolean isOptional() {
11557                     return optional;
11558                 }
11559 
11560                 public Object defaultValue() {
11561                     return defaultValue;
11562                 }
11563         }
11564 
11565         public enum TypeConstraint implements OnnxTypeConstraint {
11566             T(new OnnxType.TypeVariable("T", List.of(OnnxType.tensor(OnnxType.bfloat16()), OnnxType.tensor(OnnxType.float16()), OnnxType.tensor(OnnxType.float32()), OnnxType.tensor(OnnxType.float64())))),
11567             ;
11568 
11569             final OnnxType.TypeVariable typeVariable;
11570 
11571             TypeConstraint(OnnxType.TypeVariable typeVariable) {
11572                 assert typeVariable.name().equals(name());
11573                 this.typeVariable = typeVariable;
11574             }
11575 
11576             @Override
11577             public OnnxType.TypeVariable typeVariable() {
11578                 return typeVariable;
11579             }
11580         }
11581 
11582         public enum InputParameter implements OnnxParameter {
11583             X(TypeConstraint.T.typeVariable(), Quantifier.REQUIRED),
11584             ;
11585 
11586             final OnnxType type;
11587             final Quantifier quantifier;
11588 
11589             InputParameter(OnnxType type, Quantifier quantifier) {
11590                 this.type = type;
11591                 this.quantifier = quantifier;
11592             }
11593 
11594             @Override
11595             public OnnxType type() {
11596                 return type;
11597             }
11598 
11599             @Override
11600             public Quantifier quantifier() {
11601                 return quantifier;
11602             }
11603         }
11604 
11605         public enum OutputParameter implements OnnxParameter {
11606             Y(TypeConstraint.T.typeVariable(), Quantifier.REQUIRED),
11607             ;
11608 
11609             final OnnxType type;
11610             final Quantifier quantifier;
11611 
11612             OutputParameter(OnnxType type, Quantifier quantifier) {
11613                 this.type = type;
11614                 this.quantifier = quantifier;
11615             }
11616 
11617             @Override
11618             public OnnxType type() {
11619                 return type;
11620             }
11621 
11622             @Override
11623             public Quantifier quantifier() {
11624                 return quantifier;
11625             }
11626         }
11627 
11628         public static final OnnxSchema SCHEMA = new OnnxSchemaRecord(
11629                 NAME,
11630                 List.of(Attribute.values()),
11631                 List.of(TypeConstraint.values()),
11632                 List.of(InputParameter.values()),
11633                 List.of(OutputParameter.values())
11634         );
11635 
11636         public HardSigmoid(ExternalizedOp def) {
11637             super(SCHEMA, def);
11638         }
11639 
11640         HardSigmoid(HardSigmoid that, CopyContext cc) {
11641             super(that, cc);
11642         }
11643 
11644         @Override
11645         public HardSigmoid transform(CopyContext cc, OpTransformer ot) {
11646             return new HardSigmoid(this, cc);
11647         }
11648 
11649         HardSigmoid(TypeElement resultType, Value X, java.util.Optional<Float> alpha, java.util.Optional<Float> beta) {
11650             super(SCHEMA, resultType, Set.of(), List.of(X), List.of(alpha, beta));
11651         }
11652 
11653         @Override
11654         public SequencedSet<OnnxParameter> onnxOutputs() {
11655             return onnxOutputs(SCHEMA);
11656         }
11657 
11658         @Override
11659         public SequencedMap<OnnxParameter, Object> onnxInputs() {
11660             return onnxInputs(SCHEMA, List.of(X()));
11661         }
11662 
11663         public Value X() {
11664             return operands().get(0);
11665         }
11666 
11667         public java.util.Optional<Float> alpha() {
11668             Float alpha = Attribute.alpha.access(Float.class, onnxAttributes);
11669             return java.util.Optional.ofNullable(alpha);
11670         }
11671 
11672         public java.util.Optional<Float> beta() {
11673             Float beta = Attribute.beta.access(Float.class, onnxAttributes);
11674             return java.util.Optional.ofNullable(beta);
11675         }
11676 
11677     }
11678 
11679     public static HardSigmoid HardSigmoid(TypeElement resultType, Value X, java.util.Optional<Float> alpha, java.util.Optional<Float> beta) {
11680         return new HardSigmoid(resultType, X, alpha, beta);
11681     }
11682 
11683     @OpFactory.OpDeclaration(HardSwish.NAME)
11684     public static final class HardSwish extends OnnxOp {
11685         public static final String NAME = "HardSwish";
11686 
11687         public enum Attribute implements OnnxAttribute.None { }
11688 
11689         public enum TypeConstraint implements OnnxTypeConstraint {
11690             T(new OnnxType.TypeVariable("T", List.of(OnnxType.tensor(OnnxType.bfloat16()), OnnxType.tensor(OnnxType.float16()), OnnxType.tensor(OnnxType.float32()), OnnxType.tensor(OnnxType.float64())))),
11691             ;
11692 
11693             final OnnxType.TypeVariable typeVariable;
11694 
11695             TypeConstraint(OnnxType.TypeVariable typeVariable) {
11696                 assert typeVariable.name().equals(name());
11697                 this.typeVariable = typeVariable;
11698             }
11699 
11700             @Override
11701             public OnnxType.TypeVariable typeVariable() {
11702                 return typeVariable;
11703             }
11704         }
11705 
11706         public enum InputParameter implements OnnxParameter {
11707             X(TypeConstraint.T.typeVariable(), Quantifier.REQUIRED),
11708             ;
11709 
11710             final OnnxType type;
11711             final Quantifier quantifier;
11712 
11713             InputParameter(OnnxType type, Quantifier quantifier) {
11714                 this.type = type;
11715                 this.quantifier = quantifier;
11716             }
11717 
11718             @Override
11719             public OnnxType type() {
11720                 return type;
11721             }
11722 
11723             @Override
11724             public Quantifier quantifier() {
11725                 return quantifier;
11726             }
11727         }
11728 
11729         public enum OutputParameter implements OnnxParameter {
11730             Y(TypeConstraint.T.typeVariable(), Quantifier.REQUIRED),
11731             ;
11732 
11733             final OnnxType type;
11734             final Quantifier quantifier;
11735 
11736             OutputParameter(OnnxType type, Quantifier quantifier) {
11737                 this.type = type;
11738                 this.quantifier = quantifier;
11739             }
11740 
11741             @Override
11742             public OnnxType type() {
11743                 return type;
11744             }
11745 
11746             @Override
11747             public Quantifier quantifier() {
11748                 return quantifier;
11749             }
11750         }
11751 
11752         public static final OnnxSchema SCHEMA = new OnnxSchemaRecord(
11753                 NAME,
11754                 List.of(Attribute.values()),
11755                 List.of(TypeConstraint.values()),
11756                 List.of(InputParameter.values()),
11757                 List.of(OutputParameter.values())
11758         );
11759 
11760         public HardSwish(ExternalizedOp def) {
11761             super(SCHEMA, def);
11762         }
11763 
11764         HardSwish(HardSwish that, CopyContext cc) {
11765             super(that, cc);
11766         }
11767 
11768         @Override
11769         public HardSwish transform(CopyContext cc, OpTransformer ot) {
11770             return new HardSwish(this, cc);
11771         }
11772 
11773         HardSwish(TypeElement resultType, Value X) {
11774             super(SCHEMA, resultType, Set.of(), List.of(X), List.of());
11775         }
11776 
11777         @Override
11778         public SequencedSet<OnnxParameter> onnxOutputs() {
11779             return onnxOutputs(SCHEMA);
11780         }
11781 
11782         @Override
11783         public SequencedMap<OnnxParameter, Object> onnxInputs() {
11784             return onnxInputs(SCHEMA, List.of(X()));
11785         }
11786 
11787         public Value X() {
11788             return operands().get(0);
11789         }
11790 
11791     }
11792 
11793     public static HardSwish HardSwish(TypeElement resultType, Value X) {
11794         return new HardSwish(resultType, X);
11795     }
11796 
11797     @OpFactory.OpDeclaration(Hardmax.NAME)
11798     public static final class Hardmax extends OnnxOp {
11799         public static final String NAME = "Hardmax";
11800 
11801         public enum Attribute implements OnnxAttribute {
11802             axis(Integer.class, true, -1),
11803             ;
11804 
11805                 final Class<?> t;
11806                 final boolean optional;
11807                 final Object defaultValue;
11808 
11809                 Attribute(Class<?> type, boolean optional, Object defaultValue) {
11810                     this.t = type;
11811                     this.optional = optional;
11812                     this.defaultValue = defaultValue;
11813                     assert optional || defaultValue == null;
11814                 }
11815 
11816                 public Class<?> type() {
11817                     return t;
11818                 }
11819 
11820                 public boolean isOptional() {
11821                     return optional;
11822                 }
11823 
11824                 public Object defaultValue() {
11825                     return defaultValue;
11826                 }
11827         }
11828 
11829         public enum TypeConstraint implements OnnxTypeConstraint {
11830             T(new OnnxType.TypeVariable("T", List.of(OnnxType.tensor(OnnxType.float16()), OnnxType.tensor(OnnxType.float32()), OnnxType.tensor(OnnxType.float64()), OnnxType.tensor(OnnxType.bfloat16())))),
11831             ;
11832 
11833             final OnnxType.TypeVariable typeVariable;
11834 
11835             TypeConstraint(OnnxType.TypeVariable typeVariable) {
11836                 assert typeVariable.name().equals(name());
11837                 this.typeVariable = typeVariable;
11838             }
11839 
11840             @Override
11841             public OnnxType.TypeVariable typeVariable() {
11842                 return typeVariable;
11843             }
11844         }
11845 
11846         public enum InputParameter implements OnnxParameter {
11847             input(TypeConstraint.T.typeVariable(), Quantifier.REQUIRED),
11848             ;
11849 
11850             final OnnxType type;
11851             final Quantifier quantifier;
11852 
11853             InputParameter(OnnxType type, Quantifier quantifier) {
11854                 this.type = type;
11855                 this.quantifier = quantifier;
11856             }
11857 
11858             @Override
11859             public OnnxType type() {
11860                 return type;
11861             }
11862 
11863             @Override
11864             public Quantifier quantifier() {
11865                 return quantifier;
11866             }
11867         }
11868 
11869         public enum OutputParameter implements OnnxParameter {
11870             output(TypeConstraint.T.typeVariable(), Quantifier.REQUIRED),
11871             ;
11872 
11873             final OnnxType type;
11874             final Quantifier quantifier;
11875 
11876             OutputParameter(OnnxType type, Quantifier quantifier) {
11877                 this.type = type;
11878                 this.quantifier = quantifier;
11879             }
11880 
11881             @Override
11882             public OnnxType type() {
11883                 return type;
11884             }
11885 
11886             @Override
11887             public Quantifier quantifier() {
11888                 return quantifier;
11889             }
11890         }
11891 
11892         public static final OnnxSchema SCHEMA = new OnnxSchemaRecord(
11893                 NAME,
11894                 List.of(Attribute.values()),
11895                 List.of(TypeConstraint.values()),
11896                 List.of(InputParameter.values()),
11897                 List.of(OutputParameter.values())
11898         );
11899 
11900         public Hardmax(ExternalizedOp def) {
11901             super(SCHEMA, def);
11902         }
11903 
11904         Hardmax(Hardmax that, CopyContext cc) {
11905             super(that, cc);
11906         }
11907 
11908         @Override
11909         public Hardmax transform(CopyContext cc, OpTransformer ot) {
11910             return new Hardmax(this, cc);
11911         }
11912 
11913         Hardmax(TypeElement resultType, Value input, java.util.Optional<Integer> axis) {
11914             super(SCHEMA, resultType, Set.of(), List.of(input), List.of(axis));
11915         }
11916 
11917         @Override
11918         public SequencedSet<OnnxParameter> onnxOutputs() {
11919             return onnxOutputs(SCHEMA);
11920         }
11921 
11922         @Override
11923         public SequencedMap<OnnxParameter, Object> onnxInputs() {
11924             return onnxInputs(SCHEMA, List.of(input()));
11925         }
11926 
11927         public Value input() {
11928             return operands().get(0);
11929         }
11930 
11931         public java.util.Optional<Integer> axis() {
11932             Integer axis = Attribute.axis.access(Integer.class, onnxAttributes);
11933             return java.util.Optional.ofNullable(axis);
11934         }
11935 
11936     }
11937 
11938     public static Hardmax Hardmax(TypeElement resultType, Value input, java.util.Optional<Integer> axis) {
11939         return new Hardmax(resultType, input, axis);
11940     }
11941 
11942     @OpFactory.OpDeclaration(Identity.NAME)
11943     public static final class Identity extends OnnxOp {
11944         public static final String NAME = "Identity";
11945 
11946         public enum Attribute implements OnnxAttribute.None { }
11947 
11948         public enum TypeConstraint implements OnnxTypeConstraint {
11949             V(new OnnxType.TypeVariable("V", List.of(OnnxType.tensor(OnnxType.uint8()), OnnxType.tensor(OnnxType.uint16()), OnnxType.tensor(OnnxType.uint32()), OnnxType.tensor(OnnxType.uint64()), OnnxType.tensor(OnnxType.int8()), OnnxType.tensor(OnnxType.int16()), OnnxType.tensor(OnnxType.int32()), OnnxType.tensor(OnnxType.int64()), OnnxType.tensor(OnnxType.bfloat16()), OnnxType.tensor(OnnxType.float16()), OnnxType.tensor(OnnxType.float32()), OnnxType.tensor(OnnxType.float64()), OnnxType.tensor(OnnxType.string()), OnnxType.tensor(OnnxType.bool()), OnnxType.tensor(OnnxType.complex64()), OnnxType.tensor(OnnxType.complex128()), OnnxType.tensor(OnnxType.float8e4m3fn()), OnnxType.tensor(OnnxType.float8e4m3fnuz()), OnnxType.tensor(OnnxType.float8e5m2()), OnnxType.tensor(OnnxType.float8e5m2fnuz()), OnnxType.tensor(OnnxType.uint4()), OnnxType.tensor(OnnxType.int4()), OnnxType.tensor(OnnxType.float4e2m1()), OnnxType.seq(OnnxType.tensor(OnnxType.uint8())), OnnxType.seq(OnnxType.tensor(OnnxType.uint16())), OnnxType.seq(OnnxType.tensor(OnnxType.uint32())), OnnxType.seq(OnnxType.tensor(OnnxType.uint64())), OnnxType.seq(OnnxType.tensor(OnnxType.int8())), OnnxType.seq(OnnxType.tensor(OnnxType.int16())), OnnxType.seq(OnnxType.tensor(OnnxType.int32())), OnnxType.seq(OnnxType.tensor(OnnxType.int64())), OnnxType.seq(OnnxType.tensor(OnnxType.float16())), OnnxType.seq(OnnxType.tensor(OnnxType.float32())), OnnxType.seq(OnnxType.tensor(OnnxType.float64())), OnnxType.seq(OnnxType.tensor(OnnxType.string())), OnnxType.seq(OnnxType.tensor(OnnxType.bool())), OnnxType.seq(OnnxType.tensor(OnnxType.complex64())), OnnxType.seq(OnnxType.tensor(OnnxType.complex128())), OnnxType.optional(OnnxType.seq(OnnxType.tensor(OnnxType.uint8()))), OnnxType.optional(OnnxType.seq(OnnxType.tensor(OnnxType.uint16()))), OnnxType.optional(OnnxType.seq(OnnxType.tensor(OnnxType.uint32()))), OnnxType.optional(OnnxType.seq(OnnxType.tensor(OnnxType.uint64()))), OnnxType.optional(OnnxType.seq(OnnxType.tensor(OnnxType.int8()))), OnnxType.optional(OnnxType.seq(OnnxType.tensor(OnnxType.int16()))), OnnxType.optional(OnnxType.seq(OnnxType.tensor(OnnxType.int32()))), OnnxType.optional(OnnxType.seq(OnnxType.tensor(OnnxType.int64()))), OnnxType.optional(OnnxType.seq(OnnxType.tensor(OnnxType.float16()))), OnnxType.optional(OnnxType.seq(OnnxType.tensor(OnnxType.float32()))), OnnxType.optional(OnnxType.seq(OnnxType.tensor(OnnxType.float64()))), OnnxType.optional(OnnxType.seq(OnnxType.tensor(OnnxType.string()))), OnnxType.optional(OnnxType.seq(OnnxType.tensor(OnnxType.bool()))), OnnxType.optional(OnnxType.seq(OnnxType.tensor(OnnxType.complex64()))), OnnxType.optional(OnnxType.seq(OnnxType.tensor(OnnxType.complex128()))), OnnxType.optional(OnnxType.tensor(OnnxType.uint8())), OnnxType.optional(OnnxType.tensor(OnnxType.uint16())), OnnxType.optional(OnnxType.tensor(OnnxType.uint32())), OnnxType.optional(OnnxType.tensor(OnnxType.uint64())), OnnxType.optional(OnnxType.tensor(OnnxType.int8())), OnnxType.optional(OnnxType.tensor(OnnxType.int16())), OnnxType.optional(OnnxType.tensor(OnnxType.int32())), OnnxType.optional(OnnxType.tensor(OnnxType.int64())), OnnxType.optional(OnnxType.tensor(OnnxType.float16())), OnnxType.optional(OnnxType.tensor(OnnxType.float32())), OnnxType.optional(OnnxType.tensor(OnnxType.float64())), OnnxType.optional(OnnxType.tensor(OnnxType.string())), OnnxType.optional(OnnxType.tensor(OnnxType.bool())), OnnxType.optional(OnnxType.tensor(OnnxType.complex64())), OnnxType.optional(OnnxType.tensor(OnnxType.complex128()))))),
11950             ;
11951 
11952             final OnnxType.TypeVariable typeVariable;
11953 
11954             TypeConstraint(OnnxType.TypeVariable typeVariable) {
11955                 assert typeVariable.name().equals(name());
11956                 this.typeVariable = typeVariable;
11957             }
11958 
11959             @Override
11960             public OnnxType.TypeVariable typeVariable() {
11961                 return typeVariable;
11962             }
11963         }
11964 
11965         public enum InputParameter implements OnnxParameter {
11966             input(TypeConstraint.V.typeVariable(), Quantifier.REQUIRED),
11967             ;
11968 
11969             final OnnxType type;
11970             final Quantifier quantifier;
11971 
11972             InputParameter(OnnxType type, Quantifier quantifier) {
11973                 this.type = type;
11974                 this.quantifier = quantifier;
11975             }
11976 
11977             @Override
11978             public OnnxType type() {
11979                 return type;
11980             }
11981 
11982             @Override
11983             public Quantifier quantifier() {
11984                 return quantifier;
11985             }
11986         }
11987 
11988         public enum OutputParameter implements OnnxParameter {
11989             output(TypeConstraint.V.typeVariable(), Quantifier.REQUIRED),
11990             ;
11991 
11992             final OnnxType type;
11993             final Quantifier quantifier;
11994 
11995             OutputParameter(OnnxType type, Quantifier quantifier) {
11996                 this.type = type;
11997                 this.quantifier = quantifier;
11998             }
11999 
12000             @Override
12001             public OnnxType type() {
12002                 return type;
12003             }
12004 
12005             @Override
12006             public Quantifier quantifier() {
12007                 return quantifier;
12008             }
12009         }
12010 
12011         public static final OnnxSchema SCHEMA = new OnnxSchemaRecord(
12012                 NAME,
12013                 List.of(Attribute.values()),
12014                 List.of(TypeConstraint.values()),
12015                 List.of(InputParameter.values()),
12016                 List.of(OutputParameter.values())
12017         );
12018 
12019         public Identity(ExternalizedOp def) {
12020             super(SCHEMA, def);
12021         }
12022 
12023         Identity(Identity that, CopyContext cc) {
12024             super(that, cc);
12025         }
12026 
12027         @Override
12028         public Identity transform(CopyContext cc, OpTransformer ot) {
12029             return new Identity(this, cc);
12030         }
12031 
12032         Identity(TypeElement resultType, Value input) {
12033             super(SCHEMA, resultType, Set.of(), List.of(input), List.of());
12034         }
12035 
12036         @Override
12037         public SequencedSet<OnnxParameter> onnxOutputs() {
12038             return onnxOutputs(SCHEMA);
12039         }
12040 
12041         @Override
12042         public SequencedMap<OnnxParameter, Object> onnxInputs() {
12043             return onnxInputs(SCHEMA, List.of(input()));
12044         }
12045 
12046         public Value input() {
12047             return operands().get(0);
12048         }
12049 
12050     }
12051 
12052     public static Identity Identity(TypeElement resultType, Value input) {
12053         return new Identity(resultType, input);
12054     }
12055 
12056     @OpFactory.OpDeclaration(ImageDecoder.NAME)
12057     public static final class ImageDecoder extends OnnxOp {
12058         public static final String NAME = "ImageDecoder";
12059 
12060         public enum Attribute implements OnnxAttribute {
12061             pixel_format(String.class, true, "RGB"),
12062             ;
12063 
12064                 final Class<?> t;
12065                 final boolean optional;
12066                 final Object defaultValue;
12067 
12068                 Attribute(Class<?> type, boolean optional, Object defaultValue) {
12069                     this.t = type;
12070                     this.optional = optional;
12071                     this.defaultValue = defaultValue;
12072                     assert optional || defaultValue == null;
12073                 }
12074 
12075                 public Class<?> type() {
12076                     return t;
12077                 }
12078 
12079                 public boolean isOptional() {
12080                     return optional;
12081                 }
12082 
12083                 public Object defaultValue() {
12084                     return defaultValue;
12085                 }
12086         }
12087 
12088         public enum TypeConstraint implements OnnxTypeConstraint {
12089             T1(new OnnxType.TypeVariable("T1", List.of(OnnxType.tensor(OnnxType.uint8())))),
12090             T2(new OnnxType.TypeVariable("T2", List.of(OnnxType.tensor(OnnxType.uint8())))),
12091             ;
12092 
12093             final OnnxType.TypeVariable typeVariable;
12094 
12095             TypeConstraint(OnnxType.TypeVariable typeVariable) {
12096                 assert typeVariable.name().equals(name());
12097                 this.typeVariable = typeVariable;
12098             }
12099 
12100             @Override
12101             public OnnxType.TypeVariable typeVariable() {
12102                 return typeVariable;
12103             }
12104         }
12105 
12106         public enum InputParameter implements OnnxParameter {
12107             encoded_stream(TypeConstraint.T1.typeVariable(), Quantifier.REQUIRED),
12108             ;
12109 
12110             final OnnxType type;
12111             final Quantifier quantifier;
12112 
12113             InputParameter(OnnxType type, Quantifier quantifier) {
12114                 this.type = type;
12115                 this.quantifier = quantifier;
12116             }
12117 
12118             @Override
12119             public OnnxType type() {
12120                 return type;
12121             }
12122 
12123             @Override
12124             public Quantifier quantifier() {
12125                 return quantifier;
12126             }
12127         }
12128 
12129         public enum OutputParameter implements OnnxParameter {
12130             image(TypeConstraint.T2.typeVariable(), Quantifier.REQUIRED),
12131             ;
12132 
12133             final OnnxType type;
12134             final Quantifier quantifier;
12135 
12136             OutputParameter(OnnxType type, Quantifier quantifier) {
12137                 this.type = type;
12138                 this.quantifier = quantifier;
12139             }
12140 
12141             @Override
12142             public OnnxType type() {
12143                 return type;
12144             }
12145 
12146             @Override
12147             public Quantifier quantifier() {
12148                 return quantifier;
12149             }
12150         }
12151 
12152         public static final OnnxSchema SCHEMA = new OnnxSchemaRecord(
12153                 NAME,
12154                 List.of(Attribute.values()),
12155                 List.of(TypeConstraint.values()),
12156                 List.of(InputParameter.values()),
12157                 List.of(OutputParameter.values())
12158         );
12159 
12160         public ImageDecoder(ExternalizedOp def) {
12161             super(SCHEMA, def);
12162         }
12163 
12164         ImageDecoder(ImageDecoder that, CopyContext cc) {
12165             super(that, cc);
12166         }
12167 
12168         @Override
12169         public ImageDecoder transform(CopyContext cc, OpTransformer ot) {
12170             return new ImageDecoder(this, cc);
12171         }
12172 
12173         ImageDecoder(TypeElement resultType, Value encoded_stream, java.util.Optional<String> pixel_format) {
12174             super(SCHEMA, resultType, Set.of(), List.of(encoded_stream), List.of(pixel_format));
12175         }
12176 
12177         @Override
12178         public SequencedSet<OnnxParameter> onnxOutputs() {
12179             return onnxOutputs(SCHEMA);
12180         }
12181 
12182         @Override
12183         public SequencedMap<OnnxParameter, Object> onnxInputs() {
12184             return onnxInputs(SCHEMA, List.of(encoded_stream()));
12185         }
12186 
12187         public Value encoded_stream() {
12188             return operands().get(0);
12189         }
12190 
12191         public java.util.Optional<String> pixel_format() {
12192             String pixel_format = Attribute.pixel_format.access(String.class, onnxAttributes);
12193             return java.util.Optional.ofNullable(pixel_format);
12194         }
12195 
12196     }
12197 
12198     public static ImageDecoder ImageDecoder(TypeElement resultType, Value encoded_stream, java.util.Optional<String> pixel_format) {
12199         return new ImageDecoder(resultType, encoded_stream, pixel_format);
12200     }
12201 
12202     @OpFactory.OpDeclaration(Imputer.NAME)
12203     public static final class Imputer extends OnnxOp {
12204         public static final String NAME = "Imputer";
12205 
12206         public enum Attribute implements OnnxAttribute {
12207             replaced_value_int64(Integer.class, true, 0),
12208             replaced_value_float(Float.class, true, 0.0f),
12209             imputed_value_int64s(int[].class, true, null),
12210             imputed_value_floats(float[].class, true, null),
12211             ;
12212 
12213                 final Class<?> t;
12214                 final boolean optional;
12215                 final Object defaultValue;
12216 
12217                 Attribute(Class<?> type, boolean optional, Object defaultValue) {
12218                     this.t = type;
12219                     this.optional = optional;
12220                     this.defaultValue = defaultValue;
12221                     assert optional || defaultValue == null;
12222                 }
12223 
12224                 public Class<?> type() {
12225                     return t;
12226                 }
12227 
12228                 public boolean isOptional() {
12229                     return optional;
12230                 }
12231 
12232                 public Object defaultValue() {
12233                     return defaultValue;
12234                 }
12235         }
12236 
12237         public enum TypeConstraint implements OnnxTypeConstraint {
12238             T(new OnnxType.TypeVariable("T", List.of(OnnxType.tensor(OnnxType.float32()), OnnxType.tensor(OnnxType.float64()), OnnxType.tensor(OnnxType.int64()), OnnxType.tensor(OnnxType.int32())))),
12239             ;
12240 
12241             final OnnxType.TypeVariable typeVariable;
12242 
12243             TypeConstraint(OnnxType.TypeVariable typeVariable) {
12244                 assert typeVariable.name().equals(name());
12245                 this.typeVariable = typeVariable;
12246             }
12247 
12248             @Override
12249             public OnnxType.TypeVariable typeVariable() {
12250                 return typeVariable;
12251             }
12252         }
12253 
12254         public enum InputParameter implements OnnxParameter {
12255             X(TypeConstraint.T.typeVariable(), Quantifier.REQUIRED),
12256             ;
12257 
12258             final OnnxType type;
12259             final Quantifier quantifier;
12260 
12261             InputParameter(OnnxType type, Quantifier quantifier) {
12262                 this.type = type;
12263                 this.quantifier = quantifier;
12264             }
12265 
12266             @Override
12267             public OnnxType type() {
12268                 return type;
12269             }
12270 
12271             @Override
12272             public Quantifier quantifier() {
12273                 return quantifier;
12274             }
12275         }
12276 
12277         public enum OutputParameter implements OnnxParameter {
12278             Y(TypeConstraint.T.typeVariable(), Quantifier.REQUIRED),
12279             ;
12280 
12281             final OnnxType type;
12282             final Quantifier quantifier;
12283 
12284             OutputParameter(OnnxType type, Quantifier quantifier) {
12285                 this.type = type;
12286                 this.quantifier = quantifier;
12287             }
12288 
12289             @Override
12290             public OnnxType type() {
12291                 return type;
12292             }
12293 
12294             @Override
12295             public Quantifier quantifier() {
12296                 return quantifier;
12297             }
12298         }
12299 
12300         public static final OnnxSchema SCHEMA = new OnnxSchemaRecord(
12301                 NAME,
12302                 List.of(Attribute.values()),
12303                 List.of(TypeConstraint.values()),
12304                 List.of(InputParameter.values()),
12305                 List.of(OutputParameter.values())
12306         );
12307 
12308         public Imputer(ExternalizedOp def) {
12309             super(SCHEMA, def);
12310         }
12311 
12312         Imputer(Imputer that, CopyContext cc) {
12313             super(that, cc);
12314         }
12315 
12316         @Override
12317         public Imputer transform(CopyContext cc, OpTransformer ot) {
12318             return new Imputer(this, cc);
12319         }
12320 
12321         Imputer(TypeElement resultType, Value X, java.util.Optional<Integer> replaced_value_int64, java.util.Optional<Float> replaced_value_float, java.util.Optional<int[]> imputed_value_int64s, java.util.Optional<float[]> imputed_value_floats) {
12322             super(SCHEMA, resultType, Set.of(), List.of(X), List.of(replaced_value_int64, replaced_value_float, imputed_value_int64s, imputed_value_floats));
12323         }
12324 
12325         @Override
12326         public SequencedSet<OnnxParameter> onnxOutputs() {
12327             return onnxOutputs(SCHEMA);
12328         }
12329 
12330         @Override
12331         public SequencedMap<OnnxParameter, Object> onnxInputs() {
12332             return onnxInputs(SCHEMA, List.of(X()));
12333         }
12334 
12335         public Value X() {
12336             return operands().get(0);
12337         }
12338 
12339         public java.util.Optional<Integer> replaced_value_int64() {
12340             Integer replaced_value_int64 = Attribute.replaced_value_int64.access(Integer.class, onnxAttributes);
12341             return java.util.Optional.ofNullable(replaced_value_int64);
12342         }
12343 
12344         public java.util.Optional<Float> replaced_value_float() {
12345             Float replaced_value_float = Attribute.replaced_value_float.access(Float.class, onnxAttributes);
12346             return java.util.Optional.ofNullable(replaced_value_float);
12347         }
12348 
12349         public java.util.Optional<int[]> imputed_value_int64s() {
12350             int[] imputed_value_int64s = Attribute.imputed_value_int64s.access(int[].class, onnxAttributes);
12351             return java.util.Optional.ofNullable(imputed_value_int64s).map(int[]::clone);
12352         }
12353 
12354         public java.util.Optional<float[]> imputed_value_floats() {
12355             float[] imputed_value_floats = Attribute.imputed_value_floats.access(float[].class, onnxAttributes);
12356             return java.util.Optional.ofNullable(imputed_value_floats).map(float[]::clone);
12357         }
12358 
12359     }
12360 
12361     public static Imputer Imputer(TypeElement resultType, Value X, java.util.Optional<Integer> replaced_value_int64, java.util.Optional<Float> replaced_value_float, java.util.Optional<int[]> imputed_value_int64s, java.util.Optional<float[]> imputed_value_floats) {
12362         return new Imputer(resultType, X, replaced_value_int64, replaced_value_float, imputed_value_int64s, imputed_value_floats);
12363     }
12364 
12365     @OpFactory.OpDeclaration(InstanceNormalization.NAME)
12366     public static final class InstanceNormalization extends OnnxOp {
12367         public static final String NAME = "InstanceNormalization";
12368 
12369         public enum Attribute implements OnnxAttribute {
12370             epsilon(Float.class, true, 1.0E-5f),
12371             ;
12372 
12373                 final Class<?> t;
12374                 final boolean optional;
12375                 final Object defaultValue;
12376 
12377                 Attribute(Class<?> type, boolean optional, Object defaultValue) {
12378                     this.t = type;
12379                     this.optional = optional;
12380                     this.defaultValue = defaultValue;
12381                     assert optional || defaultValue == null;
12382                 }
12383 
12384                 public Class<?> type() {
12385                     return t;
12386                 }
12387 
12388                 public boolean isOptional() {
12389                     return optional;
12390                 }
12391 
12392                 public Object defaultValue() {
12393                     return defaultValue;
12394                 }
12395         }
12396 
12397         public enum TypeConstraint implements OnnxTypeConstraint {
12398             T(new OnnxType.TypeVariable("T", List.of(OnnxType.tensor(OnnxType.bfloat16()), OnnxType.tensor(OnnxType.float16()), OnnxType.tensor(OnnxType.float32()), OnnxType.tensor(OnnxType.float64())))),
12399             ;
12400 
12401             final OnnxType.TypeVariable typeVariable;
12402 
12403             TypeConstraint(OnnxType.TypeVariable typeVariable) {
12404                 assert typeVariable.name().equals(name());
12405                 this.typeVariable = typeVariable;
12406             }
12407 
12408             @Override
12409             public OnnxType.TypeVariable typeVariable() {
12410                 return typeVariable;
12411             }
12412         }
12413 
12414         public enum InputParameter implements OnnxParameter {
12415             input(TypeConstraint.T.typeVariable(), Quantifier.REQUIRED),
12416             scale(TypeConstraint.T.typeVariable(), Quantifier.REQUIRED),
12417             B(TypeConstraint.T.typeVariable(), Quantifier.REQUIRED),
12418             ;
12419 
12420             final OnnxType type;
12421             final Quantifier quantifier;
12422 
12423             InputParameter(OnnxType type, Quantifier quantifier) {
12424                 this.type = type;
12425                 this.quantifier = quantifier;
12426             }
12427 
12428             @Override
12429             public OnnxType type() {
12430                 return type;
12431             }
12432 
12433             @Override
12434             public Quantifier quantifier() {
12435                 return quantifier;
12436             }
12437         }
12438 
12439         public enum OutputParameter implements OnnxParameter {
12440             output(TypeConstraint.T.typeVariable(), Quantifier.REQUIRED),
12441             ;
12442 
12443             final OnnxType type;
12444             final Quantifier quantifier;
12445 
12446             OutputParameter(OnnxType type, Quantifier quantifier) {
12447                 this.type = type;
12448                 this.quantifier = quantifier;
12449             }
12450 
12451             @Override
12452             public OnnxType type() {
12453                 return type;
12454             }
12455 
12456             @Override
12457             public Quantifier quantifier() {
12458                 return quantifier;
12459             }
12460         }
12461 
12462         public static final OnnxSchema SCHEMA = new OnnxSchemaRecord(
12463                 NAME,
12464                 List.of(Attribute.values()),
12465                 List.of(TypeConstraint.values()),
12466                 List.of(InputParameter.values()),
12467                 List.of(OutputParameter.values())
12468         );
12469 
12470         public InstanceNormalization(ExternalizedOp def) {
12471             super(SCHEMA, def);
12472         }
12473 
12474         InstanceNormalization(InstanceNormalization that, CopyContext cc) {
12475             super(that, cc);
12476         }
12477 
12478         @Override
12479         public InstanceNormalization transform(CopyContext cc, OpTransformer ot) {
12480             return new InstanceNormalization(this, cc);
12481         }
12482 
12483         InstanceNormalization(TypeElement resultType, Value input, Value scale, Value B, java.util.Optional<Float> epsilon) {
12484             super(SCHEMA, resultType, Set.of(), List.of(input, scale, B), List.of(epsilon));
12485         }
12486 
12487         @Override
12488         public SequencedSet<OnnxParameter> onnxOutputs() {
12489             return onnxOutputs(SCHEMA);
12490         }
12491 
12492         @Override
12493         public SequencedMap<OnnxParameter, Object> onnxInputs() {
12494             return onnxInputs(SCHEMA, List.of(input(), scale(), B()));
12495         }
12496 
12497         public Value input() {
12498             return operands().get(0);
12499         }
12500 
12501         public Value scale() {
12502             return operands().get(1);
12503         }
12504 
12505         public Value B() {
12506             return operands().get(2);
12507         }
12508 
12509         public java.util.Optional<Float> epsilon() {
12510             Float epsilon = Attribute.epsilon.access(Float.class, onnxAttributes);
12511             return java.util.Optional.ofNullable(epsilon);
12512         }
12513 
12514     }
12515 
12516     public static InstanceNormalization InstanceNormalization(TypeElement resultType, Value input, Value scale, Value B, java.util.Optional<Float> epsilon) {
12517         return new InstanceNormalization(resultType, input, scale, B, epsilon);
12518     }
12519 
12520     @OpFactory.OpDeclaration(IsInf.NAME)
12521     public static final class IsInf extends OnnxOp {
12522         public static final String NAME = "IsInf";
12523 
12524         public enum Attribute implements OnnxAttribute {
12525             detect_negative(Integer.class, true, 1),
12526             detect_positive(Integer.class, true, 1),
12527             ;
12528 
12529                 final Class<?> t;
12530                 final boolean optional;
12531                 final Object defaultValue;
12532 
12533                 Attribute(Class<?> type, boolean optional, Object defaultValue) {
12534                     this.t = type;
12535                     this.optional = optional;
12536                     this.defaultValue = defaultValue;
12537                     assert optional || defaultValue == null;
12538                 }
12539 
12540                 public Class<?> type() {
12541                     return t;
12542                 }
12543 
12544                 public boolean isOptional() {
12545                     return optional;
12546                 }
12547 
12548                 public Object defaultValue() {
12549                     return defaultValue;
12550                 }
12551         }
12552 
12553         public enum TypeConstraint implements OnnxTypeConstraint {
12554             T1(new OnnxType.TypeVariable("T1", List.of(OnnxType.tensor(OnnxType.bfloat16()), OnnxType.tensor(OnnxType.float16()), OnnxType.tensor(OnnxType.float32()), OnnxType.tensor(OnnxType.float64()), OnnxType.tensor(OnnxType.float8e4m3fn()), OnnxType.tensor(OnnxType.float8e4m3fnuz()), OnnxType.tensor(OnnxType.float8e5m2()), OnnxType.tensor(OnnxType.float8e5m2fnuz())))),
12555             T2(new OnnxType.TypeVariable("T2", List.of(OnnxType.tensor(OnnxType.bool())))),
12556             ;
12557 
12558             final OnnxType.TypeVariable typeVariable;
12559 
12560             TypeConstraint(OnnxType.TypeVariable typeVariable) {
12561                 assert typeVariable.name().equals(name());
12562                 this.typeVariable = typeVariable;
12563             }
12564 
12565             @Override
12566             public OnnxType.TypeVariable typeVariable() {
12567                 return typeVariable;
12568             }
12569         }
12570 
12571         public enum InputParameter implements OnnxParameter {
12572             X(TypeConstraint.T1.typeVariable(), Quantifier.REQUIRED),
12573             ;
12574 
12575             final OnnxType type;
12576             final Quantifier quantifier;
12577 
12578             InputParameter(OnnxType type, Quantifier quantifier) {
12579                 this.type = type;
12580                 this.quantifier = quantifier;
12581             }
12582 
12583             @Override
12584             public OnnxType type() {
12585                 return type;
12586             }
12587 
12588             @Override
12589             public Quantifier quantifier() {
12590                 return quantifier;
12591             }
12592         }
12593 
12594         public enum OutputParameter implements OnnxParameter {
12595             Y(TypeConstraint.T2.typeVariable(), Quantifier.REQUIRED),
12596             ;
12597 
12598             final OnnxType type;
12599             final Quantifier quantifier;
12600 
12601             OutputParameter(OnnxType type, Quantifier quantifier) {
12602                 this.type = type;
12603                 this.quantifier = quantifier;
12604             }
12605 
12606             @Override
12607             public OnnxType type() {
12608                 return type;
12609             }
12610 
12611             @Override
12612             public Quantifier quantifier() {
12613                 return quantifier;
12614             }
12615         }
12616 
12617         public static final OnnxSchema SCHEMA = new OnnxSchemaRecord(
12618                 NAME,
12619                 List.of(Attribute.values()),
12620                 List.of(TypeConstraint.values()),
12621                 List.of(InputParameter.values()),
12622                 List.of(OutputParameter.values())
12623         );
12624 
12625         public IsInf(ExternalizedOp def) {
12626             super(SCHEMA, def);
12627         }
12628 
12629         IsInf(IsInf that, CopyContext cc) {
12630             super(that, cc);
12631         }
12632 
12633         @Override
12634         public IsInf transform(CopyContext cc, OpTransformer ot) {
12635             return new IsInf(this, cc);
12636         }
12637 
12638         IsInf(TypeElement resultType, Value X, java.util.Optional<Integer> detect_negative, java.util.Optional<Integer> detect_positive) {
12639             super(SCHEMA, resultType, Set.of(), List.of(X), List.of(detect_negative, detect_positive));
12640         }
12641 
12642         @Override
12643         public SequencedSet<OnnxParameter> onnxOutputs() {
12644             return onnxOutputs(SCHEMA);
12645         }
12646 
12647         @Override
12648         public SequencedMap<OnnxParameter, Object> onnxInputs() {
12649             return onnxInputs(SCHEMA, List.of(X()));
12650         }
12651 
12652         public Value X() {
12653             return operands().get(0);
12654         }
12655 
12656         public java.util.Optional<Integer> detect_negative() {
12657             Integer detect_negative = Attribute.detect_negative.access(Integer.class, onnxAttributes);
12658             return java.util.Optional.ofNullable(detect_negative);
12659         }
12660 
12661         public java.util.Optional<Integer> detect_positive() {
12662             Integer detect_positive = Attribute.detect_positive.access(Integer.class, onnxAttributes);
12663             return java.util.Optional.ofNullable(detect_positive);
12664         }
12665 
12666     }
12667 
12668     public static IsInf IsInf(TypeElement resultType, Value X, java.util.Optional<Integer> detect_negative, java.util.Optional<Integer> detect_positive) {
12669         return new IsInf(resultType, X, detect_negative, detect_positive);
12670     }
12671 
12672     @OpFactory.OpDeclaration(IsNaN.NAME)
12673     public static final class IsNaN extends OnnxOp {
12674         public static final String NAME = "IsNaN";
12675 
12676         public enum Attribute implements OnnxAttribute.None { }
12677 
12678         public enum TypeConstraint implements OnnxTypeConstraint {
12679             T1(new OnnxType.TypeVariable("T1", List.of(OnnxType.tensor(OnnxType.bfloat16()), OnnxType.tensor(OnnxType.float16()), OnnxType.tensor(OnnxType.float32()), OnnxType.tensor(OnnxType.float64()), OnnxType.tensor(OnnxType.float8e4m3fn()), OnnxType.tensor(OnnxType.float8e4m3fnuz()), OnnxType.tensor(OnnxType.float8e5m2()), OnnxType.tensor(OnnxType.float8e5m2fnuz())))),
12680             T2(new OnnxType.TypeVariable("T2", List.of(OnnxType.tensor(OnnxType.bool())))),
12681             ;
12682 
12683             final OnnxType.TypeVariable typeVariable;
12684 
12685             TypeConstraint(OnnxType.TypeVariable typeVariable) {
12686                 assert typeVariable.name().equals(name());
12687                 this.typeVariable = typeVariable;
12688             }
12689 
12690             @Override
12691             public OnnxType.TypeVariable typeVariable() {
12692                 return typeVariable;
12693             }
12694         }
12695 
12696         public enum InputParameter implements OnnxParameter {
12697             X(TypeConstraint.T1.typeVariable(), Quantifier.REQUIRED),
12698             ;
12699 
12700             final OnnxType type;
12701             final Quantifier quantifier;
12702 
12703             InputParameter(OnnxType type, Quantifier quantifier) {
12704                 this.type = type;
12705                 this.quantifier = quantifier;
12706             }
12707 
12708             @Override
12709             public OnnxType type() {
12710                 return type;
12711             }
12712 
12713             @Override
12714             public Quantifier quantifier() {
12715                 return quantifier;
12716             }
12717         }
12718 
12719         public enum OutputParameter implements OnnxParameter {
12720             Y(TypeConstraint.T2.typeVariable(), Quantifier.REQUIRED),
12721             ;
12722 
12723             final OnnxType type;
12724             final Quantifier quantifier;
12725 
12726             OutputParameter(OnnxType type, Quantifier quantifier) {
12727                 this.type = type;
12728                 this.quantifier = quantifier;
12729             }
12730 
12731             @Override
12732             public OnnxType type() {
12733                 return type;
12734             }
12735 
12736             @Override
12737             public Quantifier quantifier() {
12738                 return quantifier;
12739             }
12740         }
12741 
12742         public static final OnnxSchema SCHEMA = new OnnxSchemaRecord(
12743                 NAME,
12744                 List.of(Attribute.values()),
12745                 List.of(TypeConstraint.values()),
12746                 List.of(InputParameter.values()),
12747                 List.of(OutputParameter.values())
12748         );
12749 
12750         public IsNaN(ExternalizedOp def) {
12751             super(SCHEMA, def);
12752         }
12753 
12754         IsNaN(IsNaN that, CopyContext cc) {
12755             super(that, cc);
12756         }
12757 
12758         @Override
12759         public IsNaN transform(CopyContext cc, OpTransformer ot) {
12760             return new IsNaN(this, cc);
12761         }
12762 
12763         IsNaN(TypeElement resultType, Value X) {
12764             super(SCHEMA, resultType, Set.of(), List.of(X), List.of());
12765         }
12766 
12767         @Override
12768         public SequencedSet<OnnxParameter> onnxOutputs() {
12769             return onnxOutputs(SCHEMA);
12770         }
12771 
12772         @Override
12773         public SequencedMap<OnnxParameter, Object> onnxInputs() {
12774             return onnxInputs(SCHEMA, List.of(X()));
12775         }
12776 
12777         public Value X() {
12778             return operands().get(0);
12779         }
12780 
12781     }
12782 
12783     public static IsNaN IsNaN(TypeElement resultType, Value X) {
12784         return new IsNaN(resultType, X);
12785     }
12786 
12787     @OpFactory.OpDeclaration(LRN.NAME)
12788     public static final class LRN extends OnnxOp {
12789         public static final String NAME = "LRN";
12790 
12791         public enum Attribute implements OnnxAttribute {
12792             size(Integer.class, false, null),
12793             alpha(Float.class, true, 1.0E-4f),
12794             bias(Float.class, true, 1.0f),
12795             beta(Float.class, true, 0.75f),
12796             ;
12797 
12798                 final Class<?> t;
12799                 final boolean optional;
12800                 final Object defaultValue;
12801 
12802                 Attribute(Class<?> type, boolean optional, Object defaultValue) {
12803                     this.t = type;
12804                     this.optional = optional;
12805                     this.defaultValue = defaultValue;
12806                     assert optional || defaultValue == null;
12807                 }
12808 
12809                 public Class<?> type() {
12810                     return t;
12811                 }
12812 
12813                 public boolean isOptional() {
12814                     return optional;
12815                 }
12816 
12817                 public Object defaultValue() {
12818                     return defaultValue;
12819                 }
12820         }
12821 
12822         public enum TypeConstraint implements OnnxTypeConstraint {
12823             T(new OnnxType.TypeVariable("T", List.of(OnnxType.tensor(OnnxType.float16()), OnnxType.tensor(OnnxType.float32()), OnnxType.tensor(OnnxType.float64()), OnnxType.tensor(OnnxType.bfloat16())))),
12824             ;
12825 
12826             final OnnxType.TypeVariable typeVariable;
12827 
12828             TypeConstraint(OnnxType.TypeVariable typeVariable) {
12829                 assert typeVariable.name().equals(name());
12830                 this.typeVariable = typeVariable;
12831             }
12832 
12833             @Override
12834             public OnnxType.TypeVariable typeVariable() {
12835                 return typeVariable;
12836             }
12837         }
12838 
12839         public enum InputParameter implements OnnxParameter {
12840             X(TypeConstraint.T.typeVariable(), Quantifier.REQUIRED),
12841             ;
12842 
12843             final OnnxType type;
12844             final Quantifier quantifier;
12845 
12846             InputParameter(OnnxType type, Quantifier quantifier) {
12847                 this.type = type;
12848                 this.quantifier = quantifier;
12849             }
12850 
12851             @Override
12852             public OnnxType type() {
12853                 return type;
12854             }
12855 
12856             @Override
12857             public Quantifier quantifier() {
12858                 return quantifier;
12859             }
12860         }
12861 
12862         public enum OutputParameter implements OnnxParameter {
12863             Y(TypeConstraint.T.typeVariable(), Quantifier.REQUIRED),
12864             ;
12865 
12866             final OnnxType type;
12867             final Quantifier quantifier;
12868 
12869             OutputParameter(OnnxType type, Quantifier quantifier) {
12870                 this.type = type;
12871                 this.quantifier = quantifier;
12872             }
12873 
12874             @Override
12875             public OnnxType type() {
12876                 return type;
12877             }
12878 
12879             @Override
12880             public Quantifier quantifier() {
12881                 return quantifier;
12882             }
12883         }
12884 
12885         public static final OnnxSchema SCHEMA = new OnnxSchemaRecord(
12886                 NAME,
12887                 List.of(Attribute.values()),
12888                 List.of(TypeConstraint.values()),
12889                 List.of(InputParameter.values()),
12890                 List.of(OutputParameter.values())
12891         );
12892 
12893         public LRN(ExternalizedOp def) {
12894             super(SCHEMA, def);
12895         }
12896 
12897         LRN(LRN that, CopyContext cc) {
12898             super(that, cc);
12899         }
12900 
12901         @Override
12902         public LRN transform(CopyContext cc, OpTransformer ot) {
12903             return new LRN(this, cc);
12904         }
12905 
12906         LRN(TypeElement resultType, Value X, int size, java.util.Optional<Float> alpha, java.util.Optional<Float> bias, java.util.Optional<Float> beta) {
12907             super(SCHEMA, resultType, Set.of(), List.of(X), List.of(size, alpha, bias, beta));
12908         }
12909 
12910         @Override
12911         public SequencedSet<OnnxParameter> onnxOutputs() {
12912             return onnxOutputs(SCHEMA);
12913         }
12914 
12915         @Override
12916         public SequencedMap<OnnxParameter, Object> onnxInputs() {
12917             return onnxInputs(SCHEMA, List.of(X()));
12918         }
12919 
12920         public Value X() {
12921             return operands().get(0);
12922         }
12923 
12924         public int size() {
12925             int size = Attribute.size.access(int.class, onnxAttributes);
12926             return size;
12927         }
12928 
12929         public java.util.Optional<Float> alpha() {
12930             Float alpha = Attribute.alpha.access(Float.class, onnxAttributes);
12931             return java.util.Optional.ofNullable(alpha);
12932         }
12933 
12934         public java.util.Optional<Float> bias() {
12935             Float bias = Attribute.bias.access(Float.class, onnxAttributes);
12936             return java.util.Optional.ofNullable(bias);
12937         }
12938 
12939         public java.util.Optional<Float> beta() {
12940             Float beta = Attribute.beta.access(Float.class, onnxAttributes);
12941             return java.util.Optional.ofNullable(beta);
12942         }
12943 
12944     }
12945 
12946     public static LRN LRN(TypeElement resultType, Value X, int size, java.util.Optional<Float> alpha, java.util.Optional<Float> bias, java.util.Optional<Float> beta) {
12947         return new LRN(resultType, X, size, alpha, bias, beta);
12948     }
12949 
12950     @OpFactory.OpDeclaration(LSTM.NAME)
12951     public static final class LSTM extends OnnxOp {
12952         public static final String NAME = "LSTM";
12953 
12954         public enum Attribute implements OnnxAttribute {
12955             layout(Integer.class, true, 0),
12956             input_forget(Integer.class, true, 0),
12957             activation_alpha(float[].class, true, null),
12958             hidden_size(Integer.class, true, null),
12959             activation_beta(float[].class, true, null),
12960             activations(String[].class, true, null),
12961             clip(Float.class, true, null),
12962             direction(String.class, true, "forward"),
12963             ;
12964 
12965                 final Class<?> t;
12966                 final boolean optional;
12967                 final Object defaultValue;
12968 
12969                 Attribute(Class<?> type, boolean optional, Object defaultValue) {
12970                     this.t = type;
12971                     this.optional = optional;
12972                     this.defaultValue = defaultValue;
12973                     assert optional || defaultValue == null;
12974                 }
12975 
12976                 public Class<?> type() {
12977                     return t;
12978                 }
12979 
12980                 public boolean isOptional() {
12981                     return optional;
12982                 }
12983 
12984                 public Object defaultValue() {
12985                     return defaultValue;
12986                 }
12987         }
12988 
12989         public enum TypeConstraint implements OnnxTypeConstraint {
12990             T(new OnnxType.TypeVariable("T", List.of(OnnxType.tensor(OnnxType.bfloat16()), OnnxType.tensor(OnnxType.float16()), OnnxType.tensor(OnnxType.float32()), OnnxType.tensor(OnnxType.float64())))),
12991             T1(new OnnxType.TypeVariable("T1", List.of(OnnxType.tensor(OnnxType.int32())))),
12992             ;
12993 
12994             final OnnxType.TypeVariable typeVariable;
12995 
12996             TypeConstraint(OnnxType.TypeVariable typeVariable) {
12997                 assert typeVariable.name().equals(name());
12998                 this.typeVariable = typeVariable;
12999             }
13000 
13001             @Override
13002             public OnnxType.TypeVariable typeVariable() {
13003                 return typeVariable;
13004             }
13005         }
13006 
13007         public enum InputParameter implements OnnxParameter {
13008             X(TypeConstraint.T.typeVariable(), Quantifier.REQUIRED),
13009             W(TypeConstraint.T.typeVariable(), Quantifier.REQUIRED),
13010             R(TypeConstraint.T.typeVariable(), Quantifier.REQUIRED),
13011             B(TypeConstraint.T.typeVariable(), Quantifier.OPTIONAL),
13012             sequence_lens(TypeConstraint.T1.typeVariable(), Quantifier.OPTIONAL),
13013             initial_h(TypeConstraint.T.typeVariable(), Quantifier.OPTIONAL),
13014             initial_c(TypeConstraint.T.typeVariable(), Quantifier.OPTIONAL),
13015             P(TypeConstraint.T.typeVariable(), Quantifier.OPTIONAL),
13016             ;
13017 
13018             final OnnxType type;
13019             final Quantifier quantifier;
13020 
13021             InputParameter(OnnxType type, Quantifier quantifier) {
13022                 this.type = type;
13023                 this.quantifier = quantifier;
13024             }
13025 
13026             @Override
13027             public OnnxType type() {
13028                 return type;
13029             }
13030 
13031             @Override
13032             public Quantifier quantifier() {
13033                 return quantifier;
13034             }
13035         }
13036 
13037         public enum OutputParameter implements OnnxParameter {
13038             Y(TypeConstraint.T.typeVariable(), Quantifier.OPTIONAL),
13039             Y_h(TypeConstraint.T.typeVariable(), Quantifier.OPTIONAL),
13040             Y_c(TypeConstraint.T.typeVariable(), Quantifier.OPTIONAL),
13041             ;
13042 
13043             final OnnxType type;
13044             final Quantifier quantifier;
13045 
13046             OutputParameter(OnnxType type, Quantifier quantifier) {
13047                 this.type = type;
13048                 this.quantifier = quantifier;
13049             }
13050 
13051             @Override
13052             public OnnxType type() {
13053                 return type;
13054             }
13055 
13056             @Override
13057             public Quantifier quantifier() {
13058                 return quantifier;
13059             }
13060         }
13061 
13062         public static final OnnxSchema SCHEMA = new OnnxSchemaRecord(
13063                 NAME,
13064                 List.of(Attribute.values()),
13065                 List.of(TypeConstraint.values()),
13066                 List.of(InputParameter.values()),
13067                 List.of(OutputParameter.values())
13068         );
13069 
13070         public LSTM(ExternalizedOp def) {
13071             super(SCHEMA, def);
13072         }
13073 
13074         LSTM(LSTM that, CopyContext cc) {
13075             super(that, cc);
13076         }
13077 
13078         @Override
13079         public LSTM transform(CopyContext cc, OpTransformer ot) {
13080             return new LSTM(this, cc);
13081         }
13082 
13083         LSTM(TypeElement resultType, Set<OutputParameter> optionalOutputs, Value X, Value W, Value R, java.util.Optional<Value> B, java.util.Optional<Value> sequence_lens, java.util.Optional<Value> initial_h, java.util.Optional<Value> initial_c, java.util.Optional<Value> P, java.util.Optional<Integer> layout, java.util.Optional<Integer> input_forget, java.util.Optional<float[]> activation_alpha, java.util.Optional<Integer> hidden_size, java.util.Optional<float[]> activation_beta, java.util.Optional<String[]> activations, java.util.Optional<Float> clip, java.util.Optional<String> direction) {
13084             super(SCHEMA, resultType, optionalOutputs, List.of(X, W, R, B, sequence_lens, initial_h, initial_c, P), List.of(layout, input_forget, activation_alpha, hidden_size, activation_beta, activations, clip, direction));
13085         }
13086 
13087         @Override
13088         public SequencedSet<OnnxParameter> onnxOutputs() {
13089             return onnxOutputs(SCHEMA);
13090         }
13091 
13092         @Override
13093         public SequencedMap<OnnxParameter, Object> onnxInputs() {
13094             return onnxInputs(SCHEMA, List.of(X(), W(), R(), B(), sequence_lens(), initial_h(), initial_c(), P()));
13095         }
13096 
13097         public Value X() {
13098             return operands().get(0);
13099         }
13100 
13101         public Value W() {
13102             return operands().get(1);
13103         }
13104 
13105         public Value R() {
13106             return operands().get(2);
13107         }
13108 
13109         public java.util.Optional<Value> B() {
13110             int i = optionalInputArguments.indexOf(InputParameter.B);
13111             return i != -1 ? java.util.Optional.of(operands().get(3 + i)) : java.util.Optional.empty();
13112         }
13113 
13114         public java.util.Optional<Value> sequence_lens() {
13115             int i = optionalInputArguments.indexOf(InputParameter.sequence_lens);
13116             return i != -1 ? java.util.Optional.of(operands().get(3 + i)) : java.util.Optional.empty();
13117         }
13118 
13119         public java.util.Optional<Value> initial_h() {
13120             int i = optionalInputArguments.indexOf(InputParameter.initial_h);
13121             return i != -1 ? java.util.Optional.of(operands().get(3 + i)) : java.util.Optional.empty();
13122         }
13123 
13124         public java.util.Optional<Value> initial_c() {
13125             int i = optionalInputArguments.indexOf(InputParameter.initial_c);
13126             return i != -1 ? java.util.Optional.of(operands().get(3 + i)) : java.util.Optional.empty();
13127         }
13128 
13129         public java.util.Optional<Value> P() {
13130             int i = optionalInputArguments.indexOf(InputParameter.P);
13131             return i != -1 ? java.util.Optional.of(operands().get(3 + i)) : java.util.Optional.empty();
13132         }
13133 
13134         public java.util.Optional<Integer> layout() {
13135             Integer layout = Attribute.layout.access(Integer.class, onnxAttributes);
13136             return java.util.Optional.ofNullable(layout);
13137         }
13138 
13139         public java.util.Optional<Integer> input_forget() {
13140             Integer input_forget = Attribute.input_forget.access(Integer.class, onnxAttributes);
13141             return java.util.Optional.ofNullable(input_forget);
13142         }
13143 
13144         public java.util.Optional<float[]> activation_alpha() {
13145             float[] activation_alpha = Attribute.activation_alpha.access(float[].class, onnxAttributes);
13146             return java.util.Optional.ofNullable(activation_alpha).map(float[]::clone);
13147         }
13148 
13149         public java.util.Optional<Integer> hidden_size() {
13150             Integer hidden_size = Attribute.hidden_size.access(Integer.class, onnxAttributes);
13151             return java.util.Optional.ofNullable(hidden_size);
13152         }
13153 
13154         public java.util.Optional<float[]> activation_beta() {
13155             float[] activation_beta = Attribute.activation_beta.access(float[].class, onnxAttributes);
13156             return java.util.Optional.ofNullable(activation_beta).map(float[]::clone);
13157         }
13158 
13159         public java.util.Optional<String[]> activations() {
13160             String[] activations = Attribute.activations.access(String[].class, onnxAttributes);
13161             return java.util.Optional.ofNullable(activations).map(String[]::clone);
13162         }
13163 
13164         public java.util.Optional<Float> clip() {
13165             Float clip = Attribute.clip.access(Float.class, onnxAttributes);
13166             return java.util.Optional.ofNullable(clip);
13167         }
13168 
13169         public java.util.Optional<String> direction() {
13170             String direction = Attribute.direction.access(String.class, onnxAttributes);
13171             return java.util.Optional.ofNullable(direction);
13172         }
13173 
13174     }
13175 
13176     public static LSTM LSTM(TypeElement resultType, Set<LSTM.OutputParameter> optionalOutputs, Value X, Value W, Value R, java.util.Optional<Value> B, java.util.Optional<Value> sequence_lens, java.util.Optional<Value> initial_h, java.util.Optional<Value> initial_c, java.util.Optional<Value> P, java.util.Optional<Integer> layout, java.util.Optional<Integer> input_forget, java.util.Optional<float[]> activation_alpha, java.util.Optional<Integer> hidden_size, java.util.Optional<float[]> activation_beta, java.util.Optional<String[]> activations, java.util.Optional<Float> clip, java.util.Optional<String> direction) {
13177         return new LSTM(resultType, optionalOutputs, X, W, R, B, sequence_lens, initial_h, initial_c, P, layout, input_forget, activation_alpha, hidden_size, activation_beta, activations, clip, direction);
13178     }
13179 
13180     @OpFactory.OpDeclaration(LabelEncoder.NAME)
13181     public static final class LabelEncoder extends OnnxOp {
13182         public static final String NAME = "LabelEncoder";
13183 
13184         public enum Attribute implements OnnxAttribute {
13185             values_strings(String[].class, true, null),
13186             keys_int64s(int[].class, true, null),
13187             keys_tensor(byte[].class, true, null),
13188             keys_strings(String[].class, true, null),
13189             default_float(Float.class, true, -0.0f),
13190             keys_floats(float[].class, true, null),
13191             default_tensor(byte[].class, true, null),
13192             default_int64(Integer.class, true, -1),
13193             values_tensor(byte[].class, true, null),
13194             values_int64s(int[].class, true, null),
13195             default_string(String.class, true, "_Unused"),
13196             values_floats(float[].class, true, null),
13197             ;
13198 
13199                 final Class<?> t;
13200                 final boolean optional;
13201                 final Object defaultValue;
13202 
13203                 Attribute(Class<?> type, boolean optional, Object defaultValue) {
13204                     this.t = type;
13205                     this.optional = optional;
13206                     this.defaultValue = defaultValue;
13207                     assert optional || defaultValue == null;
13208                 }
13209 
13210                 public Class<?> type() {
13211                     return t;
13212                 }
13213 
13214                 public boolean isOptional() {
13215                     return optional;
13216                 }
13217 
13218                 public Object defaultValue() {
13219                     return defaultValue;
13220                 }
13221         }
13222 
13223         public enum TypeConstraint implements OnnxTypeConstraint {
13224             T1(new OnnxType.TypeVariable("T1", List.of(OnnxType.tensor(OnnxType.string()), OnnxType.tensor(OnnxType.int64()), OnnxType.tensor(OnnxType.float32()), OnnxType.tensor(OnnxType.int32()), OnnxType.tensor(OnnxType.int16()), OnnxType.tensor(OnnxType.float64())))),
13225             T2(new OnnxType.TypeVariable("T2", List.of(OnnxType.tensor(OnnxType.string()), OnnxType.tensor(OnnxType.int64()), OnnxType.tensor(OnnxType.float32()), OnnxType.tensor(OnnxType.int32()), OnnxType.tensor(OnnxType.int16()), OnnxType.tensor(OnnxType.float64())))),
13226             ;
13227 
13228             final OnnxType.TypeVariable typeVariable;
13229 
13230             TypeConstraint(OnnxType.TypeVariable typeVariable) {
13231                 assert typeVariable.name().equals(name());
13232                 this.typeVariable = typeVariable;
13233             }
13234 
13235             @Override
13236             public OnnxType.TypeVariable typeVariable() {
13237                 return typeVariable;
13238             }
13239         }
13240 
13241         public enum InputParameter implements OnnxParameter {
13242             X(TypeConstraint.T1.typeVariable(), Quantifier.REQUIRED),
13243             ;
13244 
13245             final OnnxType type;
13246             final Quantifier quantifier;
13247 
13248             InputParameter(OnnxType type, Quantifier quantifier) {
13249                 this.type = type;
13250                 this.quantifier = quantifier;
13251             }
13252 
13253             @Override
13254             public OnnxType type() {
13255                 return type;
13256             }
13257 
13258             @Override
13259             public Quantifier quantifier() {
13260                 return quantifier;
13261             }
13262         }
13263 
13264         public enum OutputParameter implements OnnxParameter {
13265             Y(TypeConstraint.T2.typeVariable(), Quantifier.REQUIRED),
13266             ;
13267 
13268             final OnnxType type;
13269             final Quantifier quantifier;
13270 
13271             OutputParameter(OnnxType type, Quantifier quantifier) {
13272                 this.type = type;
13273                 this.quantifier = quantifier;
13274             }
13275 
13276             @Override
13277             public OnnxType type() {
13278                 return type;
13279             }
13280 
13281             @Override
13282             public Quantifier quantifier() {
13283                 return quantifier;
13284             }
13285         }
13286 
13287         public static final OnnxSchema SCHEMA = new OnnxSchemaRecord(
13288                 NAME,
13289                 List.of(Attribute.values()),
13290                 List.of(TypeConstraint.values()),
13291                 List.of(InputParameter.values()),
13292                 List.of(OutputParameter.values())
13293         );
13294 
13295         public LabelEncoder(ExternalizedOp def) {
13296             super(SCHEMA, def);
13297         }
13298 
13299         LabelEncoder(LabelEncoder that, CopyContext cc) {
13300             super(that, cc);
13301         }
13302 
13303         @Override
13304         public LabelEncoder transform(CopyContext cc, OpTransformer ot) {
13305             return new LabelEncoder(this, cc);
13306         }
13307 
13308         LabelEncoder(TypeElement resultType, Value X, java.util.Optional<String[]> values_strings, java.util.Optional<int[]> keys_int64s, java.util.Optional<byte[]> keys_tensor, java.util.Optional<String[]> keys_strings, java.util.Optional<Float> default_float, java.util.Optional<float[]> keys_floats, java.util.Optional<byte[]> default_tensor, java.util.Optional<Integer> default_int64, java.util.Optional<byte[]> values_tensor, java.util.Optional<int[]> values_int64s, java.util.Optional<String> default_string, java.util.Optional<float[]> values_floats) {
13309             super(SCHEMA, resultType, Set.of(), List.of(X), List.of(values_strings, keys_int64s, keys_tensor, keys_strings, default_float, keys_floats, default_tensor, default_int64, values_tensor, values_int64s, default_string, values_floats));
13310         }
13311 
13312         @Override
13313         public SequencedSet<OnnxParameter> onnxOutputs() {
13314             return onnxOutputs(SCHEMA);
13315         }
13316 
13317         @Override
13318         public SequencedMap<OnnxParameter, Object> onnxInputs() {
13319             return onnxInputs(SCHEMA, List.of(X()));
13320         }
13321 
13322         public Value X() {
13323             return operands().get(0);
13324         }
13325 
13326         public java.util.Optional<String[]> values_strings() {
13327             String[] values_strings = Attribute.values_strings.access(String[].class, onnxAttributes);
13328             return java.util.Optional.ofNullable(values_strings).map(String[]::clone);
13329         }
13330 
13331         public java.util.Optional<int[]> keys_int64s() {
13332             int[] keys_int64s = Attribute.keys_int64s.access(int[].class, onnxAttributes);
13333             return java.util.Optional.ofNullable(keys_int64s).map(int[]::clone);
13334         }
13335 
13336         public java.util.Optional<byte[]> keys_tensor() {
13337             byte[] keys_tensor = Attribute.keys_tensor.access(byte[].class, onnxAttributes);
13338             return java.util.Optional.ofNullable(keys_tensor).map(byte[]::clone);
13339         }
13340 
13341         public java.util.Optional<String[]> keys_strings() {
13342             String[] keys_strings = Attribute.keys_strings.access(String[].class, onnxAttributes);
13343             return java.util.Optional.ofNullable(keys_strings).map(String[]::clone);
13344         }
13345 
13346         public java.util.Optional<Float> default_float() {
13347             Float default_float = Attribute.default_float.access(Float.class, onnxAttributes);
13348             return java.util.Optional.ofNullable(default_float);
13349         }
13350 
13351         public java.util.Optional<float[]> keys_floats() {
13352             float[] keys_floats = Attribute.keys_floats.access(float[].class, onnxAttributes);
13353             return java.util.Optional.ofNullable(keys_floats).map(float[]::clone);
13354         }
13355 
13356         public java.util.Optional<byte[]> default_tensor() {
13357             byte[] default_tensor = Attribute.default_tensor.access(byte[].class, onnxAttributes);
13358             return java.util.Optional.ofNullable(default_tensor).map(byte[]::clone);
13359         }
13360 
13361         public java.util.Optional<Integer> default_int64() {
13362             Integer default_int64 = Attribute.default_int64.access(Integer.class, onnxAttributes);
13363             return java.util.Optional.ofNullable(default_int64);
13364         }
13365 
13366         public java.util.Optional<byte[]> values_tensor() {
13367             byte[] values_tensor = Attribute.values_tensor.access(byte[].class, onnxAttributes);
13368             return java.util.Optional.ofNullable(values_tensor).map(byte[]::clone);
13369         }
13370 
13371         public java.util.Optional<int[]> values_int64s() {
13372             int[] values_int64s = Attribute.values_int64s.access(int[].class, onnxAttributes);
13373             return java.util.Optional.ofNullable(values_int64s).map(int[]::clone);
13374         }
13375 
13376         public java.util.Optional<String> default_string() {
13377             String default_string = Attribute.default_string.access(String.class, onnxAttributes);
13378             return java.util.Optional.ofNullable(default_string);
13379         }
13380 
13381         public java.util.Optional<float[]> values_floats() {
13382             float[] values_floats = Attribute.values_floats.access(float[].class, onnxAttributes);
13383             return java.util.Optional.ofNullable(values_floats).map(float[]::clone);
13384         }
13385 
13386     }
13387 
13388     public static LabelEncoder LabelEncoder(TypeElement resultType, Value X, java.util.Optional<String[]> values_strings, java.util.Optional<int[]> keys_int64s, java.util.Optional<byte[]> keys_tensor, java.util.Optional<String[]> keys_strings, java.util.Optional<Float> default_float, java.util.Optional<float[]> keys_floats, java.util.Optional<byte[]> default_tensor, java.util.Optional<Integer> default_int64, java.util.Optional<byte[]> values_tensor, java.util.Optional<int[]> values_int64s, java.util.Optional<String> default_string, java.util.Optional<float[]> values_floats) {
13389         return new LabelEncoder(resultType, X, values_strings, keys_int64s, keys_tensor, keys_strings, default_float, keys_floats, default_tensor, default_int64, values_tensor, values_int64s, default_string, values_floats);
13390     }
13391 
13392     @OpFactory.OpDeclaration(LayerNormalization.NAME)
13393     public static final class LayerNormalization extends OnnxOp {
13394         public static final String NAME = "LayerNormalization";
13395 
13396         public enum Attribute implements OnnxAttribute {
13397             epsilon(Float.class, true, 1.0E-5f),
13398             stash_type(Integer.class, true, 1),
13399             axis(Integer.class, true, -1),
13400             ;
13401 
13402                 final Class<?> t;
13403                 final boolean optional;
13404                 final Object defaultValue;
13405 
13406                 Attribute(Class<?> type, boolean optional, Object defaultValue) {
13407                     this.t = type;
13408                     this.optional = optional;
13409                     this.defaultValue = defaultValue;
13410                     assert optional || defaultValue == null;
13411                 }
13412 
13413                 public Class<?> type() {
13414                     return t;
13415                 }
13416 
13417                 public boolean isOptional() {
13418                     return optional;
13419                 }
13420 
13421                 public Object defaultValue() {
13422                     return defaultValue;
13423                 }
13424         }
13425 
13426         public enum TypeConstraint implements OnnxTypeConstraint {
13427             T(new OnnxType.TypeVariable("T", List.of(OnnxType.tensor(OnnxType.float16()), OnnxType.tensor(OnnxType.float32()), OnnxType.tensor(OnnxType.float64()), OnnxType.tensor(OnnxType.bfloat16())))),
13428             U(new OnnxType.TypeVariable("U", List.of(OnnxType.tensor(OnnxType.float32()), OnnxType.tensor(OnnxType.bfloat16())))),
13429             ;
13430 
13431             final OnnxType.TypeVariable typeVariable;
13432 
13433             TypeConstraint(OnnxType.TypeVariable typeVariable) {
13434                 assert typeVariable.name().equals(name());
13435                 this.typeVariable = typeVariable;
13436             }
13437 
13438             @Override
13439             public OnnxType.TypeVariable typeVariable() {
13440                 return typeVariable;
13441             }
13442         }
13443 
13444         public enum InputParameter implements OnnxParameter {
13445             X(TypeConstraint.T.typeVariable(), Quantifier.REQUIRED),
13446             Scale(TypeConstraint.T.typeVariable(), Quantifier.REQUIRED),
13447             B(TypeConstraint.T.typeVariable(), Quantifier.OPTIONAL),
13448             ;
13449 
13450             final OnnxType type;
13451             final Quantifier quantifier;
13452 
13453             InputParameter(OnnxType type, Quantifier quantifier) {
13454                 this.type = type;
13455                 this.quantifier = quantifier;
13456             }
13457 
13458             @Override
13459             public OnnxType type() {
13460                 return type;
13461             }
13462 
13463             @Override
13464             public Quantifier quantifier() {
13465                 return quantifier;
13466             }
13467         }
13468 
13469         public enum OutputParameter implements OnnxParameter {
13470             Y(TypeConstraint.T.typeVariable(), Quantifier.REQUIRED),
13471             Mean(TypeConstraint.U.typeVariable(), Quantifier.OPTIONAL),
13472             InvStdDev(TypeConstraint.U.typeVariable(), Quantifier.OPTIONAL),
13473             ;
13474 
13475             final OnnxType type;
13476             final Quantifier quantifier;
13477 
13478             OutputParameter(OnnxType type, Quantifier quantifier) {
13479                 this.type = type;
13480                 this.quantifier = quantifier;
13481             }
13482 
13483             @Override
13484             public OnnxType type() {
13485                 return type;
13486             }
13487 
13488             @Override
13489             public Quantifier quantifier() {
13490                 return quantifier;
13491             }
13492         }
13493 
13494         public static final OnnxSchema SCHEMA = new OnnxSchemaRecord(
13495                 NAME,
13496                 List.of(Attribute.values()),
13497                 List.of(TypeConstraint.values()),
13498                 List.of(InputParameter.values()),
13499                 List.of(OutputParameter.values())
13500         );
13501 
13502         public LayerNormalization(ExternalizedOp def) {
13503             super(SCHEMA, def);
13504         }
13505 
13506         LayerNormalization(LayerNormalization that, CopyContext cc) {
13507             super(that, cc);
13508         }
13509 
13510         @Override
13511         public LayerNormalization transform(CopyContext cc, OpTransformer ot) {
13512             return new LayerNormalization(this, cc);
13513         }
13514 
13515         LayerNormalization(TypeElement resultType, Set<OutputParameter> optionalOutputs, Value X, Value Scale, java.util.Optional<Value> B, java.util.Optional<Float> epsilon, java.util.Optional<Integer> stash_type, java.util.Optional<Integer> axis) {
13516             super(SCHEMA, resultType, optionalOutputs, List.of(X, Scale, B), List.of(epsilon, stash_type, axis));
13517         }
13518 
13519         @Override
13520         public SequencedSet<OnnxParameter> onnxOutputs() {
13521             return onnxOutputs(SCHEMA);
13522         }
13523 
13524         @Override
13525         public SequencedMap<OnnxParameter, Object> onnxInputs() {
13526             return onnxInputs(SCHEMA, List.of(X(), Scale(), B()));
13527         }
13528 
13529         public Value X() {
13530             return operands().get(0);
13531         }
13532 
13533         public Value Scale() {
13534             return operands().get(1);
13535         }
13536 
13537         public java.util.Optional<Value> B() {
13538             int i = optionalInputArguments.indexOf(InputParameter.B);
13539             return i != -1 ? java.util.Optional.of(operands().get(2 + i)) : java.util.Optional.empty();
13540         }
13541 
13542         public java.util.Optional<Float> epsilon() {
13543             Float epsilon = Attribute.epsilon.access(Float.class, onnxAttributes);
13544             return java.util.Optional.ofNullable(epsilon);
13545         }
13546 
13547         public java.util.Optional<Integer> stash_type() {
13548             Integer stash_type = Attribute.stash_type.access(Integer.class, onnxAttributes);
13549             return java.util.Optional.ofNullable(stash_type);
13550         }
13551 
13552         public java.util.Optional<Integer> axis() {
13553             Integer axis = Attribute.axis.access(Integer.class, onnxAttributes);
13554             return java.util.Optional.ofNullable(axis);
13555         }
13556 
13557     }
13558 
13559     public static LayerNormalization LayerNormalization(TypeElement resultType, Set<LayerNormalization.OutputParameter> optionalOutputs, Value X, Value Scale, java.util.Optional<Value> B, java.util.Optional<Float> epsilon, java.util.Optional<Integer> stash_type, java.util.Optional<Integer> axis) {
13560         return new LayerNormalization(resultType, optionalOutputs, X, Scale, B, epsilon, stash_type, axis);
13561     }
13562 
13563     @OpFactory.OpDeclaration(LeakyRelu.NAME)
13564     public static final class LeakyRelu extends OnnxOp {
13565         public static final String NAME = "LeakyRelu";
13566 
13567         public enum Attribute implements OnnxAttribute {
13568             alpha(Float.class, true, 0.01f),
13569             ;
13570 
13571                 final Class<?> t;
13572                 final boolean optional;
13573                 final Object defaultValue;
13574 
13575                 Attribute(Class<?> type, boolean optional, Object defaultValue) {
13576                     this.t = type;
13577                     this.optional = optional;
13578                     this.defaultValue = defaultValue;
13579                     assert optional || defaultValue == null;
13580                 }
13581 
13582                 public Class<?> type() {
13583                     return t;
13584                 }
13585 
13586                 public boolean isOptional() {
13587                     return optional;
13588                 }
13589 
13590                 public Object defaultValue() {
13591                     return defaultValue;
13592                 }
13593         }
13594 
13595         public enum TypeConstraint implements OnnxTypeConstraint {
13596             T(new OnnxType.TypeVariable("T", List.of(OnnxType.tensor(OnnxType.bfloat16()), OnnxType.tensor(OnnxType.float16()), OnnxType.tensor(OnnxType.float32()), OnnxType.tensor(OnnxType.float64())))),
13597             ;
13598 
13599             final OnnxType.TypeVariable typeVariable;
13600 
13601             TypeConstraint(OnnxType.TypeVariable typeVariable) {
13602                 assert typeVariable.name().equals(name());
13603                 this.typeVariable = typeVariable;
13604             }
13605 
13606             @Override
13607             public OnnxType.TypeVariable typeVariable() {
13608                 return typeVariable;
13609             }
13610         }
13611 
13612         public enum InputParameter implements OnnxParameter {
13613             X(TypeConstraint.T.typeVariable(), Quantifier.REQUIRED),
13614             ;
13615 
13616             final OnnxType type;
13617             final Quantifier quantifier;
13618 
13619             InputParameter(OnnxType type, Quantifier quantifier) {
13620                 this.type = type;
13621                 this.quantifier = quantifier;
13622             }
13623 
13624             @Override
13625             public OnnxType type() {
13626                 return type;
13627             }
13628 
13629             @Override
13630             public Quantifier quantifier() {
13631                 return quantifier;
13632             }
13633         }
13634 
13635         public enum OutputParameter implements OnnxParameter {
13636             Y(TypeConstraint.T.typeVariable(), Quantifier.REQUIRED),
13637             ;
13638 
13639             final OnnxType type;
13640             final Quantifier quantifier;
13641 
13642             OutputParameter(OnnxType type, Quantifier quantifier) {
13643                 this.type = type;
13644                 this.quantifier = quantifier;
13645             }
13646 
13647             @Override
13648             public OnnxType type() {
13649                 return type;
13650             }
13651 
13652             @Override
13653             public Quantifier quantifier() {
13654                 return quantifier;
13655             }
13656         }
13657 
13658         public static final OnnxSchema SCHEMA = new OnnxSchemaRecord(
13659                 NAME,
13660                 List.of(Attribute.values()),
13661                 List.of(TypeConstraint.values()),
13662                 List.of(InputParameter.values()),
13663                 List.of(OutputParameter.values())
13664         );
13665 
13666         public LeakyRelu(ExternalizedOp def) {
13667             super(SCHEMA, def);
13668         }
13669 
13670         LeakyRelu(LeakyRelu that, CopyContext cc) {
13671             super(that, cc);
13672         }
13673 
13674         @Override
13675         public LeakyRelu transform(CopyContext cc, OpTransformer ot) {
13676             return new LeakyRelu(this, cc);
13677         }
13678 
13679         LeakyRelu(TypeElement resultType, Value X, java.util.Optional<Float> alpha) {
13680             super(SCHEMA, resultType, Set.of(), List.of(X), List.of(alpha));
13681         }
13682 
13683         @Override
13684         public SequencedSet<OnnxParameter> onnxOutputs() {
13685             return onnxOutputs(SCHEMA);
13686         }
13687 
13688         @Override
13689         public SequencedMap<OnnxParameter, Object> onnxInputs() {
13690             return onnxInputs(SCHEMA, List.of(X()));
13691         }
13692 
13693         public Value X() {
13694             return operands().get(0);
13695         }
13696 
13697         public java.util.Optional<Float> alpha() {
13698             Float alpha = Attribute.alpha.access(Float.class, onnxAttributes);
13699             return java.util.Optional.ofNullable(alpha);
13700         }
13701 
13702     }
13703 
13704     public static LeakyRelu LeakyRelu(TypeElement resultType, Value X, java.util.Optional<Float> alpha) {
13705         return new LeakyRelu(resultType, X, alpha);
13706     }
13707 
13708     @OpFactory.OpDeclaration(Less.NAME)
13709     public static final class Less extends OnnxOp {
13710         public static final String NAME = "Less";
13711 
13712         public enum Attribute implements OnnxAttribute.None { }
13713 
13714         public enum TypeConstraint implements OnnxTypeConstraint {
13715             T(new OnnxType.TypeVariable("T", List.of(OnnxType.tensor(OnnxType.uint8()), OnnxType.tensor(OnnxType.uint16()), OnnxType.tensor(OnnxType.uint32()), OnnxType.tensor(OnnxType.uint64()), OnnxType.tensor(OnnxType.int8()), OnnxType.tensor(OnnxType.int16()), OnnxType.tensor(OnnxType.int32()), OnnxType.tensor(OnnxType.int64()), OnnxType.tensor(OnnxType.float16()), OnnxType.tensor(OnnxType.float32()), OnnxType.tensor(OnnxType.float64()), OnnxType.tensor(OnnxType.bfloat16())))),
13716             T1(new OnnxType.TypeVariable("T1", List.of(OnnxType.tensor(OnnxType.bool())))),
13717             ;
13718 
13719             final OnnxType.TypeVariable typeVariable;
13720 
13721             TypeConstraint(OnnxType.TypeVariable typeVariable) {
13722                 assert typeVariable.name().equals(name());
13723                 this.typeVariable = typeVariable;
13724             }
13725 
13726             @Override
13727             public OnnxType.TypeVariable typeVariable() {
13728                 return typeVariable;
13729             }
13730         }
13731 
13732         public enum InputParameter implements OnnxParameter {
13733             A(TypeConstraint.T.typeVariable(), Quantifier.REQUIRED),
13734             B(TypeConstraint.T.typeVariable(), Quantifier.REQUIRED),
13735             ;
13736 
13737             final OnnxType type;
13738             final Quantifier quantifier;
13739 
13740             InputParameter(OnnxType type, Quantifier quantifier) {
13741                 this.type = type;
13742                 this.quantifier = quantifier;
13743             }
13744 
13745             @Override
13746             public OnnxType type() {
13747                 return type;
13748             }
13749 
13750             @Override
13751             public Quantifier quantifier() {
13752                 return quantifier;
13753             }
13754         }
13755 
13756         public enum OutputParameter implements OnnxParameter {
13757             C(TypeConstraint.T1.typeVariable(), Quantifier.REQUIRED),
13758             ;
13759 
13760             final OnnxType type;
13761             final Quantifier quantifier;
13762 
13763             OutputParameter(OnnxType type, Quantifier quantifier) {
13764                 this.type = type;
13765                 this.quantifier = quantifier;
13766             }
13767 
13768             @Override
13769             public OnnxType type() {
13770                 return type;
13771             }
13772 
13773             @Override
13774             public Quantifier quantifier() {
13775                 return quantifier;
13776             }
13777         }
13778 
13779         public static final OnnxSchema SCHEMA = new OnnxSchemaRecord(
13780                 NAME,
13781                 List.of(Attribute.values()),
13782                 List.of(TypeConstraint.values()),
13783                 List.of(InputParameter.values()),
13784                 List.of(OutputParameter.values())
13785         );
13786 
13787         public Less(ExternalizedOp def) {
13788             super(SCHEMA, def);
13789         }
13790 
13791         Less(Less that, CopyContext cc) {
13792             super(that, cc);
13793         }
13794 
13795         @Override
13796         public Less transform(CopyContext cc, OpTransformer ot) {
13797             return new Less(this, cc);
13798         }
13799 
13800         Less(TypeElement resultType, Value A, Value B) {
13801             super(SCHEMA, resultType, Set.of(), List.of(A, B), List.of());
13802         }
13803 
13804         @Override
13805         public SequencedSet<OnnxParameter> onnxOutputs() {
13806             return onnxOutputs(SCHEMA);
13807         }
13808 
13809         @Override
13810         public SequencedMap<OnnxParameter, Object> onnxInputs() {
13811             return onnxInputs(SCHEMA, List.of(A(), B()));
13812         }
13813 
13814         public Value A() {
13815             return operands().get(0);
13816         }
13817 
13818         public Value B() {
13819             return operands().get(1);
13820         }
13821 
13822     }
13823 
13824     public static Less Less(TypeElement resultType, Value A, Value B) {
13825         return new Less(resultType, A, B);
13826     }
13827 
13828     @OpFactory.OpDeclaration(LessOrEqual.NAME)
13829     public static final class LessOrEqual extends OnnxOp {
13830         public static final String NAME = "LessOrEqual";
13831 
13832         public enum Attribute implements OnnxAttribute.None { }
13833 
13834         public enum TypeConstraint implements OnnxTypeConstraint {
13835             T(new OnnxType.TypeVariable("T", List.of(OnnxType.tensor(OnnxType.uint8()), OnnxType.tensor(OnnxType.uint16()), OnnxType.tensor(OnnxType.uint32()), OnnxType.tensor(OnnxType.uint64()), OnnxType.tensor(OnnxType.int8()), OnnxType.tensor(OnnxType.int16()), OnnxType.tensor(OnnxType.int32()), OnnxType.tensor(OnnxType.int64()), OnnxType.tensor(OnnxType.float16()), OnnxType.tensor(OnnxType.float32()), OnnxType.tensor(OnnxType.float64()), OnnxType.tensor(OnnxType.bfloat16())))),
13836             T1(new OnnxType.TypeVariable("T1", List.of(OnnxType.tensor(OnnxType.bool())))),
13837             ;
13838 
13839             final OnnxType.TypeVariable typeVariable;
13840 
13841             TypeConstraint(OnnxType.TypeVariable typeVariable) {
13842                 assert typeVariable.name().equals(name());
13843                 this.typeVariable = typeVariable;
13844             }
13845 
13846             @Override
13847             public OnnxType.TypeVariable typeVariable() {
13848                 return typeVariable;
13849             }
13850         }
13851 
13852         public enum InputParameter implements OnnxParameter {
13853             A(TypeConstraint.T.typeVariable(), Quantifier.REQUIRED),
13854             B(TypeConstraint.T.typeVariable(), Quantifier.REQUIRED),
13855             ;
13856 
13857             final OnnxType type;
13858             final Quantifier quantifier;
13859 
13860             InputParameter(OnnxType type, Quantifier quantifier) {
13861                 this.type = type;
13862                 this.quantifier = quantifier;
13863             }
13864 
13865             @Override
13866             public OnnxType type() {
13867                 return type;
13868             }
13869 
13870             @Override
13871             public Quantifier quantifier() {
13872                 return quantifier;
13873             }
13874         }
13875 
13876         public enum OutputParameter implements OnnxParameter {
13877             C(TypeConstraint.T1.typeVariable(), Quantifier.REQUIRED),
13878             ;
13879 
13880             final OnnxType type;
13881             final Quantifier quantifier;
13882 
13883             OutputParameter(OnnxType type, Quantifier quantifier) {
13884                 this.type = type;
13885                 this.quantifier = quantifier;
13886             }
13887 
13888             @Override
13889             public OnnxType type() {
13890                 return type;
13891             }
13892 
13893             @Override
13894             public Quantifier quantifier() {
13895                 return quantifier;
13896             }
13897         }
13898 
13899         public static final OnnxSchema SCHEMA = new OnnxSchemaRecord(
13900                 NAME,
13901                 List.of(Attribute.values()),
13902                 List.of(TypeConstraint.values()),
13903                 List.of(InputParameter.values()),
13904                 List.of(OutputParameter.values())
13905         );
13906 
13907         public LessOrEqual(ExternalizedOp def) {
13908             super(SCHEMA, def);
13909         }
13910 
13911         LessOrEqual(LessOrEqual that, CopyContext cc) {
13912             super(that, cc);
13913         }
13914 
13915         @Override
13916         public LessOrEqual transform(CopyContext cc, OpTransformer ot) {
13917             return new LessOrEqual(this, cc);
13918         }
13919 
13920         LessOrEqual(TypeElement resultType, Value A, Value B) {
13921             super(SCHEMA, resultType, Set.of(), List.of(A, B), List.of());
13922         }
13923 
13924         @Override
13925         public SequencedSet<OnnxParameter> onnxOutputs() {
13926             return onnxOutputs(SCHEMA);
13927         }
13928 
13929         @Override
13930         public SequencedMap<OnnxParameter, Object> onnxInputs() {
13931             return onnxInputs(SCHEMA, List.of(A(), B()));
13932         }
13933 
13934         public Value A() {
13935             return operands().get(0);
13936         }
13937 
13938         public Value B() {
13939             return operands().get(1);
13940         }
13941 
13942     }
13943 
13944     public static LessOrEqual LessOrEqual(TypeElement resultType, Value A, Value B) {
13945         return new LessOrEqual(resultType, A, B);
13946     }
13947 
13948     @OpFactory.OpDeclaration(LinearClassifier.NAME)
13949     public static final class LinearClassifier extends OnnxOp {
13950         public static final String NAME = "LinearClassifier";
13951 
13952         public enum Attribute implements OnnxAttribute {
13953             classlabels_ints(int[].class, true, null),
13954             post_transform(String.class, true, "NONE"),
13955             coefficients(float[].class, false, null),
13956             multi_class(Integer.class, true, 0),
13957             intercepts(float[].class, true, null),
13958             classlabels_strings(String[].class, true, null),
13959             ;
13960 
13961                 final Class<?> t;
13962                 final boolean optional;
13963                 final Object defaultValue;
13964 
13965                 Attribute(Class<?> type, boolean optional, Object defaultValue) {
13966                     this.t = type;
13967                     this.optional = optional;
13968                     this.defaultValue = defaultValue;
13969                     assert optional || defaultValue == null;
13970                 }
13971 
13972                 public Class<?> type() {
13973                     return t;
13974                 }
13975 
13976                 public boolean isOptional() {
13977                     return optional;
13978                 }
13979 
13980                 public Object defaultValue() {
13981                     return defaultValue;
13982                 }
13983         }
13984 
13985         public enum TypeConstraint implements OnnxTypeConstraint {
13986             T1(new OnnxType.TypeVariable("T1", List.of(OnnxType.tensor(OnnxType.float32()), OnnxType.tensor(OnnxType.float64()), OnnxType.tensor(OnnxType.int64()), OnnxType.tensor(OnnxType.int32())))),
13987             T2(new OnnxType.TypeVariable("T2", List.of(OnnxType.tensor(OnnxType.string()), OnnxType.tensor(OnnxType.int64())))),
13988             ;
13989 
13990             final OnnxType.TypeVariable typeVariable;
13991 
13992             TypeConstraint(OnnxType.TypeVariable typeVariable) {
13993                 assert typeVariable.name().equals(name());
13994                 this.typeVariable = typeVariable;
13995             }
13996 
13997             @Override
13998             public OnnxType.TypeVariable typeVariable() {
13999                 return typeVariable;
14000             }
14001         }
14002 
14003         public enum InputParameter implements OnnxParameter {
14004             X(TypeConstraint.T1.typeVariable(), Quantifier.REQUIRED),
14005             ;
14006 
14007             final OnnxType type;
14008             final Quantifier quantifier;
14009 
14010             InputParameter(OnnxType type, Quantifier quantifier) {
14011                 this.type = type;
14012                 this.quantifier = quantifier;
14013             }
14014 
14015             @Override
14016             public OnnxType type() {
14017                 return type;
14018             }
14019 
14020             @Override
14021             public Quantifier quantifier() {
14022                 return quantifier;
14023             }
14024         }
14025 
14026         public enum OutputParameter implements OnnxParameter {
14027             Y(TypeConstraint.T2.typeVariable(), Quantifier.REQUIRED),
14028             Z(OnnxType.tensor(OnnxType.float32()), Quantifier.REQUIRED),
14029             ;
14030 
14031             final OnnxType type;
14032             final Quantifier quantifier;
14033 
14034             OutputParameter(OnnxType type, Quantifier quantifier) {
14035                 this.type = type;
14036                 this.quantifier = quantifier;
14037             }
14038 
14039             @Override
14040             public OnnxType type() {
14041                 return type;
14042             }
14043 
14044             @Override
14045             public Quantifier quantifier() {
14046                 return quantifier;
14047             }
14048         }
14049 
14050         public static final OnnxSchema SCHEMA = new OnnxSchemaRecord(
14051                 NAME,
14052                 List.of(Attribute.values()),
14053                 List.of(TypeConstraint.values()),
14054                 List.of(InputParameter.values()),
14055                 List.of(OutputParameter.values())
14056         );
14057 
14058         public LinearClassifier(ExternalizedOp def) {
14059             super(SCHEMA, def);
14060         }
14061 
14062         LinearClassifier(LinearClassifier that, CopyContext cc) {
14063             super(that, cc);
14064         }
14065 
14066         @Override
14067         public LinearClassifier transform(CopyContext cc, OpTransformer ot) {
14068             return new LinearClassifier(this, cc);
14069         }
14070 
14071         LinearClassifier(TypeElement resultType, Value X, java.util.Optional<int[]> classlabels_ints, java.util.Optional<String> post_transform, float[] coefficients, java.util.Optional<Integer> multi_class, java.util.Optional<float[]> intercepts, java.util.Optional<String[]> classlabels_strings) {
14072             super(SCHEMA, resultType, Set.of(), List.of(X), List.of(classlabels_ints, post_transform, coefficients, multi_class, intercepts, classlabels_strings));
14073         }
14074 
14075         @Override
14076         public SequencedSet<OnnxParameter> onnxOutputs() {
14077             return onnxOutputs(SCHEMA);
14078         }
14079 
14080         @Override
14081         public SequencedMap<OnnxParameter, Object> onnxInputs() {
14082             return onnxInputs(SCHEMA, List.of(X()));
14083         }
14084 
14085         public Value X() {
14086             return operands().get(0);
14087         }
14088 
14089         public java.util.Optional<int[]> classlabels_ints() {
14090             int[] classlabels_ints = Attribute.classlabels_ints.access(int[].class, onnxAttributes);
14091             return java.util.Optional.ofNullable(classlabels_ints).map(int[]::clone);
14092         }
14093 
14094         public java.util.Optional<String> post_transform() {
14095             String post_transform = Attribute.post_transform.access(String.class, onnxAttributes);
14096             return java.util.Optional.ofNullable(post_transform);
14097         }
14098 
14099         public float[] coefficients() {
14100             float[] coefficients = Attribute.coefficients.access(float[].class, onnxAttributes);
14101             return coefficients.clone();
14102         }
14103 
14104         public java.util.Optional<Integer> multi_class() {
14105             Integer multi_class = Attribute.multi_class.access(Integer.class, onnxAttributes);
14106             return java.util.Optional.ofNullable(multi_class);
14107         }
14108 
14109         public java.util.Optional<float[]> intercepts() {
14110             float[] intercepts = Attribute.intercepts.access(float[].class, onnxAttributes);
14111             return java.util.Optional.ofNullable(intercepts).map(float[]::clone);
14112         }
14113 
14114         public java.util.Optional<String[]> classlabels_strings() {
14115             String[] classlabels_strings = Attribute.classlabels_strings.access(String[].class, onnxAttributes);
14116             return java.util.Optional.ofNullable(classlabels_strings).map(String[]::clone);
14117         }
14118 
14119     }
14120 
14121     public static LinearClassifier LinearClassifier(TypeElement resultType, Value X, java.util.Optional<int[]> classlabels_ints, java.util.Optional<String> post_transform, float[] coefficients, java.util.Optional<Integer> multi_class, java.util.Optional<float[]> intercepts, java.util.Optional<String[]> classlabels_strings) {
14122         return new LinearClassifier(resultType, X, classlabels_ints, post_transform, coefficients, multi_class, intercepts, classlabels_strings);
14123     }
14124 
14125     @OpFactory.OpDeclaration(LinearRegressor.NAME)
14126     public static final class LinearRegressor extends OnnxOp {
14127         public static final String NAME = "LinearRegressor";
14128 
14129         public enum Attribute implements OnnxAttribute {
14130             post_transform(String.class, true, "NONE"),
14131             coefficients(float[].class, true, null),
14132             targets(Integer.class, true, 1),
14133             intercepts(float[].class, true, null),
14134             ;
14135 
14136                 final Class<?> t;
14137                 final boolean optional;
14138                 final Object defaultValue;
14139 
14140                 Attribute(Class<?> type, boolean optional, Object defaultValue) {
14141                     this.t = type;
14142                     this.optional = optional;
14143                     this.defaultValue = defaultValue;
14144                     assert optional || defaultValue == null;
14145                 }
14146 
14147                 public Class<?> type() {
14148                     return t;
14149                 }
14150 
14151                 public boolean isOptional() {
14152                     return optional;
14153                 }
14154 
14155                 public Object defaultValue() {
14156                     return defaultValue;
14157                 }
14158         }
14159 
14160         public enum TypeConstraint implements OnnxTypeConstraint {
14161             T(new OnnxType.TypeVariable("T", List.of(OnnxType.tensor(OnnxType.float32()), OnnxType.tensor(OnnxType.float64()), OnnxType.tensor(OnnxType.int64()), OnnxType.tensor(OnnxType.int32())))),
14162             ;
14163 
14164             final OnnxType.TypeVariable typeVariable;
14165 
14166             TypeConstraint(OnnxType.TypeVariable typeVariable) {
14167                 assert typeVariable.name().equals(name());
14168                 this.typeVariable = typeVariable;
14169             }
14170 
14171             @Override
14172             public OnnxType.TypeVariable typeVariable() {
14173                 return typeVariable;
14174             }
14175         }
14176 
14177         public enum InputParameter implements OnnxParameter {
14178             X(TypeConstraint.T.typeVariable(), Quantifier.REQUIRED),
14179             ;
14180 
14181             final OnnxType type;
14182             final Quantifier quantifier;
14183 
14184             InputParameter(OnnxType type, Quantifier quantifier) {
14185                 this.type = type;
14186                 this.quantifier = quantifier;
14187             }
14188 
14189             @Override
14190             public OnnxType type() {
14191                 return type;
14192             }
14193 
14194             @Override
14195             public Quantifier quantifier() {
14196                 return quantifier;
14197             }
14198         }
14199 
14200         public enum OutputParameter implements OnnxParameter {
14201             Y(OnnxType.tensor(OnnxType.float32()), Quantifier.REQUIRED),
14202             ;
14203 
14204             final OnnxType type;
14205             final Quantifier quantifier;
14206 
14207             OutputParameter(OnnxType type, Quantifier quantifier) {
14208                 this.type = type;
14209                 this.quantifier = quantifier;
14210             }
14211 
14212             @Override
14213             public OnnxType type() {
14214                 return type;
14215             }
14216 
14217             @Override
14218             public Quantifier quantifier() {
14219                 return quantifier;
14220             }
14221         }
14222 
14223         public static final OnnxSchema SCHEMA = new OnnxSchemaRecord(
14224                 NAME,
14225                 List.of(Attribute.values()),
14226                 List.of(TypeConstraint.values()),
14227                 List.of(InputParameter.values()),
14228                 List.of(OutputParameter.values())
14229         );
14230 
14231         public LinearRegressor(ExternalizedOp def) {
14232             super(SCHEMA, def);
14233         }
14234 
14235         LinearRegressor(LinearRegressor that, CopyContext cc) {
14236             super(that, cc);
14237         }
14238 
14239         @Override
14240         public LinearRegressor transform(CopyContext cc, OpTransformer ot) {
14241             return new LinearRegressor(this, cc);
14242         }
14243 
14244         LinearRegressor(TypeElement resultType, Value X, java.util.Optional<String> post_transform, java.util.Optional<float[]> coefficients, java.util.Optional<Integer> targets, java.util.Optional<float[]> intercepts) {
14245             super(SCHEMA, resultType, Set.of(), List.of(X), List.of(post_transform, coefficients, targets, intercepts));
14246         }
14247 
14248         @Override
14249         public SequencedSet<OnnxParameter> onnxOutputs() {
14250             return onnxOutputs(SCHEMA);
14251         }
14252 
14253         @Override
14254         public SequencedMap<OnnxParameter, Object> onnxInputs() {
14255             return onnxInputs(SCHEMA, List.of(X()));
14256         }
14257 
14258         public Value X() {
14259             return operands().get(0);
14260         }
14261 
14262         public java.util.Optional<String> post_transform() {
14263             String post_transform = Attribute.post_transform.access(String.class, onnxAttributes);
14264             return java.util.Optional.ofNullable(post_transform);
14265         }
14266 
14267         public java.util.Optional<float[]> coefficients() {
14268             float[] coefficients = Attribute.coefficients.access(float[].class, onnxAttributes);
14269             return java.util.Optional.ofNullable(coefficients).map(float[]::clone);
14270         }
14271 
14272         public java.util.Optional<Integer> targets() {
14273             Integer targets = Attribute.targets.access(Integer.class, onnxAttributes);
14274             return java.util.Optional.ofNullable(targets);
14275         }
14276 
14277         public java.util.Optional<float[]> intercepts() {
14278             float[] intercepts = Attribute.intercepts.access(float[].class, onnxAttributes);
14279             return java.util.Optional.ofNullable(intercepts).map(float[]::clone);
14280         }
14281 
14282     }
14283 
14284     public static LinearRegressor LinearRegressor(TypeElement resultType, Value X, java.util.Optional<String> post_transform, java.util.Optional<float[]> coefficients, java.util.Optional<Integer> targets, java.util.Optional<float[]> intercepts) {
14285         return new LinearRegressor(resultType, X, post_transform, coefficients, targets, intercepts);
14286     }
14287 
14288     @OpFactory.OpDeclaration(Log.NAME)
14289     public static final class Log extends OnnxOp {
14290         public static final String NAME = "Log";
14291 
14292         public enum Attribute implements OnnxAttribute.None { }
14293 
14294         public enum TypeConstraint implements OnnxTypeConstraint {
14295             T(new OnnxType.TypeVariable("T", List.of(OnnxType.tensor(OnnxType.float16()), OnnxType.tensor(OnnxType.float32()), OnnxType.tensor(OnnxType.float64()), OnnxType.tensor(OnnxType.bfloat16())))),
14296             ;
14297 
14298             final OnnxType.TypeVariable typeVariable;
14299 
14300             TypeConstraint(OnnxType.TypeVariable typeVariable) {
14301                 assert typeVariable.name().equals(name());
14302                 this.typeVariable = typeVariable;
14303             }
14304 
14305             @Override
14306             public OnnxType.TypeVariable typeVariable() {
14307                 return typeVariable;
14308             }
14309         }
14310 
14311         public enum InputParameter implements OnnxParameter {
14312             input(TypeConstraint.T.typeVariable(), Quantifier.REQUIRED),
14313             ;
14314 
14315             final OnnxType type;
14316             final Quantifier quantifier;
14317 
14318             InputParameter(OnnxType type, Quantifier quantifier) {
14319                 this.type = type;
14320                 this.quantifier = quantifier;
14321             }
14322 
14323             @Override
14324             public OnnxType type() {
14325                 return type;
14326             }
14327 
14328             @Override
14329             public Quantifier quantifier() {
14330                 return quantifier;
14331             }
14332         }
14333 
14334         public enum OutputParameter implements OnnxParameter {
14335             output(TypeConstraint.T.typeVariable(), Quantifier.REQUIRED),
14336             ;
14337 
14338             final OnnxType type;
14339             final Quantifier quantifier;
14340 
14341             OutputParameter(OnnxType type, Quantifier quantifier) {
14342                 this.type = type;
14343                 this.quantifier = quantifier;
14344             }
14345 
14346             @Override
14347             public OnnxType type() {
14348                 return type;
14349             }
14350 
14351             @Override
14352             public Quantifier quantifier() {
14353                 return quantifier;
14354             }
14355         }
14356 
14357         public static final OnnxSchema SCHEMA = new OnnxSchemaRecord(
14358                 NAME,
14359                 List.of(Attribute.values()),
14360                 List.of(TypeConstraint.values()),
14361                 List.of(InputParameter.values()),
14362                 List.of(OutputParameter.values())
14363         );
14364 
14365         public Log(ExternalizedOp def) {
14366             super(SCHEMA, def);
14367         }
14368 
14369         Log(Log that, CopyContext cc) {
14370             super(that, cc);
14371         }
14372 
14373         @Override
14374         public Log transform(CopyContext cc, OpTransformer ot) {
14375             return new Log(this, cc);
14376         }
14377 
14378         Log(TypeElement resultType, Value input) {
14379             super(SCHEMA, resultType, Set.of(), List.of(input), List.of());
14380         }
14381 
14382         @Override
14383         public SequencedSet<OnnxParameter> onnxOutputs() {
14384             return onnxOutputs(SCHEMA);
14385         }
14386 
14387         @Override
14388         public SequencedMap<OnnxParameter, Object> onnxInputs() {
14389             return onnxInputs(SCHEMA, List.of(input()));
14390         }
14391 
14392         public Value input() {
14393             return operands().get(0);
14394         }
14395 
14396     }
14397 
14398     public static Log Log(TypeElement resultType, Value input) {
14399         return new Log(resultType, input);
14400     }
14401 
14402     @OpFactory.OpDeclaration(LogSoftmax.NAME)
14403     public static final class LogSoftmax extends OnnxOp {
14404         public static final String NAME = "LogSoftmax";
14405 
14406         public enum Attribute implements OnnxAttribute {
14407             axis(Integer.class, true, -1),
14408             ;
14409 
14410                 final Class<?> t;
14411                 final boolean optional;
14412                 final Object defaultValue;
14413 
14414                 Attribute(Class<?> type, boolean optional, Object defaultValue) {
14415                     this.t = type;
14416                     this.optional = optional;
14417                     this.defaultValue = defaultValue;
14418                     assert optional || defaultValue == null;
14419                 }
14420 
14421                 public Class<?> type() {
14422                     return t;
14423                 }
14424 
14425                 public boolean isOptional() {
14426                     return optional;
14427                 }
14428 
14429                 public Object defaultValue() {
14430                     return defaultValue;
14431                 }
14432         }
14433 
14434         public enum TypeConstraint implements OnnxTypeConstraint {
14435             T(new OnnxType.TypeVariable("T", List.of(OnnxType.tensor(OnnxType.float16()), OnnxType.tensor(OnnxType.float32()), OnnxType.tensor(OnnxType.float64()), OnnxType.tensor(OnnxType.bfloat16())))),
14436             ;
14437 
14438             final OnnxType.TypeVariable typeVariable;
14439 
14440             TypeConstraint(OnnxType.TypeVariable typeVariable) {
14441                 assert typeVariable.name().equals(name());
14442                 this.typeVariable = typeVariable;
14443             }
14444 
14445             @Override
14446             public OnnxType.TypeVariable typeVariable() {
14447                 return typeVariable;
14448             }
14449         }
14450 
14451         public enum InputParameter implements OnnxParameter {
14452             input(TypeConstraint.T.typeVariable(), Quantifier.REQUIRED),
14453             ;
14454 
14455             final OnnxType type;
14456             final Quantifier quantifier;
14457 
14458             InputParameter(OnnxType type, Quantifier quantifier) {
14459                 this.type = type;
14460                 this.quantifier = quantifier;
14461             }
14462 
14463             @Override
14464             public OnnxType type() {
14465                 return type;
14466             }
14467 
14468             @Override
14469             public Quantifier quantifier() {
14470                 return quantifier;
14471             }
14472         }
14473 
14474         public enum OutputParameter implements OnnxParameter {
14475             output(TypeConstraint.T.typeVariable(), Quantifier.REQUIRED),
14476             ;
14477 
14478             final OnnxType type;
14479             final Quantifier quantifier;
14480 
14481             OutputParameter(OnnxType type, Quantifier quantifier) {
14482                 this.type = type;
14483                 this.quantifier = quantifier;
14484             }
14485 
14486             @Override
14487             public OnnxType type() {
14488                 return type;
14489             }
14490 
14491             @Override
14492             public Quantifier quantifier() {
14493                 return quantifier;
14494             }
14495         }
14496 
14497         public static final OnnxSchema SCHEMA = new OnnxSchemaRecord(
14498                 NAME,
14499                 List.of(Attribute.values()),
14500                 List.of(TypeConstraint.values()),
14501                 List.of(InputParameter.values()),
14502                 List.of(OutputParameter.values())
14503         );
14504 
14505         public LogSoftmax(ExternalizedOp def) {
14506             super(SCHEMA, def);
14507         }
14508 
14509         LogSoftmax(LogSoftmax that, CopyContext cc) {
14510             super(that, cc);
14511         }
14512 
14513         @Override
14514         public LogSoftmax transform(CopyContext cc, OpTransformer ot) {
14515             return new LogSoftmax(this, cc);
14516         }
14517 
14518         LogSoftmax(TypeElement resultType, Value input, java.util.Optional<Integer> axis) {
14519             super(SCHEMA, resultType, Set.of(), List.of(input), List.of(axis));
14520         }
14521 
14522         @Override
14523         public SequencedSet<OnnxParameter> onnxOutputs() {
14524             return onnxOutputs(SCHEMA);
14525         }
14526 
14527         @Override
14528         public SequencedMap<OnnxParameter, Object> onnxInputs() {
14529             return onnxInputs(SCHEMA, List.of(input()));
14530         }
14531 
14532         public Value input() {
14533             return operands().get(0);
14534         }
14535 
14536         public java.util.Optional<Integer> axis() {
14537             Integer axis = Attribute.axis.access(Integer.class, onnxAttributes);
14538             return java.util.Optional.ofNullable(axis);
14539         }
14540 
14541     }
14542 
14543     public static LogSoftmax LogSoftmax(TypeElement resultType, Value input, java.util.Optional<Integer> axis) {
14544         return new LogSoftmax(resultType, input, axis);
14545     }
14546 
14547     @OpFactory.OpDeclaration(LpNormalization.NAME)
14548     public static final class LpNormalization extends OnnxOp {
14549         public static final String NAME = "LpNormalization";
14550 
14551         public enum Attribute implements OnnxAttribute {
14552             p(Integer.class, true, 2),
14553             axis(Integer.class, true, -1),
14554             ;
14555 
14556                 final Class<?> t;
14557                 final boolean optional;
14558                 final Object defaultValue;
14559 
14560                 Attribute(Class<?> type, boolean optional, Object defaultValue) {
14561                     this.t = type;
14562                     this.optional = optional;
14563                     this.defaultValue = defaultValue;
14564                     assert optional || defaultValue == null;
14565                 }
14566 
14567                 public Class<?> type() {
14568                     return t;
14569                 }
14570 
14571                 public boolean isOptional() {
14572                     return optional;
14573                 }
14574 
14575                 public Object defaultValue() {
14576                     return defaultValue;
14577                 }
14578         }
14579 
14580         public enum TypeConstraint implements OnnxTypeConstraint {
14581             T(new OnnxType.TypeVariable("T", List.of(OnnxType.tensor(OnnxType.bfloat16()), OnnxType.tensor(OnnxType.float16()), OnnxType.tensor(OnnxType.float32()), OnnxType.tensor(OnnxType.float64())))),
14582             ;
14583 
14584             final OnnxType.TypeVariable typeVariable;
14585 
14586             TypeConstraint(OnnxType.TypeVariable typeVariable) {
14587                 assert typeVariable.name().equals(name());
14588                 this.typeVariable = typeVariable;
14589             }
14590 
14591             @Override
14592             public OnnxType.TypeVariable typeVariable() {
14593                 return typeVariable;
14594             }
14595         }
14596 
14597         public enum InputParameter implements OnnxParameter {
14598             input(TypeConstraint.T.typeVariable(), Quantifier.REQUIRED),
14599             ;
14600 
14601             final OnnxType type;
14602             final Quantifier quantifier;
14603 
14604             InputParameter(OnnxType type, Quantifier quantifier) {
14605                 this.type = type;
14606                 this.quantifier = quantifier;
14607             }
14608 
14609             @Override
14610             public OnnxType type() {
14611                 return type;
14612             }
14613 
14614             @Override
14615             public Quantifier quantifier() {
14616                 return quantifier;
14617             }
14618         }
14619 
14620         public enum OutputParameter implements OnnxParameter {
14621             output(TypeConstraint.T.typeVariable(), Quantifier.REQUIRED),
14622             ;
14623 
14624             final OnnxType type;
14625             final Quantifier quantifier;
14626 
14627             OutputParameter(OnnxType type, Quantifier quantifier) {
14628                 this.type = type;
14629                 this.quantifier = quantifier;
14630             }
14631 
14632             @Override
14633             public OnnxType type() {
14634                 return type;
14635             }
14636 
14637             @Override
14638             public Quantifier quantifier() {
14639                 return quantifier;
14640             }
14641         }
14642 
14643         public static final OnnxSchema SCHEMA = new OnnxSchemaRecord(
14644                 NAME,
14645                 List.of(Attribute.values()),
14646                 List.of(TypeConstraint.values()),
14647                 List.of(InputParameter.values()),
14648                 List.of(OutputParameter.values())
14649         );
14650 
14651         public LpNormalization(ExternalizedOp def) {
14652             super(SCHEMA, def);
14653         }
14654 
14655         LpNormalization(LpNormalization that, CopyContext cc) {
14656             super(that, cc);
14657         }
14658 
14659         @Override
14660         public LpNormalization transform(CopyContext cc, OpTransformer ot) {
14661             return new LpNormalization(this, cc);
14662         }
14663 
14664         LpNormalization(TypeElement resultType, Value input, java.util.Optional<Integer> p, java.util.Optional<Integer> axis) {
14665             super(SCHEMA, resultType, Set.of(), List.of(input), List.of(p, axis));
14666         }
14667 
14668         @Override
14669         public SequencedSet<OnnxParameter> onnxOutputs() {
14670             return onnxOutputs(SCHEMA);
14671         }
14672 
14673         @Override
14674         public SequencedMap<OnnxParameter, Object> onnxInputs() {
14675             return onnxInputs(SCHEMA, List.of(input()));
14676         }
14677 
14678         public Value input() {
14679             return operands().get(0);
14680         }
14681 
14682         public java.util.Optional<Integer> p() {
14683             Integer p = Attribute.p.access(Integer.class, onnxAttributes);
14684             return java.util.Optional.ofNullable(p);
14685         }
14686 
14687         public java.util.Optional<Integer> axis() {
14688             Integer axis = Attribute.axis.access(Integer.class, onnxAttributes);
14689             return java.util.Optional.ofNullable(axis);
14690         }
14691 
14692     }
14693 
14694     public static LpNormalization LpNormalization(TypeElement resultType, Value input, java.util.Optional<Integer> p, java.util.Optional<Integer> axis) {
14695         return new LpNormalization(resultType, input, p, axis);
14696     }
14697 
14698     @OpFactory.OpDeclaration(LpPool.NAME)
14699     public static final class LpPool extends OnnxOp {
14700         public static final String NAME = "LpPool";
14701 
14702         public enum Attribute implements OnnxAttribute {
14703             p(Integer.class, true, 2),
14704             pads(int[].class, true, null),
14705             dilations(int[].class, true, null),
14706             auto_pad(String.class, true, "NOTSET"),
14707             ceil_mode(Integer.class, true, 0),
14708             strides(int[].class, true, null),
14709             kernel_shape(int[].class, false, null),
14710             ;
14711 
14712                 final Class<?> t;
14713                 final boolean optional;
14714                 final Object defaultValue;
14715 
14716                 Attribute(Class<?> type, boolean optional, Object defaultValue) {
14717                     this.t = type;
14718                     this.optional = optional;
14719                     this.defaultValue = defaultValue;
14720                     assert optional || defaultValue == null;
14721                 }
14722 
14723                 public Class<?> type() {
14724                     return t;
14725                 }
14726 
14727                 public boolean isOptional() {
14728                     return optional;
14729                 }
14730 
14731                 public Object defaultValue() {
14732                     return defaultValue;
14733                 }
14734         }
14735 
14736         public enum TypeConstraint implements OnnxTypeConstraint {
14737             T(new OnnxType.TypeVariable("T", List.of(OnnxType.tensor(OnnxType.bfloat16()), OnnxType.tensor(OnnxType.float16()), OnnxType.tensor(OnnxType.float32()), OnnxType.tensor(OnnxType.float64())))),
14738             ;
14739 
14740             final OnnxType.TypeVariable typeVariable;
14741 
14742             TypeConstraint(OnnxType.TypeVariable typeVariable) {
14743                 assert typeVariable.name().equals(name());
14744                 this.typeVariable = typeVariable;
14745             }
14746 
14747             @Override
14748             public OnnxType.TypeVariable typeVariable() {
14749                 return typeVariable;
14750             }
14751         }
14752 
14753         public enum InputParameter implements OnnxParameter {
14754             X(TypeConstraint.T.typeVariable(), Quantifier.REQUIRED),
14755             ;
14756 
14757             final OnnxType type;
14758             final Quantifier quantifier;
14759 
14760             InputParameter(OnnxType type, Quantifier quantifier) {
14761                 this.type = type;
14762                 this.quantifier = quantifier;
14763             }
14764 
14765             @Override
14766             public OnnxType type() {
14767                 return type;
14768             }
14769 
14770             @Override
14771             public Quantifier quantifier() {
14772                 return quantifier;
14773             }
14774         }
14775 
14776         public enum OutputParameter implements OnnxParameter {
14777             Y(TypeConstraint.T.typeVariable(), Quantifier.REQUIRED),
14778             ;
14779 
14780             final OnnxType type;
14781             final Quantifier quantifier;
14782 
14783             OutputParameter(OnnxType type, Quantifier quantifier) {
14784                 this.type = type;
14785                 this.quantifier = quantifier;
14786             }
14787 
14788             @Override
14789             public OnnxType type() {
14790                 return type;
14791             }
14792 
14793             @Override
14794             public Quantifier quantifier() {
14795                 return quantifier;
14796             }
14797         }
14798 
14799         public static final OnnxSchema SCHEMA = new OnnxSchemaRecord(
14800                 NAME,
14801                 List.of(Attribute.values()),
14802                 List.of(TypeConstraint.values()),
14803                 List.of(InputParameter.values()),
14804                 List.of(OutputParameter.values())
14805         );
14806 
14807         public LpPool(ExternalizedOp def) {
14808             super(SCHEMA, def);
14809         }
14810 
14811         LpPool(LpPool that, CopyContext cc) {
14812             super(that, cc);
14813         }
14814 
14815         @Override
14816         public LpPool transform(CopyContext cc, OpTransformer ot) {
14817             return new LpPool(this, cc);
14818         }
14819 
14820         LpPool(TypeElement resultType, Value X, java.util.Optional<Integer> p, java.util.Optional<int[]> pads, java.util.Optional<int[]> dilations, java.util.Optional<String> auto_pad, java.util.Optional<Integer> ceil_mode, java.util.Optional<int[]> strides, int[] kernel_shape) {
14821             super(SCHEMA, resultType, Set.of(), List.of(X), List.of(p, pads, dilations, auto_pad, ceil_mode, strides, kernel_shape));
14822         }
14823 
14824         @Override
14825         public SequencedSet<OnnxParameter> onnxOutputs() {
14826             return onnxOutputs(SCHEMA);
14827         }
14828 
14829         @Override
14830         public SequencedMap<OnnxParameter, Object> onnxInputs() {
14831             return onnxInputs(SCHEMA, List.of(X()));
14832         }
14833 
14834         public Value X() {
14835             return operands().get(0);
14836         }
14837 
14838         public java.util.Optional<Integer> p() {
14839             Integer p = Attribute.p.access(Integer.class, onnxAttributes);
14840             return java.util.Optional.ofNullable(p);
14841         }
14842 
14843         public java.util.Optional<int[]> pads() {
14844             int[] pads = Attribute.pads.access(int[].class, onnxAttributes);
14845             return java.util.Optional.ofNullable(pads).map(int[]::clone);
14846         }
14847 
14848         public java.util.Optional<int[]> dilations() {
14849             int[] dilations = Attribute.dilations.access(int[].class, onnxAttributes);
14850             return java.util.Optional.ofNullable(dilations).map(int[]::clone);
14851         }
14852 
14853         public java.util.Optional<String> auto_pad() {
14854             String auto_pad = Attribute.auto_pad.access(String.class, onnxAttributes);
14855             return java.util.Optional.ofNullable(auto_pad);
14856         }
14857 
14858         public java.util.Optional<Integer> ceil_mode() {
14859             Integer ceil_mode = Attribute.ceil_mode.access(Integer.class, onnxAttributes);
14860             return java.util.Optional.ofNullable(ceil_mode);
14861         }
14862 
14863         public java.util.Optional<int[]> strides() {
14864             int[] strides = Attribute.strides.access(int[].class, onnxAttributes);
14865             return java.util.Optional.ofNullable(strides).map(int[]::clone);
14866         }
14867 
14868         public int[] kernel_shape() {
14869             int[] kernel_shape = Attribute.kernel_shape.access(int[].class, onnxAttributes);
14870             return kernel_shape.clone();
14871         }
14872 
14873     }
14874 
14875     public static LpPool LpPool(TypeElement resultType, Value X, java.util.Optional<Integer> p, java.util.Optional<int[]> pads, java.util.Optional<int[]> dilations, java.util.Optional<String> auto_pad, java.util.Optional<Integer> ceil_mode, java.util.Optional<int[]> strides, int[] kernel_shape) {
14876         return new LpPool(resultType, X, p, pads, dilations, auto_pad, ceil_mode, strides, kernel_shape);
14877     }
14878 
14879     @OpFactory.OpDeclaration(MatMul.NAME)
14880     public static final class MatMul extends OnnxOp {
14881         public static final String NAME = "MatMul";
14882 
14883         public enum Attribute implements OnnxAttribute.None { }
14884 
14885         public enum TypeConstraint implements OnnxTypeConstraint {
14886             T(new OnnxType.TypeVariable("T", List.of(OnnxType.tensor(OnnxType.float16()), OnnxType.tensor(OnnxType.float32()), OnnxType.tensor(OnnxType.float64()), OnnxType.tensor(OnnxType.uint32()), OnnxType.tensor(OnnxType.uint64()), OnnxType.tensor(OnnxType.int32()), OnnxType.tensor(OnnxType.int64()), OnnxType.tensor(OnnxType.bfloat16())))),
14887             ;
14888 
14889             final OnnxType.TypeVariable typeVariable;
14890 
14891             TypeConstraint(OnnxType.TypeVariable typeVariable) {
14892                 assert typeVariable.name().equals(name());
14893                 this.typeVariable = typeVariable;
14894             }
14895 
14896             @Override
14897             public OnnxType.TypeVariable typeVariable() {
14898                 return typeVariable;
14899             }
14900         }
14901 
14902         public enum InputParameter implements OnnxParameter {
14903             A(TypeConstraint.T.typeVariable(), Quantifier.REQUIRED),
14904             B(TypeConstraint.T.typeVariable(), Quantifier.REQUIRED),
14905             ;
14906 
14907             final OnnxType type;
14908             final Quantifier quantifier;
14909 
14910             InputParameter(OnnxType type, Quantifier quantifier) {
14911                 this.type = type;
14912                 this.quantifier = quantifier;
14913             }
14914 
14915             @Override
14916             public OnnxType type() {
14917                 return type;
14918             }
14919 
14920             @Override
14921             public Quantifier quantifier() {
14922                 return quantifier;
14923             }
14924         }
14925 
14926         public enum OutputParameter implements OnnxParameter {
14927             Y(TypeConstraint.T.typeVariable(), Quantifier.REQUIRED),
14928             ;
14929 
14930             final OnnxType type;
14931             final Quantifier quantifier;
14932 
14933             OutputParameter(OnnxType type, Quantifier quantifier) {
14934                 this.type = type;
14935                 this.quantifier = quantifier;
14936             }
14937 
14938             @Override
14939             public OnnxType type() {
14940                 return type;
14941             }
14942 
14943             @Override
14944             public Quantifier quantifier() {
14945                 return quantifier;
14946             }
14947         }
14948 
14949         public static final OnnxSchema SCHEMA = new OnnxSchemaRecord(
14950                 NAME,
14951                 List.of(Attribute.values()),
14952                 List.of(TypeConstraint.values()),
14953                 List.of(InputParameter.values()),
14954                 List.of(OutputParameter.values())
14955         );
14956 
14957         public MatMul(ExternalizedOp def) {
14958             super(SCHEMA, def);
14959         }
14960 
14961         MatMul(MatMul that, CopyContext cc) {
14962             super(that, cc);
14963         }
14964 
14965         @Override
14966         public MatMul transform(CopyContext cc, OpTransformer ot) {
14967             return new MatMul(this, cc);
14968         }
14969 
14970         MatMul(TypeElement resultType, Value A, Value B) {
14971             super(SCHEMA, resultType, Set.of(), List.of(A, B), List.of());
14972         }
14973 
14974         @Override
14975         public SequencedSet<OnnxParameter> onnxOutputs() {
14976             return onnxOutputs(SCHEMA);
14977         }
14978 
14979         @Override
14980         public SequencedMap<OnnxParameter, Object> onnxInputs() {
14981             return onnxInputs(SCHEMA, List.of(A(), B()));
14982         }
14983 
14984         public Value A() {
14985             return operands().get(0);
14986         }
14987 
14988         public Value B() {
14989             return operands().get(1);
14990         }
14991 
14992     }
14993 
14994     public static MatMul MatMul(TypeElement resultType, Value A, Value B) {
14995         return new MatMul(resultType, A, B);
14996     }
14997 
14998     @OpFactory.OpDeclaration(MatMulInteger.NAME)
14999     public static final class MatMulInteger extends OnnxOp {
15000         public static final String NAME = "MatMulInteger";
15001 
15002         public enum Attribute implements OnnxAttribute.None { }
15003 
15004         public enum TypeConstraint implements OnnxTypeConstraint {
15005             T1(new OnnxType.TypeVariable("T1", List.of(OnnxType.tensor(OnnxType.int8()), OnnxType.tensor(OnnxType.uint8())))),
15006             T2(new OnnxType.TypeVariable("T2", List.of(OnnxType.tensor(OnnxType.int8()), OnnxType.tensor(OnnxType.uint8())))),
15007             T3(new OnnxType.TypeVariable("T3", List.of(OnnxType.tensor(OnnxType.int32())))),
15008             ;
15009 
15010             final OnnxType.TypeVariable typeVariable;
15011 
15012             TypeConstraint(OnnxType.TypeVariable typeVariable) {
15013                 assert typeVariable.name().equals(name());
15014                 this.typeVariable = typeVariable;
15015             }
15016 
15017             @Override
15018             public OnnxType.TypeVariable typeVariable() {
15019                 return typeVariable;
15020             }
15021         }
15022 
15023         public enum InputParameter implements OnnxParameter {
15024             A(TypeConstraint.T1.typeVariable(), Quantifier.REQUIRED),
15025             B(TypeConstraint.T2.typeVariable(), Quantifier.REQUIRED),
15026             a_zero_point(TypeConstraint.T1.typeVariable(), Quantifier.OPTIONAL),
15027             b_zero_point(TypeConstraint.T2.typeVariable(), Quantifier.OPTIONAL),
15028             ;
15029 
15030             final OnnxType type;
15031             final Quantifier quantifier;
15032 
15033             InputParameter(OnnxType type, Quantifier quantifier) {
15034                 this.type = type;
15035                 this.quantifier = quantifier;
15036             }
15037 
15038             @Override
15039             public OnnxType type() {
15040                 return type;
15041             }
15042 
15043             @Override
15044             public Quantifier quantifier() {
15045                 return quantifier;
15046             }
15047         }
15048 
15049         public enum OutputParameter implements OnnxParameter {
15050             Y(TypeConstraint.T3.typeVariable(), Quantifier.REQUIRED),
15051             ;
15052 
15053             final OnnxType type;
15054             final Quantifier quantifier;
15055 
15056             OutputParameter(OnnxType type, Quantifier quantifier) {
15057                 this.type = type;
15058                 this.quantifier = quantifier;
15059             }
15060 
15061             @Override
15062             public OnnxType type() {
15063                 return type;
15064             }
15065 
15066             @Override
15067             public Quantifier quantifier() {
15068                 return quantifier;
15069             }
15070         }
15071 
15072         public static final OnnxSchema SCHEMA = new OnnxSchemaRecord(
15073                 NAME,
15074                 List.of(Attribute.values()),
15075                 List.of(TypeConstraint.values()),
15076                 List.of(InputParameter.values()),
15077                 List.of(OutputParameter.values())
15078         );
15079 
15080         public MatMulInteger(ExternalizedOp def) {
15081             super(SCHEMA, def);
15082         }
15083 
15084         MatMulInteger(MatMulInteger that, CopyContext cc) {
15085             super(that, cc);
15086         }
15087 
15088         @Override
15089         public MatMulInteger transform(CopyContext cc, OpTransformer ot) {
15090             return new MatMulInteger(this, cc);
15091         }
15092 
15093         MatMulInteger(TypeElement resultType, Value A, Value B, java.util.Optional<Value> a_zero_point, java.util.Optional<Value> b_zero_point) {
15094             super(SCHEMA, resultType, Set.of(), List.of(A, B, a_zero_point, b_zero_point), List.of());
15095         }
15096 
15097         @Override
15098         public SequencedSet<OnnxParameter> onnxOutputs() {
15099             return onnxOutputs(SCHEMA);
15100         }
15101 
15102         @Override
15103         public SequencedMap<OnnxParameter, Object> onnxInputs() {
15104             return onnxInputs(SCHEMA, List.of(A(), B(), a_zero_point(), b_zero_point()));
15105         }
15106 
15107         public Value A() {
15108             return operands().get(0);
15109         }
15110 
15111         public Value B() {
15112             return operands().get(1);
15113         }
15114 
15115         public java.util.Optional<Value> a_zero_point() {
15116             int i = optionalInputArguments.indexOf(InputParameter.a_zero_point);
15117             return i != -1 ? java.util.Optional.of(operands().get(2 + i)) : java.util.Optional.empty();
15118         }
15119 
15120         public java.util.Optional<Value> b_zero_point() {
15121             int i = optionalInputArguments.indexOf(InputParameter.b_zero_point);
15122             return i != -1 ? java.util.Optional.of(operands().get(2 + i)) : java.util.Optional.empty();
15123         }
15124 
15125     }
15126 
15127     public static MatMulInteger MatMulInteger(TypeElement resultType, Value A, Value B, java.util.Optional<Value> a_zero_point, java.util.Optional<Value> b_zero_point) {
15128         return new MatMulInteger(resultType, A, B, a_zero_point, b_zero_point);
15129     }
15130 
15131     @OpFactory.OpDeclaration(Max.NAME)
15132     public static final class Max extends OnnxOp {
15133         public static final String NAME = "Max";
15134 
15135         public enum Attribute implements OnnxAttribute.None { }
15136 
15137         public enum TypeConstraint implements OnnxTypeConstraint {
15138             T(new OnnxType.TypeVariable("T", List.of(OnnxType.tensor(OnnxType.uint8()), OnnxType.tensor(OnnxType.uint16()), OnnxType.tensor(OnnxType.uint32()), OnnxType.tensor(OnnxType.uint64()), OnnxType.tensor(OnnxType.int8()), OnnxType.tensor(OnnxType.int16()), OnnxType.tensor(OnnxType.int32()), OnnxType.tensor(OnnxType.int64()), OnnxType.tensor(OnnxType.float16()), OnnxType.tensor(OnnxType.float32()), OnnxType.tensor(OnnxType.float64()), OnnxType.tensor(OnnxType.bfloat16())))),
15139             ;
15140 
15141             final OnnxType.TypeVariable typeVariable;
15142 
15143             TypeConstraint(OnnxType.TypeVariable typeVariable) {
15144                 assert typeVariable.name().equals(name());
15145                 this.typeVariable = typeVariable;
15146             }
15147 
15148             @Override
15149             public OnnxType.TypeVariable typeVariable() {
15150                 return typeVariable;
15151             }
15152         }
15153 
15154         public enum InputParameter implements OnnxParameter {
15155             data_0(TypeConstraint.T.typeVariable(), Quantifier.VARIADIC),
15156             ;
15157 
15158             final OnnxType type;
15159             final Quantifier quantifier;
15160 
15161             InputParameter(OnnxType type, Quantifier quantifier) {
15162                 this.type = type;
15163                 this.quantifier = quantifier;
15164             }
15165 
15166             @Override
15167             public OnnxType type() {
15168                 return type;
15169             }
15170 
15171             @Override
15172             public Quantifier quantifier() {
15173                 return quantifier;
15174             }
15175         }
15176 
15177         public enum OutputParameter implements OnnxParameter {
15178             max(TypeConstraint.T.typeVariable(), Quantifier.REQUIRED),
15179             ;
15180 
15181             final OnnxType type;
15182             final Quantifier quantifier;
15183 
15184             OutputParameter(OnnxType type, Quantifier quantifier) {
15185                 this.type = type;
15186                 this.quantifier = quantifier;
15187             }
15188 
15189             @Override
15190             public OnnxType type() {
15191                 return type;
15192             }
15193 
15194             @Override
15195             public Quantifier quantifier() {
15196                 return quantifier;
15197             }
15198         }
15199 
15200         public static final OnnxSchema SCHEMA = new OnnxSchemaRecord(
15201                 NAME,
15202                 List.of(Attribute.values()),
15203                 List.of(TypeConstraint.values()),
15204                 List.of(InputParameter.values()),
15205                 List.of(OutputParameter.values())
15206         );
15207 
15208         public Max(ExternalizedOp def) {
15209             super(SCHEMA, def);
15210         }
15211 
15212         Max(Max that, CopyContext cc) {
15213             super(that, cc);
15214         }
15215 
15216         @Override
15217         public Max transform(CopyContext cc, OpTransformer ot) {
15218             return new Max(this, cc);
15219         }
15220 
15221         Max(TypeElement resultType, List<Value> data_0) {
15222             super(SCHEMA, resultType, Set.of(), List.of(data_0), List.of());
15223         }
15224 
15225         @Override
15226         public SequencedSet<OnnxParameter> onnxOutputs() {
15227             return onnxOutputs(SCHEMA);
15228         }
15229 
15230         @Override
15231         public SequencedMap<OnnxParameter, Object> onnxInputs() {
15232             return onnxInputs(SCHEMA, List.of(data_0()));
15233         }
15234 
15235         public List<Value> data_0() {
15236             return operands();
15237         }
15238 
15239     }
15240 
15241     public static Max Max(TypeElement resultType, List<Value> data_0) {
15242         return new Max(resultType, data_0);
15243     }
15244 
15245     @OpFactory.OpDeclaration(MaxPool.NAME)
15246     public static final class MaxPool extends OnnxOp {
15247         public static final String NAME = "MaxPool";
15248 
15249         public enum Attribute implements OnnxAttribute {
15250             pads(int[].class, true, null),
15251             dilations(int[].class, true, null),
15252             auto_pad(String.class, true, "NOTSET"),
15253             ceil_mode(Integer.class, true, 0),
15254             storage_order(Integer.class, true, 0),
15255             strides(int[].class, true, null),
15256             kernel_shape(int[].class, false, null),
15257             ;
15258 
15259                 final Class<?> t;
15260                 final boolean optional;
15261                 final Object defaultValue;
15262 
15263                 Attribute(Class<?> type, boolean optional, Object defaultValue) {
15264                     this.t = type;
15265                     this.optional = optional;
15266                     this.defaultValue = defaultValue;
15267                     assert optional || defaultValue == null;
15268                 }
15269 
15270                 public Class<?> type() {
15271                     return t;
15272                 }
15273 
15274                 public boolean isOptional() {
15275                     return optional;
15276                 }
15277 
15278                 public Object defaultValue() {
15279                     return defaultValue;
15280                 }
15281         }
15282 
15283         public enum TypeConstraint implements OnnxTypeConstraint {
15284             T(new OnnxType.TypeVariable("T", List.of(OnnxType.tensor(OnnxType.bfloat16()), OnnxType.tensor(OnnxType.float16()), OnnxType.tensor(OnnxType.float32()), OnnxType.tensor(OnnxType.float64()), OnnxType.tensor(OnnxType.int8()), OnnxType.tensor(OnnxType.uint8())))),
15285             I(new OnnxType.TypeVariable("I", List.of(OnnxType.tensor(OnnxType.int64())))),
15286             ;
15287 
15288             final OnnxType.TypeVariable typeVariable;
15289 
15290             TypeConstraint(OnnxType.TypeVariable typeVariable) {
15291                 assert typeVariable.name().equals(name());
15292                 this.typeVariable = typeVariable;
15293             }
15294 
15295             @Override
15296             public OnnxType.TypeVariable typeVariable() {
15297                 return typeVariable;
15298             }
15299         }
15300 
15301         public enum InputParameter implements OnnxParameter {
15302             X(TypeConstraint.T.typeVariable(), Quantifier.REQUIRED),
15303             ;
15304 
15305             final OnnxType type;
15306             final Quantifier quantifier;
15307 
15308             InputParameter(OnnxType type, Quantifier quantifier) {
15309                 this.type = type;
15310                 this.quantifier = quantifier;
15311             }
15312 
15313             @Override
15314             public OnnxType type() {
15315                 return type;
15316             }
15317 
15318             @Override
15319             public Quantifier quantifier() {
15320                 return quantifier;
15321             }
15322         }
15323 
15324         public enum OutputParameter implements OnnxParameter {
15325             Y(TypeConstraint.T.typeVariable(), Quantifier.REQUIRED),
15326             Indices(TypeConstraint.I.typeVariable(), Quantifier.OPTIONAL),
15327             ;
15328 
15329             final OnnxType type;
15330             final Quantifier quantifier;
15331 
15332             OutputParameter(OnnxType type, Quantifier quantifier) {
15333                 this.type = type;
15334                 this.quantifier = quantifier;
15335             }
15336 
15337             @Override
15338             public OnnxType type() {
15339                 return type;
15340             }
15341 
15342             @Override
15343             public Quantifier quantifier() {
15344                 return quantifier;
15345             }
15346         }
15347 
15348         public static final OnnxSchema SCHEMA = new OnnxSchemaRecord(
15349                 NAME,
15350                 List.of(Attribute.values()),
15351                 List.of(TypeConstraint.values()),
15352                 List.of(InputParameter.values()),
15353                 List.of(OutputParameter.values())
15354         );
15355 
15356         public MaxPool(ExternalizedOp def) {
15357             super(SCHEMA, def);
15358         }
15359 
15360         MaxPool(MaxPool that, CopyContext cc) {
15361             super(that, cc);
15362         }
15363 
15364         @Override
15365         public MaxPool transform(CopyContext cc, OpTransformer ot) {
15366             return new MaxPool(this, cc);
15367         }
15368 
15369         MaxPool(TypeElement resultType, Set<OutputParameter> optionalOutputs, Value X, java.util.Optional<int[]> pads, java.util.Optional<int[]> dilations, java.util.Optional<String> auto_pad, java.util.Optional<Integer> ceil_mode, java.util.Optional<Integer> storage_order, java.util.Optional<int[]> strides, int[] kernel_shape) {
15370             super(SCHEMA, resultType, optionalOutputs, List.of(X), List.of(pads, dilations, auto_pad, ceil_mode, storage_order, strides, kernel_shape));
15371         }
15372 
15373         @Override
15374         public SequencedSet<OnnxParameter> onnxOutputs() {
15375             return onnxOutputs(SCHEMA);
15376         }
15377 
15378         @Override
15379         public SequencedMap<OnnxParameter, Object> onnxInputs() {
15380             return onnxInputs(SCHEMA, List.of(X()));
15381         }
15382 
15383         public Value X() {
15384             return operands().get(0);
15385         }
15386 
15387         public java.util.Optional<int[]> pads() {
15388             int[] pads = Attribute.pads.access(int[].class, onnxAttributes);
15389             return java.util.Optional.ofNullable(pads).map(int[]::clone);
15390         }
15391 
15392         public java.util.Optional<int[]> dilations() {
15393             int[] dilations = Attribute.dilations.access(int[].class, onnxAttributes);
15394             return java.util.Optional.ofNullable(dilations).map(int[]::clone);
15395         }
15396 
15397         public java.util.Optional<String> auto_pad() {
15398             String auto_pad = Attribute.auto_pad.access(String.class, onnxAttributes);
15399             return java.util.Optional.ofNullable(auto_pad);
15400         }
15401 
15402         public java.util.Optional<Integer> ceil_mode() {
15403             Integer ceil_mode = Attribute.ceil_mode.access(Integer.class, onnxAttributes);
15404             return java.util.Optional.ofNullable(ceil_mode);
15405         }
15406 
15407         public java.util.Optional<Integer> storage_order() {
15408             Integer storage_order = Attribute.storage_order.access(Integer.class, onnxAttributes);
15409             return java.util.Optional.ofNullable(storage_order);
15410         }
15411 
15412         public java.util.Optional<int[]> strides() {
15413             int[] strides = Attribute.strides.access(int[].class, onnxAttributes);
15414             return java.util.Optional.ofNullable(strides).map(int[]::clone);
15415         }
15416 
15417         public int[] kernel_shape() {
15418             int[] kernel_shape = Attribute.kernel_shape.access(int[].class, onnxAttributes);
15419             return kernel_shape.clone();
15420         }
15421 
15422     }
15423 
15424     public static MaxPool MaxPool(TypeElement resultType, Set<MaxPool.OutputParameter> optionalOutputs, Value X, java.util.Optional<int[]> pads, java.util.Optional<int[]> dilations, java.util.Optional<String> auto_pad, java.util.Optional<Integer> ceil_mode, java.util.Optional<Integer> storage_order, java.util.Optional<int[]> strides, int[] kernel_shape) {
15425         return new MaxPool(resultType, optionalOutputs, X, pads, dilations, auto_pad, ceil_mode, storage_order, strides, kernel_shape);
15426     }
15427 
15428     @OpFactory.OpDeclaration(MaxRoiPool.NAME)
15429     public static final class MaxRoiPool extends OnnxOp {
15430         public static final String NAME = "MaxRoiPool";
15431 
15432         public enum Attribute implements OnnxAttribute {
15433             spatial_scale(Float.class, true, 1.0f),
15434             pooled_shape(int[].class, false, null),
15435             ;
15436 
15437                 final Class<?> t;
15438                 final boolean optional;
15439                 final Object defaultValue;
15440 
15441                 Attribute(Class<?> type, boolean optional, Object defaultValue) {
15442                     this.t = type;
15443                     this.optional = optional;
15444                     this.defaultValue = defaultValue;
15445                     assert optional || defaultValue == null;
15446                 }
15447 
15448                 public Class<?> type() {
15449                     return t;
15450                 }
15451 
15452                 public boolean isOptional() {
15453                     return optional;
15454                 }
15455 
15456                 public Object defaultValue() {
15457                     return defaultValue;
15458                 }
15459         }
15460 
15461         public enum TypeConstraint implements OnnxTypeConstraint {
15462             T(new OnnxType.TypeVariable("T", List.of(OnnxType.tensor(OnnxType.bfloat16()), OnnxType.tensor(OnnxType.float16()), OnnxType.tensor(OnnxType.float32()), OnnxType.tensor(OnnxType.float64())))),
15463             ;
15464 
15465             final OnnxType.TypeVariable typeVariable;
15466 
15467             TypeConstraint(OnnxType.TypeVariable typeVariable) {
15468                 assert typeVariable.name().equals(name());
15469                 this.typeVariable = typeVariable;
15470             }
15471 
15472             @Override
15473             public OnnxType.TypeVariable typeVariable() {
15474                 return typeVariable;
15475             }
15476         }
15477 
15478         public enum InputParameter implements OnnxParameter {
15479             X(TypeConstraint.T.typeVariable(), Quantifier.REQUIRED),
15480             rois(TypeConstraint.T.typeVariable(), Quantifier.REQUIRED),
15481             ;
15482 
15483             final OnnxType type;
15484             final Quantifier quantifier;
15485 
15486             InputParameter(OnnxType type, Quantifier quantifier) {
15487                 this.type = type;
15488                 this.quantifier = quantifier;
15489             }
15490 
15491             @Override
15492             public OnnxType type() {
15493                 return type;
15494             }
15495 
15496             @Override
15497             public Quantifier quantifier() {
15498                 return quantifier;
15499             }
15500         }
15501 
15502         public enum OutputParameter implements OnnxParameter {
15503             Y(TypeConstraint.T.typeVariable(), Quantifier.REQUIRED),
15504             ;
15505 
15506             final OnnxType type;
15507             final Quantifier quantifier;
15508 
15509             OutputParameter(OnnxType type, Quantifier quantifier) {
15510                 this.type = type;
15511                 this.quantifier = quantifier;
15512             }
15513 
15514             @Override
15515             public OnnxType type() {
15516                 return type;
15517             }
15518 
15519             @Override
15520             public Quantifier quantifier() {
15521                 return quantifier;
15522             }
15523         }
15524 
15525         public static final OnnxSchema SCHEMA = new OnnxSchemaRecord(
15526                 NAME,
15527                 List.of(Attribute.values()),
15528                 List.of(TypeConstraint.values()),
15529                 List.of(InputParameter.values()),
15530                 List.of(OutputParameter.values())
15531         );
15532 
15533         public MaxRoiPool(ExternalizedOp def) {
15534             super(SCHEMA, def);
15535         }
15536 
15537         MaxRoiPool(MaxRoiPool that, CopyContext cc) {
15538             super(that, cc);
15539         }
15540 
15541         @Override
15542         public MaxRoiPool transform(CopyContext cc, OpTransformer ot) {
15543             return new MaxRoiPool(this, cc);
15544         }
15545 
15546         MaxRoiPool(TypeElement resultType, Value X, Value rois, java.util.Optional<Float> spatial_scale, int[] pooled_shape) {
15547             super(SCHEMA, resultType, Set.of(), List.of(X, rois), List.of(spatial_scale, pooled_shape));
15548         }
15549 
15550         @Override
15551         public SequencedSet<OnnxParameter> onnxOutputs() {
15552             return onnxOutputs(SCHEMA);
15553         }
15554 
15555         @Override
15556         public SequencedMap<OnnxParameter, Object> onnxInputs() {
15557             return onnxInputs(SCHEMA, List.of(X(), rois()));
15558         }
15559 
15560         public Value X() {
15561             return operands().get(0);
15562         }
15563 
15564         public Value rois() {
15565             return operands().get(1);
15566         }
15567 
15568         public java.util.Optional<Float> spatial_scale() {
15569             Float spatial_scale = Attribute.spatial_scale.access(Float.class, onnxAttributes);
15570             return java.util.Optional.ofNullable(spatial_scale);
15571         }
15572 
15573         public int[] pooled_shape() {
15574             int[] pooled_shape = Attribute.pooled_shape.access(int[].class, onnxAttributes);
15575             return pooled_shape.clone();
15576         }
15577 
15578     }
15579 
15580     public static MaxRoiPool MaxRoiPool(TypeElement resultType, Value X, Value rois, java.util.Optional<Float> spatial_scale, int[] pooled_shape) {
15581         return new MaxRoiPool(resultType, X, rois, spatial_scale, pooled_shape);
15582     }
15583 
15584     @OpFactory.OpDeclaration(MaxUnpool.NAME)
15585     public static final class MaxUnpool extends OnnxOp {
15586         public static final String NAME = "MaxUnpool";
15587 
15588         public enum Attribute implements OnnxAttribute {
15589             pads(int[].class, true, null),
15590             strides(int[].class, true, null),
15591             kernel_shape(int[].class, false, null),
15592             ;
15593 
15594                 final Class<?> t;
15595                 final boolean optional;
15596                 final Object defaultValue;
15597 
15598                 Attribute(Class<?> type, boolean optional, Object defaultValue) {
15599                     this.t = type;
15600                     this.optional = optional;
15601                     this.defaultValue = defaultValue;
15602                     assert optional || defaultValue == null;
15603                 }
15604 
15605                 public Class<?> type() {
15606                     return t;
15607                 }
15608 
15609                 public boolean isOptional() {
15610                     return optional;
15611                 }
15612 
15613                 public Object defaultValue() {
15614                     return defaultValue;
15615                 }
15616         }
15617 
15618         public enum TypeConstraint implements OnnxTypeConstraint {
15619             T1(new OnnxType.TypeVariable("T1", List.of(OnnxType.tensor(OnnxType.bfloat16()), OnnxType.tensor(OnnxType.float16()), OnnxType.tensor(OnnxType.float32()), OnnxType.tensor(OnnxType.float64())))),
15620             T2(new OnnxType.TypeVariable("T2", List.of(OnnxType.tensor(OnnxType.int64())))),
15621             ;
15622 
15623             final OnnxType.TypeVariable typeVariable;
15624 
15625             TypeConstraint(OnnxType.TypeVariable typeVariable) {
15626                 assert typeVariable.name().equals(name());
15627                 this.typeVariable = typeVariable;
15628             }
15629 
15630             @Override
15631             public OnnxType.TypeVariable typeVariable() {
15632                 return typeVariable;
15633             }
15634         }
15635 
15636         public enum InputParameter implements OnnxParameter {
15637             X(TypeConstraint.T1.typeVariable(), Quantifier.REQUIRED),
15638             I(TypeConstraint.T2.typeVariable(), Quantifier.REQUIRED),
15639             output_shape(TypeConstraint.T2.typeVariable(), Quantifier.OPTIONAL),
15640             ;
15641 
15642             final OnnxType type;
15643             final Quantifier quantifier;
15644 
15645             InputParameter(OnnxType type, Quantifier quantifier) {
15646                 this.type = type;
15647                 this.quantifier = quantifier;
15648             }
15649 
15650             @Override
15651             public OnnxType type() {
15652                 return type;
15653             }
15654 
15655             @Override
15656             public Quantifier quantifier() {
15657                 return quantifier;
15658             }
15659         }
15660 
15661         public enum OutputParameter implements OnnxParameter {
15662             output(TypeConstraint.T1.typeVariable(), Quantifier.REQUIRED),
15663             ;
15664 
15665             final OnnxType type;
15666             final Quantifier quantifier;
15667 
15668             OutputParameter(OnnxType type, Quantifier quantifier) {
15669                 this.type = type;
15670                 this.quantifier = quantifier;
15671             }
15672 
15673             @Override
15674             public OnnxType type() {
15675                 return type;
15676             }
15677 
15678             @Override
15679             public Quantifier quantifier() {
15680                 return quantifier;
15681             }
15682         }
15683 
15684         public static final OnnxSchema SCHEMA = new OnnxSchemaRecord(
15685                 NAME,
15686                 List.of(Attribute.values()),
15687                 List.of(TypeConstraint.values()),
15688                 List.of(InputParameter.values()),
15689                 List.of(OutputParameter.values())
15690         );
15691 
15692         public MaxUnpool(ExternalizedOp def) {
15693             super(SCHEMA, def);
15694         }
15695 
15696         MaxUnpool(MaxUnpool that, CopyContext cc) {
15697             super(that, cc);
15698         }
15699 
15700         @Override
15701         public MaxUnpool transform(CopyContext cc, OpTransformer ot) {
15702             return new MaxUnpool(this, cc);
15703         }
15704 
15705         MaxUnpool(TypeElement resultType, Value X, Value I, java.util.Optional<Value> output_shape, java.util.Optional<int[]> pads, java.util.Optional<int[]> strides, int[] kernel_shape) {
15706             super(SCHEMA, resultType, Set.of(), List.of(X, I, output_shape), List.of(pads, strides, kernel_shape));
15707         }
15708 
15709         @Override
15710         public SequencedSet<OnnxParameter> onnxOutputs() {
15711             return onnxOutputs(SCHEMA);
15712         }
15713 
15714         @Override
15715         public SequencedMap<OnnxParameter, Object> onnxInputs() {
15716             return onnxInputs(SCHEMA, List.of(X(), I(), output_shape()));
15717         }
15718 
15719         public Value X() {
15720             return operands().get(0);
15721         }
15722 
15723         public Value I() {
15724             return operands().get(1);
15725         }
15726 
15727         public java.util.Optional<Value> output_shape() {
15728             int i = optionalInputArguments.indexOf(InputParameter.output_shape);
15729             return i != -1 ? java.util.Optional.of(operands().get(2 + i)) : java.util.Optional.empty();
15730         }
15731 
15732         public java.util.Optional<int[]> pads() {
15733             int[] pads = Attribute.pads.access(int[].class, onnxAttributes);
15734             return java.util.Optional.ofNullable(pads).map(int[]::clone);
15735         }
15736 
15737         public java.util.Optional<int[]> strides() {
15738             int[] strides = Attribute.strides.access(int[].class, onnxAttributes);
15739             return java.util.Optional.ofNullable(strides).map(int[]::clone);
15740         }
15741 
15742         public int[] kernel_shape() {
15743             int[] kernel_shape = Attribute.kernel_shape.access(int[].class, onnxAttributes);
15744             return kernel_shape.clone();
15745         }
15746 
15747     }
15748 
15749     public static MaxUnpool MaxUnpool(TypeElement resultType, Value X, Value I, java.util.Optional<Value> output_shape, java.util.Optional<int[]> pads, java.util.Optional<int[]> strides, int[] kernel_shape) {
15750         return new MaxUnpool(resultType, X, I, output_shape, pads, strides, kernel_shape);
15751     }
15752 
15753     @OpFactory.OpDeclaration(Mean.NAME)
15754     public static final class Mean extends OnnxOp {
15755         public static final String NAME = "Mean";
15756 
15757         public enum Attribute implements OnnxAttribute.None { }
15758 
15759         public enum TypeConstraint implements OnnxTypeConstraint {
15760             T(new OnnxType.TypeVariable("T", List.of(OnnxType.tensor(OnnxType.float16()), OnnxType.tensor(OnnxType.float32()), OnnxType.tensor(OnnxType.float64()), OnnxType.tensor(OnnxType.bfloat16())))),
15761             ;
15762 
15763             final OnnxType.TypeVariable typeVariable;
15764 
15765             TypeConstraint(OnnxType.TypeVariable typeVariable) {
15766                 assert typeVariable.name().equals(name());
15767                 this.typeVariable = typeVariable;
15768             }
15769 
15770             @Override
15771             public OnnxType.TypeVariable typeVariable() {
15772                 return typeVariable;
15773             }
15774         }
15775 
15776         public enum InputParameter implements OnnxParameter {
15777             data_0(TypeConstraint.T.typeVariable(), Quantifier.VARIADIC),
15778             ;
15779 
15780             final OnnxType type;
15781             final Quantifier quantifier;
15782 
15783             InputParameter(OnnxType type, Quantifier quantifier) {
15784                 this.type = type;
15785                 this.quantifier = quantifier;
15786             }
15787 
15788             @Override
15789             public OnnxType type() {
15790                 return type;
15791             }
15792 
15793             @Override
15794             public Quantifier quantifier() {
15795                 return quantifier;
15796             }
15797         }
15798 
15799         public enum OutputParameter implements OnnxParameter {
15800             mean(TypeConstraint.T.typeVariable(), Quantifier.REQUIRED),
15801             ;
15802 
15803             final OnnxType type;
15804             final Quantifier quantifier;
15805 
15806             OutputParameter(OnnxType type, Quantifier quantifier) {
15807                 this.type = type;
15808                 this.quantifier = quantifier;
15809             }
15810 
15811             @Override
15812             public OnnxType type() {
15813                 return type;
15814             }
15815 
15816             @Override
15817             public Quantifier quantifier() {
15818                 return quantifier;
15819             }
15820         }
15821 
15822         public static final OnnxSchema SCHEMA = new OnnxSchemaRecord(
15823                 NAME,
15824                 List.of(Attribute.values()),
15825                 List.of(TypeConstraint.values()),
15826                 List.of(InputParameter.values()),
15827                 List.of(OutputParameter.values())
15828         );
15829 
15830         public Mean(ExternalizedOp def) {
15831             super(SCHEMA, def);
15832         }
15833 
15834         Mean(Mean that, CopyContext cc) {
15835             super(that, cc);
15836         }
15837 
15838         @Override
15839         public Mean transform(CopyContext cc, OpTransformer ot) {
15840             return new Mean(this, cc);
15841         }
15842 
15843         Mean(TypeElement resultType, List<Value> data_0) {
15844             super(SCHEMA, resultType, Set.of(), List.of(data_0), List.of());
15845         }
15846 
15847         @Override
15848         public SequencedSet<OnnxParameter> onnxOutputs() {
15849             return onnxOutputs(SCHEMA);
15850         }
15851 
15852         @Override
15853         public SequencedMap<OnnxParameter, Object> onnxInputs() {
15854             return onnxInputs(SCHEMA, List.of(data_0()));
15855         }
15856 
15857         public List<Value> data_0() {
15858             return operands();
15859         }
15860 
15861     }
15862 
15863     public static Mean Mean(TypeElement resultType, List<Value> data_0) {
15864         return new Mean(resultType, data_0);
15865     }
15866 
15867     @OpFactory.OpDeclaration(MeanVarianceNormalization.NAME)
15868     public static final class MeanVarianceNormalization extends OnnxOp {
15869         public static final String NAME = "MeanVarianceNormalization";
15870 
15871         public enum Attribute implements OnnxAttribute {
15872             axes(int[].class, true, null),
15873             ;
15874 
15875                 final Class<?> t;
15876                 final boolean optional;
15877                 final Object defaultValue;
15878 
15879                 Attribute(Class<?> type, boolean optional, Object defaultValue) {
15880                     this.t = type;
15881                     this.optional = optional;
15882                     this.defaultValue = defaultValue;
15883                     assert optional || defaultValue == null;
15884                 }
15885 
15886                 public Class<?> type() {
15887                     return t;
15888                 }
15889 
15890                 public boolean isOptional() {
15891                     return optional;
15892                 }
15893 
15894                 public Object defaultValue() {
15895                     return defaultValue;
15896                 }
15897         }
15898 
15899         public enum TypeConstraint implements OnnxTypeConstraint {
15900             T(new OnnxType.TypeVariable("T", List.of(OnnxType.tensor(OnnxType.float16()), OnnxType.tensor(OnnxType.float32()), OnnxType.tensor(OnnxType.float64()), OnnxType.tensor(OnnxType.bfloat16())))),
15901             ;
15902 
15903             final OnnxType.TypeVariable typeVariable;
15904 
15905             TypeConstraint(OnnxType.TypeVariable typeVariable) {
15906                 assert typeVariable.name().equals(name());
15907                 this.typeVariable = typeVariable;
15908             }
15909 
15910             @Override
15911             public OnnxType.TypeVariable typeVariable() {
15912                 return typeVariable;
15913             }
15914         }
15915 
15916         public enum InputParameter implements OnnxParameter {
15917             X(TypeConstraint.T.typeVariable(), Quantifier.REQUIRED),
15918             ;
15919 
15920             final OnnxType type;
15921             final Quantifier quantifier;
15922 
15923             InputParameter(OnnxType type, Quantifier quantifier) {
15924                 this.type = type;
15925                 this.quantifier = quantifier;
15926             }
15927 
15928             @Override
15929             public OnnxType type() {
15930                 return type;
15931             }
15932 
15933             @Override
15934             public Quantifier quantifier() {
15935                 return quantifier;
15936             }
15937         }
15938 
15939         public enum OutputParameter implements OnnxParameter {
15940             Y(TypeConstraint.T.typeVariable(), Quantifier.REQUIRED),
15941             ;
15942 
15943             final OnnxType type;
15944             final Quantifier quantifier;
15945 
15946             OutputParameter(OnnxType type, Quantifier quantifier) {
15947                 this.type = type;
15948                 this.quantifier = quantifier;
15949             }
15950 
15951             @Override
15952             public OnnxType type() {
15953                 return type;
15954             }
15955 
15956             @Override
15957             public Quantifier quantifier() {
15958                 return quantifier;
15959             }
15960         }
15961 
15962         public static final OnnxSchema SCHEMA = new OnnxSchemaRecord(
15963                 NAME,
15964                 List.of(Attribute.values()),
15965                 List.of(TypeConstraint.values()),
15966                 List.of(InputParameter.values()),
15967                 List.of(OutputParameter.values())
15968         );
15969 
15970         public MeanVarianceNormalization(ExternalizedOp def) {
15971             super(SCHEMA, def);
15972         }
15973 
15974         MeanVarianceNormalization(MeanVarianceNormalization that, CopyContext cc) {
15975             super(that, cc);
15976         }
15977 
15978         @Override
15979         public MeanVarianceNormalization transform(CopyContext cc, OpTransformer ot) {
15980             return new MeanVarianceNormalization(this, cc);
15981         }
15982 
15983         MeanVarianceNormalization(TypeElement resultType, Value X, java.util.Optional<int[]> axes) {
15984             super(SCHEMA, resultType, Set.of(), List.of(X), List.of(axes));
15985         }
15986 
15987         @Override
15988         public SequencedSet<OnnxParameter> onnxOutputs() {
15989             return onnxOutputs(SCHEMA);
15990         }
15991 
15992         @Override
15993         public SequencedMap<OnnxParameter, Object> onnxInputs() {
15994             return onnxInputs(SCHEMA, List.of(X()));
15995         }
15996 
15997         public Value X() {
15998             return operands().get(0);
15999         }
16000 
16001         public java.util.Optional<int[]> axes() {
16002             int[] axes = Attribute.axes.access(int[].class, onnxAttributes);
16003             return java.util.Optional.ofNullable(axes).map(int[]::clone);
16004         }
16005 
16006     }
16007 
16008     public static MeanVarianceNormalization MeanVarianceNormalization(TypeElement resultType, Value X, java.util.Optional<int[]> axes) {
16009         return new MeanVarianceNormalization(resultType, X, axes);
16010     }
16011 
16012     @OpFactory.OpDeclaration(MelWeightMatrix.NAME)
16013     public static final class MelWeightMatrix extends OnnxOp {
16014         public static final String NAME = "MelWeightMatrix";
16015 
16016         public enum Attribute implements OnnxAttribute {
16017             output_datatype(Integer.class, true, 1),
16018             ;
16019 
16020                 final Class<?> t;
16021                 final boolean optional;
16022                 final Object defaultValue;
16023 
16024                 Attribute(Class<?> type, boolean optional, Object defaultValue) {
16025                     this.t = type;
16026                     this.optional = optional;
16027                     this.defaultValue = defaultValue;
16028                     assert optional || defaultValue == null;
16029                 }
16030 
16031                 public Class<?> type() {
16032                     return t;
16033                 }
16034 
16035                 public boolean isOptional() {
16036                     return optional;
16037                 }
16038 
16039                 public Object defaultValue() {
16040                     return defaultValue;
16041                 }
16042         }
16043 
16044         public enum TypeConstraint implements OnnxTypeConstraint {
16045             T1(new OnnxType.TypeVariable("T1", List.of(OnnxType.tensor(OnnxType.int32()), OnnxType.tensor(OnnxType.int64())))),
16046             T2(new OnnxType.TypeVariable("T2", List.of(OnnxType.tensor(OnnxType.float32()), OnnxType.tensor(OnnxType.float16()), OnnxType.tensor(OnnxType.float64()), OnnxType.tensor(OnnxType.bfloat16())))),
16047             T3(new OnnxType.TypeVariable("T3", List.of(OnnxType.tensor(OnnxType.uint8()), OnnxType.tensor(OnnxType.uint16()), OnnxType.tensor(OnnxType.uint32()), OnnxType.tensor(OnnxType.uint64()), OnnxType.tensor(OnnxType.int8()), OnnxType.tensor(OnnxType.int16()), OnnxType.tensor(OnnxType.int32()), OnnxType.tensor(OnnxType.int64()), OnnxType.tensor(OnnxType.float16()), OnnxType.tensor(OnnxType.float32()), OnnxType.tensor(OnnxType.float64()), OnnxType.tensor(OnnxType.bfloat16())))),
16048             ;
16049 
16050             final OnnxType.TypeVariable typeVariable;
16051 
16052             TypeConstraint(OnnxType.TypeVariable typeVariable) {
16053                 assert typeVariable.name().equals(name());
16054                 this.typeVariable = typeVariable;
16055             }
16056 
16057             @Override
16058             public OnnxType.TypeVariable typeVariable() {
16059                 return typeVariable;
16060             }
16061         }
16062 
16063         public enum InputParameter implements OnnxParameter {
16064             num_mel_bins(TypeConstraint.T1.typeVariable(), Quantifier.REQUIRED),
16065             dft_length(TypeConstraint.T1.typeVariable(), Quantifier.REQUIRED),
16066             sample_rate(TypeConstraint.T1.typeVariable(), Quantifier.REQUIRED),
16067             lower_edge_hertz(TypeConstraint.T2.typeVariable(), Quantifier.REQUIRED),
16068             upper_edge_hertz(TypeConstraint.T2.typeVariable(), Quantifier.REQUIRED),
16069             ;
16070 
16071             final OnnxType type;
16072             final Quantifier quantifier;
16073 
16074             InputParameter(OnnxType type, Quantifier quantifier) {
16075                 this.type = type;
16076                 this.quantifier = quantifier;
16077             }
16078 
16079             @Override
16080             public OnnxType type() {
16081                 return type;
16082             }
16083 
16084             @Override
16085             public Quantifier quantifier() {
16086                 return quantifier;
16087             }
16088         }
16089 
16090         public enum OutputParameter implements OnnxParameter {
16091             output(TypeConstraint.T3.typeVariable(), Quantifier.REQUIRED),
16092             ;
16093 
16094             final OnnxType type;
16095             final Quantifier quantifier;
16096 
16097             OutputParameter(OnnxType type, Quantifier quantifier) {
16098                 this.type = type;
16099                 this.quantifier = quantifier;
16100             }
16101 
16102             @Override
16103             public OnnxType type() {
16104                 return type;
16105             }
16106 
16107             @Override
16108             public Quantifier quantifier() {
16109                 return quantifier;
16110             }
16111         }
16112 
16113         public static final OnnxSchema SCHEMA = new OnnxSchemaRecord(
16114                 NAME,
16115                 List.of(Attribute.values()),
16116                 List.of(TypeConstraint.values()),
16117                 List.of(InputParameter.values()),
16118                 List.of(OutputParameter.values())
16119         );
16120 
16121         public MelWeightMatrix(ExternalizedOp def) {
16122             super(SCHEMA, def);
16123         }
16124 
16125         MelWeightMatrix(MelWeightMatrix that, CopyContext cc) {
16126             super(that, cc);
16127         }
16128 
16129         @Override
16130         public MelWeightMatrix transform(CopyContext cc, OpTransformer ot) {
16131             return new MelWeightMatrix(this, cc);
16132         }
16133 
16134         MelWeightMatrix(TypeElement resultType, Value num_mel_bins, Value dft_length, Value sample_rate, Value lower_edge_hertz, Value upper_edge_hertz, java.util.Optional<Integer> output_datatype) {
16135             super(SCHEMA, resultType, Set.of(), List.of(num_mel_bins, dft_length, sample_rate, lower_edge_hertz, upper_edge_hertz), List.of(output_datatype));
16136         }
16137 
16138         @Override
16139         public SequencedSet<OnnxParameter> onnxOutputs() {
16140             return onnxOutputs(SCHEMA);
16141         }
16142 
16143         @Override
16144         public SequencedMap<OnnxParameter, Object> onnxInputs() {
16145             return onnxInputs(SCHEMA, List.of(num_mel_bins(), dft_length(), sample_rate(), lower_edge_hertz(), upper_edge_hertz()));
16146         }
16147 
16148         public Value num_mel_bins() {
16149             return operands().get(0);
16150         }
16151 
16152         public Value dft_length() {
16153             return operands().get(1);
16154         }
16155 
16156         public Value sample_rate() {
16157             return operands().get(2);
16158         }
16159 
16160         public Value lower_edge_hertz() {
16161             return operands().get(3);
16162         }
16163 
16164         public Value upper_edge_hertz() {
16165             return operands().get(4);
16166         }
16167 
16168         public java.util.Optional<Integer> output_datatype() {
16169             Integer output_datatype = Attribute.output_datatype.access(Integer.class, onnxAttributes);
16170             return java.util.Optional.ofNullable(output_datatype);
16171         }
16172 
16173     }
16174 
16175     public static MelWeightMatrix MelWeightMatrix(TypeElement resultType, Value num_mel_bins, Value dft_length, Value sample_rate, Value lower_edge_hertz, Value upper_edge_hertz, java.util.Optional<Integer> output_datatype) {
16176         return new MelWeightMatrix(resultType, num_mel_bins, dft_length, sample_rate, lower_edge_hertz, upper_edge_hertz, output_datatype);
16177     }
16178 
16179     @OpFactory.OpDeclaration(Min.NAME)
16180     public static final class Min extends OnnxOp {
16181         public static final String NAME = "Min";
16182 
16183         public enum Attribute implements OnnxAttribute.None { }
16184 
16185         public enum TypeConstraint implements OnnxTypeConstraint {
16186             T(new OnnxType.TypeVariable("T", List.of(OnnxType.tensor(OnnxType.uint8()), OnnxType.tensor(OnnxType.uint16()), OnnxType.tensor(OnnxType.uint32()), OnnxType.tensor(OnnxType.uint64()), OnnxType.tensor(OnnxType.int8()), OnnxType.tensor(OnnxType.int16()), OnnxType.tensor(OnnxType.int32()), OnnxType.tensor(OnnxType.int64()), OnnxType.tensor(OnnxType.float16()), OnnxType.tensor(OnnxType.float32()), OnnxType.tensor(OnnxType.float64()), OnnxType.tensor(OnnxType.bfloat16())))),
16187             ;
16188 
16189             final OnnxType.TypeVariable typeVariable;
16190 
16191             TypeConstraint(OnnxType.TypeVariable typeVariable) {
16192                 assert typeVariable.name().equals(name());
16193                 this.typeVariable = typeVariable;
16194             }
16195 
16196             @Override
16197             public OnnxType.TypeVariable typeVariable() {
16198                 return typeVariable;
16199             }
16200         }
16201 
16202         public enum InputParameter implements OnnxParameter {
16203             data_0(TypeConstraint.T.typeVariable(), Quantifier.VARIADIC),
16204             ;
16205 
16206             final OnnxType type;
16207             final Quantifier quantifier;
16208 
16209             InputParameter(OnnxType type, Quantifier quantifier) {
16210                 this.type = type;
16211                 this.quantifier = quantifier;
16212             }
16213 
16214             @Override
16215             public OnnxType type() {
16216                 return type;
16217             }
16218 
16219             @Override
16220             public Quantifier quantifier() {
16221                 return quantifier;
16222             }
16223         }
16224 
16225         public enum OutputParameter implements OnnxParameter {
16226             min(TypeConstraint.T.typeVariable(), Quantifier.REQUIRED),
16227             ;
16228 
16229             final OnnxType type;
16230             final Quantifier quantifier;
16231 
16232             OutputParameter(OnnxType type, Quantifier quantifier) {
16233                 this.type = type;
16234                 this.quantifier = quantifier;
16235             }
16236 
16237             @Override
16238             public OnnxType type() {
16239                 return type;
16240             }
16241 
16242             @Override
16243             public Quantifier quantifier() {
16244                 return quantifier;
16245             }
16246         }
16247 
16248         public static final OnnxSchema SCHEMA = new OnnxSchemaRecord(
16249                 NAME,
16250                 List.of(Attribute.values()),
16251                 List.of(TypeConstraint.values()),
16252                 List.of(InputParameter.values()),
16253                 List.of(OutputParameter.values())
16254         );
16255 
16256         public Min(ExternalizedOp def) {
16257             super(SCHEMA, def);
16258         }
16259 
16260         Min(Min that, CopyContext cc) {
16261             super(that, cc);
16262         }
16263 
16264         @Override
16265         public Min transform(CopyContext cc, OpTransformer ot) {
16266             return new Min(this, cc);
16267         }
16268 
16269         Min(TypeElement resultType, List<Value> data_0) {
16270             super(SCHEMA, resultType, Set.of(), List.of(data_0), List.of());
16271         }
16272 
16273         @Override
16274         public SequencedSet<OnnxParameter> onnxOutputs() {
16275             return onnxOutputs(SCHEMA);
16276         }
16277 
16278         @Override
16279         public SequencedMap<OnnxParameter, Object> onnxInputs() {
16280             return onnxInputs(SCHEMA, List.of(data_0()));
16281         }
16282 
16283         public List<Value> data_0() {
16284             return operands();
16285         }
16286 
16287     }
16288 
16289     public static Min Min(TypeElement resultType, List<Value> data_0) {
16290         return new Min(resultType, data_0);
16291     }
16292 
16293     @OpFactory.OpDeclaration(Mish.NAME)
16294     public static final class Mish extends OnnxOp {
16295         public static final String NAME = "Mish";
16296 
16297         public enum Attribute implements OnnxAttribute.None { }
16298 
16299         public enum TypeConstraint implements OnnxTypeConstraint {
16300             T(new OnnxType.TypeVariable("T", List.of(OnnxType.tensor(OnnxType.bfloat16()), OnnxType.tensor(OnnxType.float16()), OnnxType.tensor(OnnxType.float32()), OnnxType.tensor(OnnxType.float64())))),
16301             ;
16302 
16303             final OnnxType.TypeVariable typeVariable;
16304 
16305             TypeConstraint(OnnxType.TypeVariable typeVariable) {
16306                 assert typeVariable.name().equals(name());
16307                 this.typeVariable = typeVariable;
16308             }
16309 
16310             @Override
16311             public OnnxType.TypeVariable typeVariable() {
16312                 return typeVariable;
16313             }
16314         }
16315 
16316         public enum InputParameter implements OnnxParameter {
16317             X(TypeConstraint.T.typeVariable(), Quantifier.REQUIRED),
16318             ;
16319 
16320             final OnnxType type;
16321             final Quantifier quantifier;
16322 
16323             InputParameter(OnnxType type, Quantifier quantifier) {
16324                 this.type = type;
16325                 this.quantifier = quantifier;
16326             }
16327 
16328             @Override
16329             public OnnxType type() {
16330                 return type;
16331             }
16332 
16333             @Override
16334             public Quantifier quantifier() {
16335                 return quantifier;
16336             }
16337         }
16338 
16339         public enum OutputParameter implements OnnxParameter {
16340             Y(TypeConstraint.T.typeVariable(), Quantifier.REQUIRED),
16341             ;
16342 
16343             final OnnxType type;
16344             final Quantifier quantifier;
16345 
16346             OutputParameter(OnnxType type, Quantifier quantifier) {
16347                 this.type = type;
16348                 this.quantifier = quantifier;
16349             }
16350 
16351             @Override
16352             public OnnxType type() {
16353                 return type;
16354             }
16355 
16356             @Override
16357             public Quantifier quantifier() {
16358                 return quantifier;
16359             }
16360         }
16361 
16362         public static final OnnxSchema SCHEMA = new OnnxSchemaRecord(
16363                 NAME,
16364                 List.of(Attribute.values()),
16365                 List.of(TypeConstraint.values()),
16366                 List.of(InputParameter.values()),
16367                 List.of(OutputParameter.values())
16368         );
16369 
16370         public Mish(ExternalizedOp def) {
16371             super(SCHEMA, def);
16372         }
16373 
16374         Mish(Mish that, CopyContext cc) {
16375             super(that, cc);
16376         }
16377 
16378         @Override
16379         public Mish transform(CopyContext cc, OpTransformer ot) {
16380             return new Mish(this, cc);
16381         }
16382 
16383         Mish(TypeElement resultType, Value X) {
16384             super(SCHEMA, resultType, Set.of(), List.of(X), List.of());
16385         }
16386 
16387         @Override
16388         public SequencedSet<OnnxParameter> onnxOutputs() {
16389             return onnxOutputs(SCHEMA);
16390         }
16391 
16392         @Override
16393         public SequencedMap<OnnxParameter, Object> onnxInputs() {
16394             return onnxInputs(SCHEMA, List.of(X()));
16395         }
16396 
16397         public Value X() {
16398             return operands().get(0);
16399         }
16400 
16401     }
16402 
16403     public static Mish Mish(TypeElement resultType, Value X) {
16404         return new Mish(resultType, X);
16405     }
16406 
16407     @OpFactory.OpDeclaration(Mod.NAME)
16408     public static final class Mod extends OnnxOp {
16409         public static final String NAME = "Mod";
16410 
16411         public enum Attribute implements OnnxAttribute {
16412             fmod(Integer.class, true, 0),
16413             ;
16414 
16415                 final Class<?> t;
16416                 final boolean optional;
16417                 final Object defaultValue;
16418 
16419                 Attribute(Class<?> type, boolean optional, Object defaultValue) {
16420                     this.t = type;
16421                     this.optional = optional;
16422                     this.defaultValue = defaultValue;
16423                     assert optional || defaultValue == null;
16424                 }
16425 
16426                 public Class<?> type() {
16427                     return t;
16428                 }
16429 
16430                 public boolean isOptional() {
16431                     return optional;
16432                 }
16433 
16434                 public Object defaultValue() {
16435                     return defaultValue;
16436                 }
16437         }
16438 
16439         public enum TypeConstraint implements OnnxTypeConstraint {
16440             T(new OnnxType.TypeVariable("T", List.of(OnnxType.tensor(OnnxType.uint8()), OnnxType.tensor(OnnxType.uint16()), OnnxType.tensor(OnnxType.uint32()), OnnxType.tensor(OnnxType.uint64()), OnnxType.tensor(OnnxType.int8()), OnnxType.tensor(OnnxType.int16()), OnnxType.tensor(OnnxType.int32()), OnnxType.tensor(OnnxType.int64()), OnnxType.tensor(OnnxType.float16()), OnnxType.tensor(OnnxType.float32()), OnnxType.tensor(OnnxType.float64()), OnnxType.tensor(OnnxType.bfloat16())))),
16441             ;
16442 
16443             final OnnxType.TypeVariable typeVariable;
16444 
16445             TypeConstraint(OnnxType.TypeVariable typeVariable) {
16446                 assert typeVariable.name().equals(name());
16447                 this.typeVariable = typeVariable;
16448             }
16449 
16450             @Override
16451             public OnnxType.TypeVariable typeVariable() {
16452                 return typeVariable;
16453             }
16454         }
16455 
16456         public enum InputParameter implements OnnxParameter {
16457             A(TypeConstraint.T.typeVariable(), Quantifier.REQUIRED),
16458             B(TypeConstraint.T.typeVariable(), Quantifier.REQUIRED),
16459             ;
16460 
16461             final OnnxType type;
16462             final Quantifier quantifier;
16463 
16464             InputParameter(OnnxType type, Quantifier quantifier) {
16465                 this.type = type;
16466                 this.quantifier = quantifier;
16467             }
16468 
16469             @Override
16470             public OnnxType type() {
16471                 return type;
16472             }
16473 
16474             @Override
16475             public Quantifier quantifier() {
16476                 return quantifier;
16477             }
16478         }
16479 
16480         public enum OutputParameter implements OnnxParameter {
16481             C(TypeConstraint.T.typeVariable(), Quantifier.REQUIRED),
16482             ;
16483 
16484             final OnnxType type;
16485             final Quantifier quantifier;
16486 
16487             OutputParameter(OnnxType type, Quantifier quantifier) {
16488                 this.type = type;
16489                 this.quantifier = quantifier;
16490             }
16491 
16492             @Override
16493             public OnnxType type() {
16494                 return type;
16495             }
16496 
16497             @Override
16498             public Quantifier quantifier() {
16499                 return quantifier;
16500             }
16501         }
16502 
16503         public static final OnnxSchema SCHEMA = new OnnxSchemaRecord(
16504                 NAME,
16505                 List.of(Attribute.values()),
16506                 List.of(TypeConstraint.values()),
16507                 List.of(InputParameter.values()),
16508                 List.of(OutputParameter.values())
16509         );
16510 
16511         public Mod(ExternalizedOp def) {
16512             super(SCHEMA, def);
16513         }
16514 
16515         Mod(Mod that, CopyContext cc) {
16516             super(that, cc);
16517         }
16518 
16519         @Override
16520         public Mod transform(CopyContext cc, OpTransformer ot) {
16521             return new Mod(this, cc);
16522         }
16523 
16524         Mod(TypeElement resultType, Value A, Value B, java.util.Optional<Integer> fmod) {
16525             super(SCHEMA, resultType, Set.of(), List.of(A, B), List.of(fmod));
16526         }
16527 
16528         @Override
16529         public SequencedSet<OnnxParameter> onnxOutputs() {
16530             return onnxOutputs(SCHEMA);
16531         }
16532 
16533         @Override
16534         public SequencedMap<OnnxParameter, Object> onnxInputs() {
16535             return onnxInputs(SCHEMA, List.of(A(), B()));
16536         }
16537 
16538         public Value A() {
16539             return operands().get(0);
16540         }
16541 
16542         public Value B() {
16543             return operands().get(1);
16544         }
16545 
16546         public java.util.Optional<Integer> fmod() {
16547             Integer fmod = Attribute.fmod.access(Integer.class, onnxAttributes);
16548             return java.util.Optional.ofNullable(fmod);
16549         }
16550 
16551     }
16552 
16553     public static Mod Mod(TypeElement resultType, Value A, Value B, java.util.Optional<Integer> fmod) {
16554         return new Mod(resultType, A, B, fmod);
16555     }
16556 
16557     @OpFactory.OpDeclaration(Momentum.NAME)
16558     public static final class Momentum extends OnnxOp {
16559         public static final String NAME = "Momentum";
16560 
16561         public enum Attribute implements OnnxAttribute {
16562             mode(String.class, false, null),
16563             norm_coefficient(Float.class, false, null),
16564             alpha(Float.class, false, null),
16565             beta(Float.class, false, null),
16566             ;
16567 
16568                 final Class<?> t;
16569                 final boolean optional;
16570                 final Object defaultValue;
16571 
16572                 Attribute(Class<?> type, boolean optional, Object defaultValue) {
16573                     this.t = type;
16574                     this.optional = optional;
16575                     this.defaultValue = defaultValue;
16576                     assert optional || defaultValue == null;
16577                 }
16578 
16579                 public Class<?> type() {
16580                     return t;
16581                 }
16582 
16583                 public boolean isOptional() {
16584                     return optional;
16585                 }
16586 
16587                 public Object defaultValue() {
16588                     return defaultValue;
16589                 }
16590         }
16591 
16592         public enum TypeConstraint implements OnnxTypeConstraint {
16593             T1(new OnnxType.TypeVariable("T1", List.of(OnnxType.tensor(OnnxType.float32()), OnnxType.tensor(OnnxType.float64())))),
16594             T2(new OnnxType.TypeVariable("T2", List.of(OnnxType.tensor(OnnxType.int64())))),
16595             T3(new OnnxType.TypeVariable("T3", List.of(OnnxType.tensor(OnnxType.float32()), OnnxType.tensor(OnnxType.float64())))),
16596             ;
16597 
16598             final OnnxType.TypeVariable typeVariable;
16599 
16600             TypeConstraint(OnnxType.TypeVariable typeVariable) {
16601                 assert typeVariable.name().equals(name());
16602                 this.typeVariable = typeVariable;
16603             }
16604 
16605             @Override
16606             public OnnxType.TypeVariable typeVariable() {
16607                 return typeVariable;
16608             }
16609         }
16610 
16611         public enum InputParameter implements OnnxParameter {
16612             R(TypeConstraint.T1.typeVariable(), Quantifier.REQUIRED),
16613             T(TypeConstraint.T2.typeVariable(), Quantifier.REQUIRED),
16614             inputs(TypeConstraint.T3.typeVariable(), Quantifier.VARIADIC),
16615             ;
16616 
16617             final OnnxType type;
16618             final Quantifier quantifier;
16619 
16620             InputParameter(OnnxType type, Quantifier quantifier) {
16621                 this.type = type;
16622                 this.quantifier = quantifier;
16623             }
16624 
16625             @Override
16626             public OnnxType type() {
16627                 return type;
16628             }
16629 
16630             @Override
16631             public Quantifier quantifier() {
16632                 return quantifier;
16633             }
16634         }
16635 
16636         public enum OutputParameter implements OnnxParameter {
16637             outputs(TypeConstraint.T3.typeVariable(), Quantifier.VARIADIC),
16638             ;
16639 
16640             final OnnxType type;
16641             final Quantifier quantifier;
16642 
16643             OutputParameter(OnnxType type, Quantifier quantifier) {
16644                 this.type = type;
16645                 this.quantifier = quantifier;
16646             }
16647 
16648             @Override
16649             public OnnxType type() {
16650                 return type;
16651             }
16652 
16653             @Override
16654             public Quantifier quantifier() {
16655                 return quantifier;
16656             }
16657         }
16658 
16659         public static final OnnxSchema SCHEMA = new OnnxSchemaRecord(
16660                 NAME,
16661                 List.of(Attribute.values()),
16662                 List.of(TypeConstraint.values()),
16663                 List.of(InputParameter.values()),
16664                 List.of(OutputParameter.values())
16665         );
16666 
16667         public Momentum(ExternalizedOp def) {
16668             super(SCHEMA, def);
16669         }
16670 
16671         Momentum(Momentum that, CopyContext cc) {
16672             super(that, cc);
16673         }
16674 
16675         @Override
16676         public Momentum transform(CopyContext cc, OpTransformer ot) {
16677             return new Momentum(this, cc);
16678         }
16679 
16680         Momentum(TypeElement resultType, Value R, Value T, List<Value> inputs, String mode, float norm_coefficient, float alpha, float beta) {
16681             super(SCHEMA, resultType, Set.of(), List.of(R, T, inputs), List.of(mode, norm_coefficient, alpha, beta));
16682         }
16683 
16684         @Override
16685         public SequencedSet<OnnxParameter> onnxOutputs() {
16686             return onnxOutputs(SCHEMA);
16687         }
16688 
16689         @Override
16690         public SequencedMap<OnnxParameter, Object> onnxInputs() {
16691             return onnxInputs(SCHEMA, List.of(R(), T(), inputs()));
16692         }
16693 
16694         public Value R() {
16695             return operands().get(0);
16696         }
16697 
16698         public Value T() {
16699             return operands().get(1);
16700         }
16701 
16702         public List<Value> inputs() {
16703             return operands().subList(2, operands().size());
16704         }
16705 
16706         public String mode() {
16707             String mode = Attribute.mode.access(String.class, onnxAttributes);
16708             return mode;
16709         }
16710 
16711         public float norm_coefficient() {
16712             float norm_coefficient = Attribute.norm_coefficient.access(float.class, onnxAttributes);
16713             return norm_coefficient;
16714         }
16715 
16716         public float alpha() {
16717             float alpha = Attribute.alpha.access(float.class, onnxAttributes);
16718             return alpha;
16719         }
16720 
16721         public float beta() {
16722             float beta = Attribute.beta.access(float.class, onnxAttributes);
16723             return beta;
16724         }
16725 
16726     }
16727 
16728     public static Momentum Momentum(TypeElement resultType, Value R, Value T, List<Value> inputs, String mode, float norm_coefficient, float alpha, float beta) {
16729         return new Momentum(resultType, R, T, inputs, mode, norm_coefficient, alpha, beta);
16730     }
16731 
16732     @OpFactory.OpDeclaration(Mul.NAME)
16733     public static final class Mul extends OnnxOp {
16734         public static final String NAME = "Mul";
16735 
16736         public enum Attribute implements OnnxAttribute.None { }
16737 
16738         public enum TypeConstraint implements OnnxTypeConstraint {
16739             T(new OnnxType.TypeVariable("T", List.of(OnnxType.tensor(OnnxType.uint8()), OnnxType.tensor(OnnxType.uint16()), OnnxType.tensor(OnnxType.uint32()), OnnxType.tensor(OnnxType.uint64()), OnnxType.tensor(OnnxType.int8()), OnnxType.tensor(OnnxType.int16()), OnnxType.tensor(OnnxType.int32()), OnnxType.tensor(OnnxType.int64()), OnnxType.tensor(OnnxType.float16()), OnnxType.tensor(OnnxType.float32()), OnnxType.tensor(OnnxType.float64()), OnnxType.tensor(OnnxType.bfloat16())))),
16740             ;
16741 
16742             final OnnxType.TypeVariable typeVariable;
16743 
16744             TypeConstraint(OnnxType.TypeVariable typeVariable) {
16745                 assert typeVariable.name().equals(name());
16746                 this.typeVariable = typeVariable;
16747             }
16748 
16749             @Override
16750             public OnnxType.TypeVariable typeVariable() {
16751                 return typeVariable;
16752             }
16753         }
16754 
16755         public enum InputParameter implements OnnxParameter {
16756             A(TypeConstraint.T.typeVariable(), Quantifier.REQUIRED),
16757             B(TypeConstraint.T.typeVariable(), Quantifier.REQUIRED),
16758             ;
16759 
16760             final OnnxType type;
16761             final Quantifier quantifier;
16762 
16763             InputParameter(OnnxType type, Quantifier quantifier) {
16764                 this.type = type;
16765                 this.quantifier = quantifier;
16766             }
16767 
16768             @Override
16769             public OnnxType type() {
16770                 return type;
16771             }
16772 
16773             @Override
16774             public Quantifier quantifier() {
16775                 return quantifier;
16776             }
16777         }
16778 
16779         public enum OutputParameter implements OnnxParameter {
16780             C(TypeConstraint.T.typeVariable(), Quantifier.REQUIRED),
16781             ;
16782 
16783             final OnnxType type;
16784             final Quantifier quantifier;
16785 
16786             OutputParameter(OnnxType type, Quantifier quantifier) {
16787                 this.type = type;
16788                 this.quantifier = quantifier;
16789             }
16790 
16791             @Override
16792             public OnnxType type() {
16793                 return type;
16794             }
16795 
16796             @Override
16797             public Quantifier quantifier() {
16798                 return quantifier;
16799             }
16800         }
16801 
16802         public static final OnnxSchema SCHEMA = new OnnxSchemaRecord(
16803                 NAME,
16804                 List.of(Attribute.values()),
16805                 List.of(TypeConstraint.values()),
16806                 List.of(InputParameter.values()),
16807                 List.of(OutputParameter.values())
16808         );
16809 
16810         public Mul(ExternalizedOp def) {
16811             super(SCHEMA, def);
16812         }
16813 
16814         Mul(Mul that, CopyContext cc) {
16815             super(that, cc);
16816         }
16817 
16818         @Override
16819         public Mul transform(CopyContext cc, OpTransformer ot) {
16820             return new Mul(this, cc);
16821         }
16822 
16823         Mul(TypeElement resultType, Value A, Value B) {
16824             super(SCHEMA, resultType, Set.of(), List.of(A, B), List.of());
16825         }
16826 
16827         @Override
16828         public SequencedSet<OnnxParameter> onnxOutputs() {
16829             return onnxOutputs(SCHEMA);
16830         }
16831 
16832         @Override
16833         public SequencedMap<OnnxParameter, Object> onnxInputs() {
16834             return onnxInputs(SCHEMA, List.of(A(), B()));
16835         }
16836 
16837         public Value A() {
16838             return operands().get(0);
16839         }
16840 
16841         public Value B() {
16842             return operands().get(1);
16843         }
16844 
16845     }
16846 
16847     public static Mul Mul(TypeElement resultType, Value A, Value B) {
16848         return new Mul(resultType, A, B);
16849     }
16850 
16851     @OpFactory.OpDeclaration(Multinomial.NAME)
16852     public static final class Multinomial extends OnnxOp {
16853         public static final String NAME = "Multinomial";
16854 
16855         public enum Attribute implements OnnxAttribute {
16856             seed(Float.class, true, null),
16857             sample_size(Integer.class, true, 1),
16858             dtype(Integer.class, true, 6),
16859             ;
16860 
16861                 final Class<?> t;
16862                 final boolean optional;
16863                 final Object defaultValue;
16864 
16865                 Attribute(Class<?> type, boolean optional, Object defaultValue) {
16866                     this.t = type;
16867                     this.optional = optional;
16868                     this.defaultValue = defaultValue;
16869                     assert optional || defaultValue == null;
16870                 }
16871 
16872                 public Class<?> type() {
16873                     return t;
16874                 }
16875 
16876                 public boolean isOptional() {
16877                     return optional;
16878                 }
16879 
16880                 public Object defaultValue() {
16881                     return defaultValue;
16882                 }
16883         }
16884 
16885         public enum TypeConstraint implements OnnxTypeConstraint {
16886             T1(new OnnxType.TypeVariable("T1", List.of(OnnxType.tensor(OnnxType.bfloat16()), OnnxType.tensor(OnnxType.float16()), OnnxType.tensor(OnnxType.float32()), OnnxType.tensor(OnnxType.float64())))),
16887             T2(new OnnxType.TypeVariable("T2", List.of(OnnxType.tensor(OnnxType.int32()), OnnxType.tensor(OnnxType.int64())))),
16888             ;
16889 
16890             final OnnxType.TypeVariable typeVariable;
16891 
16892             TypeConstraint(OnnxType.TypeVariable typeVariable) {
16893                 assert typeVariable.name().equals(name());
16894                 this.typeVariable = typeVariable;
16895             }
16896 
16897             @Override
16898             public OnnxType.TypeVariable typeVariable() {
16899                 return typeVariable;
16900             }
16901         }
16902 
16903         public enum InputParameter implements OnnxParameter {
16904             input(TypeConstraint.T1.typeVariable(), Quantifier.REQUIRED),
16905             ;
16906 
16907             final OnnxType type;
16908             final Quantifier quantifier;
16909 
16910             InputParameter(OnnxType type, Quantifier quantifier) {
16911                 this.type = type;
16912                 this.quantifier = quantifier;
16913             }
16914 
16915             @Override
16916             public OnnxType type() {
16917                 return type;
16918             }
16919 
16920             @Override
16921             public Quantifier quantifier() {
16922                 return quantifier;
16923             }
16924         }
16925 
16926         public enum OutputParameter implements OnnxParameter {
16927             output(TypeConstraint.T2.typeVariable(), Quantifier.REQUIRED),
16928             ;
16929 
16930             final OnnxType type;
16931             final Quantifier quantifier;
16932 
16933             OutputParameter(OnnxType type, Quantifier quantifier) {
16934                 this.type = type;
16935                 this.quantifier = quantifier;
16936             }
16937 
16938             @Override
16939             public OnnxType type() {
16940                 return type;
16941             }
16942 
16943             @Override
16944             public Quantifier quantifier() {
16945                 return quantifier;
16946             }
16947         }
16948 
16949         public static final OnnxSchema SCHEMA = new OnnxSchemaRecord(
16950                 NAME,
16951                 List.of(Attribute.values()),
16952                 List.of(TypeConstraint.values()),
16953                 List.of(InputParameter.values()),
16954                 List.of(OutputParameter.values())
16955         );
16956 
16957         public Multinomial(ExternalizedOp def) {
16958             super(SCHEMA, def);
16959         }
16960 
16961         Multinomial(Multinomial that, CopyContext cc) {
16962             super(that, cc);
16963         }
16964 
16965         @Override
16966         public Multinomial transform(CopyContext cc, OpTransformer ot) {
16967             return new Multinomial(this, cc);
16968         }
16969 
16970         Multinomial(TypeElement resultType, Value input, java.util.Optional<Float> seed, java.util.Optional<Integer> sample_size, java.util.Optional<Integer> dtype) {
16971             super(SCHEMA, resultType, Set.of(), List.of(input), List.of(seed, sample_size, dtype));
16972         }
16973 
16974         @Override
16975         public SequencedSet<OnnxParameter> onnxOutputs() {
16976             return onnxOutputs(SCHEMA);
16977         }
16978 
16979         @Override
16980         public SequencedMap<OnnxParameter, Object> onnxInputs() {
16981             return onnxInputs(SCHEMA, List.of(input()));
16982         }
16983 
16984         public Value input() {
16985             return operands().get(0);
16986         }
16987 
16988         public java.util.Optional<Float> seed() {
16989             Float seed = Attribute.seed.access(Float.class, onnxAttributes);
16990             return java.util.Optional.ofNullable(seed);
16991         }
16992 
16993         public java.util.Optional<Integer> sample_size() {
16994             Integer sample_size = Attribute.sample_size.access(Integer.class, onnxAttributes);
16995             return java.util.Optional.ofNullable(sample_size);
16996         }
16997 
16998         public java.util.Optional<Integer> dtype() {
16999             Integer dtype = Attribute.dtype.access(Integer.class, onnxAttributes);
17000             return java.util.Optional.ofNullable(dtype);
17001         }
17002 
17003     }
17004 
17005     public static Multinomial Multinomial(TypeElement resultType, Value input, java.util.Optional<Float> seed, java.util.Optional<Integer> sample_size, java.util.Optional<Integer> dtype) {
17006         return new Multinomial(resultType, input, seed, sample_size, dtype);
17007     }
17008 
17009     @OpFactory.OpDeclaration(Neg.NAME)
17010     public static final class Neg extends OnnxOp {
17011         public static final String NAME = "Neg";
17012 
17013         public enum Attribute implements OnnxAttribute.None { }
17014 
17015         public enum TypeConstraint implements OnnxTypeConstraint {
17016             T(new OnnxType.TypeVariable("T", List.of(OnnxType.tensor(OnnxType.float32()), OnnxType.tensor(OnnxType.int32()), OnnxType.tensor(OnnxType.int8()), OnnxType.tensor(OnnxType.int16()), OnnxType.tensor(OnnxType.int64()), OnnxType.tensor(OnnxType.float16()), OnnxType.tensor(OnnxType.float64()), OnnxType.tensor(OnnxType.bfloat16())))),
17017             ;
17018 
17019             final OnnxType.TypeVariable typeVariable;
17020 
17021             TypeConstraint(OnnxType.TypeVariable typeVariable) {
17022                 assert typeVariable.name().equals(name());
17023                 this.typeVariable = typeVariable;
17024             }
17025 
17026             @Override
17027             public OnnxType.TypeVariable typeVariable() {
17028                 return typeVariable;
17029             }
17030         }
17031 
17032         public enum InputParameter implements OnnxParameter {
17033             X(TypeConstraint.T.typeVariable(), Quantifier.REQUIRED),
17034             ;
17035 
17036             final OnnxType type;
17037             final Quantifier quantifier;
17038 
17039             InputParameter(OnnxType type, Quantifier quantifier) {
17040                 this.type = type;
17041                 this.quantifier = quantifier;
17042             }
17043 
17044             @Override
17045             public OnnxType type() {
17046                 return type;
17047             }
17048 
17049             @Override
17050             public Quantifier quantifier() {
17051                 return quantifier;
17052             }
17053         }
17054 
17055         public enum OutputParameter implements OnnxParameter {
17056             Y(TypeConstraint.T.typeVariable(), Quantifier.REQUIRED),
17057             ;
17058 
17059             final OnnxType type;
17060             final Quantifier quantifier;
17061 
17062             OutputParameter(OnnxType type, Quantifier quantifier) {
17063                 this.type = type;
17064                 this.quantifier = quantifier;
17065             }
17066 
17067             @Override
17068             public OnnxType type() {
17069                 return type;
17070             }
17071 
17072             @Override
17073             public Quantifier quantifier() {
17074                 return quantifier;
17075             }
17076         }
17077 
17078         public static final OnnxSchema SCHEMA = new OnnxSchemaRecord(
17079                 NAME,
17080                 List.of(Attribute.values()),
17081                 List.of(TypeConstraint.values()),
17082                 List.of(InputParameter.values()),
17083                 List.of(OutputParameter.values())
17084         );
17085 
17086         public Neg(ExternalizedOp def) {
17087             super(SCHEMA, def);
17088         }
17089 
17090         Neg(Neg that, CopyContext cc) {
17091             super(that, cc);
17092         }
17093 
17094         @Override
17095         public Neg transform(CopyContext cc, OpTransformer ot) {
17096             return new Neg(this, cc);
17097         }
17098 
17099         Neg(TypeElement resultType, Value X) {
17100             super(SCHEMA, resultType, Set.of(), List.of(X), List.of());
17101         }
17102 
17103         @Override
17104         public SequencedSet<OnnxParameter> onnxOutputs() {
17105             return onnxOutputs(SCHEMA);
17106         }
17107 
17108         @Override
17109         public SequencedMap<OnnxParameter, Object> onnxInputs() {
17110             return onnxInputs(SCHEMA, List.of(X()));
17111         }
17112 
17113         public Value X() {
17114             return operands().get(0);
17115         }
17116 
17117     }
17118 
17119     public static Neg Neg(TypeElement resultType, Value X) {
17120         return new Neg(resultType, X);
17121     }
17122 
17123     @OpFactory.OpDeclaration(NegativeLogLikelihoodLoss.NAME)
17124     public static final class NegativeLogLikelihoodLoss extends OnnxOp {
17125         public static final String NAME = "NegativeLogLikelihoodLoss";
17126 
17127         public enum Attribute implements OnnxAttribute {
17128             ignore_index(Integer.class, true, null),
17129             reduction(String.class, true, "mean"),
17130             ;
17131 
17132                 final Class<?> t;
17133                 final boolean optional;
17134                 final Object defaultValue;
17135 
17136                 Attribute(Class<?> type, boolean optional, Object defaultValue) {
17137                     this.t = type;
17138                     this.optional = optional;
17139                     this.defaultValue = defaultValue;
17140                     assert optional || defaultValue == null;
17141                 }
17142 
17143                 public Class<?> type() {
17144                     return t;
17145                 }
17146 
17147                 public boolean isOptional() {
17148                     return optional;
17149                 }
17150 
17151                 public Object defaultValue() {
17152                     return defaultValue;
17153                 }
17154         }
17155 
17156         public enum TypeConstraint implements OnnxTypeConstraint {
17157             T(new OnnxType.TypeVariable("T", List.of(OnnxType.tensor(OnnxType.bfloat16()), OnnxType.tensor(OnnxType.float16()), OnnxType.tensor(OnnxType.float32()), OnnxType.tensor(OnnxType.float64())))),
17158             Tind(new OnnxType.TypeVariable("Tind", List.of(OnnxType.tensor(OnnxType.int32()), OnnxType.tensor(OnnxType.int64())))),
17159             ;
17160 
17161             final OnnxType.TypeVariable typeVariable;
17162 
17163             TypeConstraint(OnnxType.TypeVariable typeVariable) {
17164                 assert typeVariable.name().equals(name());
17165                 this.typeVariable = typeVariable;
17166             }
17167 
17168             @Override
17169             public OnnxType.TypeVariable typeVariable() {
17170                 return typeVariable;
17171             }
17172         }
17173 
17174         public enum InputParameter implements OnnxParameter {
17175             input(TypeConstraint.T.typeVariable(), Quantifier.REQUIRED),
17176             target(TypeConstraint.Tind.typeVariable(), Quantifier.REQUIRED),
17177             weight(TypeConstraint.T.typeVariable(), Quantifier.OPTIONAL),
17178             ;
17179 
17180             final OnnxType type;
17181             final Quantifier quantifier;
17182 
17183             InputParameter(OnnxType type, Quantifier quantifier) {
17184                 this.type = type;
17185                 this.quantifier = quantifier;
17186             }
17187 
17188             @Override
17189             public OnnxType type() {
17190                 return type;
17191             }
17192 
17193             @Override
17194             public Quantifier quantifier() {
17195                 return quantifier;
17196             }
17197         }
17198 
17199         public enum OutputParameter implements OnnxParameter {
17200             loss(TypeConstraint.T.typeVariable(), Quantifier.REQUIRED),
17201             ;
17202 
17203             final OnnxType type;
17204             final Quantifier quantifier;
17205 
17206             OutputParameter(OnnxType type, Quantifier quantifier) {
17207                 this.type = type;
17208                 this.quantifier = quantifier;
17209             }
17210 
17211             @Override
17212             public OnnxType type() {
17213                 return type;
17214             }
17215 
17216             @Override
17217             public Quantifier quantifier() {
17218                 return quantifier;
17219             }
17220         }
17221 
17222         public static final OnnxSchema SCHEMA = new OnnxSchemaRecord(
17223                 NAME,
17224                 List.of(Attribute.values()),
17225                 List.of(TypeConstraint.values()),
17226                 List.of(InputParameter.values()),
17227                 List.of(OutputParameter.values())
17228         );
17229 
17230         public NegativeLogLikelihoodLoss(ExternalizedOp def) {
17231             super(SCHEMA, def);
17232         }
17233 
17234         NegativeLogLikelihoodLoss(NegativeLogLikelihoodLoss that, CopyContext cc) {
17235             super(that, cc);
17236         }
17237 
17238         @Override
17239         public NegativeLogLikelihoodLoss transform(CopyContext cc, OpTransformer ot) {
17240             return new NegativeLogLikelihoodLoss(this, cc);
17241         }
17242 
17243         NegativeLogLikelihoodLoss(TypeElement resultType, Value input, Value target, java.util.Optional<Value> weight, java.util.Optional<Integer> ignore_index, java.util.Optional<String> reduction) {
17244             super(SCHEMA, resultType, Set.of(), List.of(input, target, weight), List.of(ignore_index, reduction));
17245         }
17246 
17247         @Override
17248         public SequencedSet<OnnxParameter> onnxOutputs() {
17249             return onnxOutputs(SCHEMA);
17250         }
17251 
17252         @Override
17253         public SequencedMap<OnnxParameter, Object> onnxInputs() {
17254             return onnxInputs(SCHEMA, List.of(input(), target(), weight()));
17255         }
17256 
17257         public Value input() {
17258             return operands().get(0);
17259         }
17260 
17261         public Value target() {
17262             return operands().get(1);
17263         }
17264 
17265         public java.util.Optional<Value> weight() {
17266             int i = optionalInputArguments.indexOf(InputParameter.weight);
17267             return i != -1 ? java.util.Optional.of(operands().get(2 + i)) : java.util.Optional.empty();
17268         }
17269 
17270         public java.util.Optional<Integer> ignore_index() {
17271             Integer ignore_index = Attribute.ignore_index.access(Integer.class, onnxAttributes);
17272             return java.util.Optional.ofNullable(ignore_index);
17273         }
17274 
17275         public java.util.Optional<String> reduction() {
17276             String reduction = Attribute.reduction.access(String.class, onnxAttributes);
17277             return java.util.Optional.ofNullable(reduction);
17278         }
17279 
17280     }
17281 
17282     public static NegativeLogLikelihoodLoss NegativeLogLikelihoodLoss(TypeElement resultType, Value input, Value target, java.util.Optional<Value> weight, java.util.Optional<Integer> ignore_index, java.util.Optional<String> reduction) {
17283         return new NegativeLogLikelihoodLoss(resultType, input, target, weight, ignore_index, reduction);
17284     }
17285 
17286     @OpFactory.OpDeclaration(NonMaxSuppression.NAME)
17287     public static final class NonMaxSuppression extends OnnxOp {
17288         public static final String NAME = "NonMaxSuppression";
17289 
17290         public enum Attribute implements OnnxAttribute {
17291             center_point_box(Integer.class, true, 0),
17292             ;
17293 
17294                 final Class<?> t;
17295                 final boolean optional;
17296                 final Object defaultValue;
17297 
17298                 Attribute(Class<?> type, boolean optional, Object defaultValue) {
17299                     this.t = type;
17300                     this.optional = optional;
17301                     this.defaultValue = defaultValue;
17302                     assert optional || defaultValue == null;
17303                 }
17304 
17305                 public Class<?> type() {
17306                     return t;
17307                 }
17308 
17309                 public boolean isOptional() {
17310                     return optional;
17311                 }
17312 
17313                 public Object defaultValue() {
17314                     return defaultValue;
17315                 }
17316         }
17317 
17318         public enum TypeConstraint implements OnnxTypeConstraint.None { }
17319 
17320         public enum InputParameter implements OnnxParameter {
17321             boxes(OnnxType.tensor(OnnxType.float32()), Quantifier.REQUIRED),
17322             scores(OnnxType.tensor(OnnxType.float32()), Quantifier.REQUIRED),
17323             max_output_boxes_per_class(OnnxType.tensor(OnnxType.int64()), Quantifier.OPTIONAL),
17324             iou_threshold(OnnxType.tensor(OnnxType.float32()), Quantifier.OPTIONAL),
17325             score_threshold(OnnxType.tensor(OnnxType.float32()), Quantifier.OPTIONAL),
17326             ;
17327 
17328             final OnnxType type;
17329             final Quantifier quantifier;
17330 
17331             InputParameter(OnnxType type, Quantifier quantifier) {
17332                 this.type = type;
17333                 this.quantifier = quantifier;
17334             }
17335 
17336             @Override
17337             public OnnxType type() {
17338                 return type;
17339             }
17340 
17341             @Override
17342             public Quantifier quantifier() {
17343                 return quantifier;
17344             }
17345         }
17346 
17347         public enum OutputParameter implements OnnxParameter {
17348             selected_indices(OnnxType.tensor(OnnxType.int64()), Quantifier.REQUIRED),
17349             ;
17350 
17351             final OnnxType type;
17352             final Quantifier quantifier;
17353 
17354             OutputParameter(OnnxType type, Quantifier quantifier) {
17355                 this.type = type;
17356                 this.quantifier = quantifier;
17357             }
17358 
17359             @Override
17360             public OnnxType type() {
17361                 return type;
17362             }
17363 
17364             @Override
17365             public Quantifier quantifier() {
17366                 return quantifier;
17367             }
17368         }
17369 
17370         public static final OnnxSchema SCHEMA = new OnnxSchemaRecord(
17371                 NAME,
17372                 List.of(Attribute.values()),
17373                 List.of(TypeConstraint.values()),
17374                 List.of(InputParameter.values()),
17375                 List.of(OutputParameter.values())
17376         );
17377 
17378         public NonMaxSuppression(ExternalizedOp def) {
17379             super(SCHEMA, def);
17380         }
17381 
17382         NonMaxSuppression(NonMaxSuppression that, CopyContext cc) {
17383             super(that, cc);
17384         }
17385 
17386         @Override
17387         public NonMaxSuppression transform(CopyContext cc, OpTransformer ot) {
17388             return new NonMaxSuppression(this, cc);
17389         }
17390 
17391         NonMaxSuppression(TypeElement resultType, Value boxes, Value scores, java.util.Optional<Value> max_output_boxes_per_class, java.util.Optional<Value> iou_threshold, java.util.Optional<Value> score_threshold, java.util.Optional<Integer> center_point_box) {
17392             super(SCHEMA, resultType, Set.of(), List.of(boxes, scores, max_output_boxes_per_class, iou_threshold, score_threshold), List.of(center_point_box));
17393         }
17394 
17395         @Override
17396         public SequencedSet<OnnxParameter> onnxOutputs() {
17397             return onnxOutputs(SCHEMA);
17398         }
17399 
17400         @Override
17401         public SequencedMap<OnnxParameter, Object> onnxInputs() {
17402             return onnxInputs(SCHEMA, List.of(boxes(), scores(), max_output_boxes_per_class(), iou_threshold(), score_threshold()));
17403         }
17404 
17405         public Value boxes() {
17406             return operands().get(0);
17407         }
17408 
17409         public Value scores() {
17410             return operands().get(1);
17411         }
17412 
17413         public java.util.Optional<Value> max_output_boxes_per_class() {
17414             int i = optionalInputArguments.indexOf(InputParameter.max_output_boxes_per_class);
17415             return i != -1 ? java.util.Optional.of(operands().get(2 + i)) : java.util.Optional.empty();
17416         }
17417 
17418         public java.util.Optional<Value> iou_threshold() {
17419             int i = optionalInputArguments.indexOf(InputParameter.iou_threshold);
17420             return i != -1 ? java.util.Optional.of(operands().get(2 + i)) : java.util.Optional.empty();
17421         }
17422 
17423         public java.util.Optional<Value> score_threshold() {
17424             int i = optionalInputArguments.indexOf(InputParameter.score_threshold);
17425             return i != -1 ? java.util.Optional.of(operands().get(2 + i)) : java.util.Optional.empty();
17426         }
17427 
17428         public java.util.Optional<Integer> center_point_box() {
17429             Integer center_point_box = Attribute.center_point_box.access(Integer.class, onnxAttributes);
17430             return java.util.Optional.ofNullable(center_point_box);
17431         }
17432 
17433     }
17434 
17435     public static NonMaxSuppression NonMaxSuppression(TypeElement resultType, Value boxes, Value scores, java.util.Optional<Value> max_output_boxes_per_class, java.util.Optional<Value> iou_threshold, java.util.Optional<Value> score_threshold, java.util.Optional<Integer> center_point_box) {
17436         return new NonMaxSuppression(resultType, boxes, scores, max_output_boxes_per_class, iou_threshold, score_threshold, center_point_box);
17437     }
17438 
17439     @OpFactory.OpDeclaration(NonZero.NAME)
17440     public static final class NonZero extends OnnxOp {
17441         public static final String NAME = "NonZero";
17442 
17443         public enum Attribute implements OnnxAttribute.None { }
17444 
17445         public enum TypeConstraint implements OnnxTypeConstraint {
17446             T(new OnnxType.TypeVariable("T", List.of(OnnxType.tensor(OnnxType.uint8()), OnnxType.tensor(OnnxType.uint16()), OnnxType.tensor(OnnxType.uint32()), OnnxType.tensor(OnnxType.uint64()), OnnxType.tensor(OnnxType.int8()), OnnxType.tensor(OnnxType.int16()), OnnxType.tensor(OnnxType.int32()), OnnxType.tensor(OnnxType.int64()), OnnxType.tensor(OnnxType.bfloat16()), OnnxType.tensor(OnnxType.float16()), OnnxType.tensor(OnnxType.float32()), OnnxType.tensor(OnnxType.float64()), OnnxType.tensor(OnnxType.string()), OnnxType.tensor(OnnxType.bool()), OnnxType.tensor(OnnxType.complex64()), OnnxType.tensor(OnnxType.complex128())))),
17447             ;
17448 
17449             final OnnxType.TypeVariable typeVariable;
17450 
17451             TypeConstraint(OnnxType.TypeVariable typeVariable) {
17452                 assert typeVariable.name().equals(name());
17453                 this.typeVariable = typeVariable;
17454             }
17455 
17456             @Override
17457             public OnnxType.TypeVariable typeVariable() {
17458                 return typeVariable;
17459             }
17460         }
17461 
17462         public enum InputParameter implements OnnxParameter {
17463             X(TypeConstraint.T.typeVariable(), Quantifier.REQUIRED),
17464             ;
17465 
17466             final OnnxType type;
17467             final Quantifier quantifier;
17468 
17469             InputParameter(OnnxType type, Quantifier quantifier) {
17470                 this.type = type;
17471                 this.quantifier = quantifier;
17472             }
17473 
17474             @Override
17475             public OnnxType type() {
17476                 return type;
17477             }
17478 
17479             @Override
17480             public Quantifier quantifier() {
17481                 return quantifier;
17482             }
17483         }
17484 
17485         public enum OutputParameter implements OnnxParameter {
17486             Y(OnnxType.tensor(OnnxType.int64()), Quantifier.REQUIRED),
17487             ;
17488 
17489             final OnnxType type;
17490             final Quantifier quantifier;
17491 
17492             OutputParameter(OnnxType type, Quantifier quantifier) {
17493                 this.type = type;
17494                 this.quantifier = quantifier;
17495             }
17496 
17497             @Override
17498             public OnnxType type() {
17499                 return type;
17500             }
17501 
17502             @Override
17503             public Quantifier quantifier() {
17504                 return quantifier;
17505             }
17506         }
17507 
17508         public static final OnnxSchema SCHEMA = new OnnxSchemaRecord(
17509                 NAME,
17510                 List.of(Attribute.values()),
17511                 List.of(TypeConstraint.values()),
17512                 List.of(InputParameter.values()),
17513                 List.of(OutputParameter.values())
17514         );
17515 
17516         public NonZero(ExternalizedOp def) {
17517             super(SCHEMA, def);
17518         }
17519 
17520         NonZero(NonZero that, CopyContext cc) {
17521             super(that, cc);
17522         }
17523 
17524         @Override
17525         public NonZero transform(CopyContext cc, OpTransformer ot) {
17526             return new NonZero(this, cc);
17527         }
17528 
17529         NonZero(TypeElement resultType, Value X) {
17530             super(SCHEMA, resultType, Set.of(), List.of(X), List.of());
17531         }
17532 
17533         @Override
17534         public SequencedSet<OnnxParameter> onnxOutputs() {
17535             return onnxOutputs(SCHEMA);
17536         }
17537 
17538         @Override
17539         public SequencedMap<OnnxParameter, Object> onnxInputs() {
17540             return onnxInputs(SCHEMA, List.of(X()));
17541         }
17542 
17543         public Value X() {
17544             return operands().get(0);
17545         }
17546 
17547     }
17548 
17549     public static NonZero NonZero(TypeElement resultType, Value X) {
17550         return new NonZero(resultType, X);
17551     }
17552 
17553     @OpFactory.OpDeclaration(Normalizer.NAME)
17554     public static final class Normalizer extends OnnxOp {
17555         public static final String NAME = "Normalizer";
17556 
17557         public enum Attribute implements OnnxAttribute {
17558             norm(String.class, true, "MAX"),
17559             ;
17560 
17561                 final Class<?> t;
17562                 final boolean optional;
17563                 final Object defaultValue;
17564 
17565                 Attribute(Class<?> type, boolean optional, Object defaultValue) {
17566                     this.t = type;
17567                     this.optional = optional;
17568                     this.defaultValue = defaultValue;
17569                     assert optional || defaultValue == null;
17570                 }
17571 
17572                 public Class<?> type() {
17573                     return t;
17574                 }
17575 
17576                 public boolean isOptional() {
17577                     return optional;
17578                 }
17579 
17580                 public Object defaultValue() {
17581                     return defaultValue;
17582                 }
17583         }
17584 
17585         public enum TypeConstraint implements OnnxTypeConstraint {
17586             T(new OnnxType.TypeVariable("T", List.of(OnnxType.tensor(OnnxType.float32()), OnnxType.tensor(OnnxType.float64()), OnnxType.tensor(OnnxType.int64()), OnnxType.tensor(OnnxType.int32())))),
17587             ;
17588 
17589             final OnnxType.TypeVariable typeVariable;
17590 
17591             TypeConstraint(OnnxType.TypeVariable typeVariable) {
17592                 assert typeVariable.name().equals(name());
17593                 this.typeVariable = typeVariable;
17594             }
17595 
17596             @Override
17597             public OnnxType.TypeVariable typeVariable() {
17598                 return typeVariable;
17599             }
17600         }
17601 
17602         public enum InputParameter implements OnnxParameter {
17603             X(TypeConstraint.T.typeVariable(), Quantifier.REQUIRED),
17604             ;
17605 
17606             final OnnxType type;
17607             final Quantifier quantifier;
17608 
17609             InputParameter(OnnxType type, Quantifier quantifier) {
17610                 this.type = type;
17611                 this.quantifier = quantifier;
17612             }
17613 
17614             @Override
17615             public OnnxType type() {
17616                 return type;
17617             }
17618 
17619             @Override
17620             public Quantifier quantifier() {
17621                 return quantifier;
17622             }
17623         }
17624 
17625         public enum OutputParameter implements OnnxParameter {
17626             Y(OnnxType.tensor(OnnxType.float32()), Quantifier.REQUIRED),
17627             ;
17628 
17629             final OnnxType type;
17630             final Quantifier quantifier;
17631 
17632             OutputParameter(OnnxType type, Quantifier quantifier) {
17633                 this.type = type;
17634                 this.quantifier = quantifier;
17635             }
17636 
17637             @Override
17638             public OnnxType type() {
17639                 return type;
17640             }
17641 
17642             @Override
17643             public Quantifier quantifier() {
17644                 return quantifier;
17645             }
17646         }
17647 
17648         public static final OnnxSchema SCHEMA = new OnnxSchemaRecord(
17649                 NAME,
17650                 List.of(Attribute.values()),
17651                 List.of(TypeConstraint.values()),
17652                 List.of(InputParameter.values()),
17653                 List.of(OutputParameter.values())
17654         );
17655 
17656         public Normalizer(ExternalizedOp def) {
17657             super(SCHEMA, def);
17658         }
17659 
17660         Normalizer(Normalizer that, CopyContext cc) {
17661             super(that, cc);
17662         }
17663 
17664         @Override
17665         public Normalizer transform(CopyContext cc, OpTransformer ot) {
17666             return new Normalizer(this, cc);
17667         }
17668 
17669         Normalizer(TypeElement resultType, Value X, java.util.Optional<String> norm) {
17670             super(SCHEMA, resultType, Set.of(), List.of(X), List.of(norm));
17671         }
17672 
17673         @Override
17674         public SequencedSet<OnnxParameter> onnxOutputs() {
17675             return onnxOutputs(SCHEMA);
17676         }
17677 
17678         @Override
17679         public SequencedMap<OnnxParameter, Object> onnxInputs() {
17680             return onnxInputs(SCHEMA, List.of(X()));
17681         }
17682 
17683         public Value X() {
17684             return operands().get(0);
17685         }
17686 
17687         public java.util.Optional<String> norm() {
17688             String norm = Attribute.norm.access(String.class, onnxAttributes);
17689             return java.util.Optional.ofNullable(norm);
17690         }
17691 
17692     }
17693 
17694     public static Normalizer Normalizer(TypeElement resultType, Value X, java.util.Optional<String> norm) {
17695         return new Normalizer(resultType, X, norm);
17696     }
17697 
17698     @OpFactory.OpDeclaration(Not.NAME)
17699     public static final class Not extends OnnxOp {
17700         public static final String NAME = "Not";
17701 
17702         public enum Attribute implements OnnxAttribute.None { }
17703 
17704         public enum TypeConstraint implements OnnxTypeConstraint {
17705             T(new OnnxType.TypeVariable("T", List.of(OnnxType.tensor(OnnxType.bool())))),
17706             ;
17707 
17708             final OnnxType.TypeVariable typeVariable;
17709 
17710             TypeConstraint(OnnxType.TypeVariable typeVariable) {
17711                 assert typeVariable.name().equals(name());
17712                 this.typeVariable = typeVariable;
17713             }
17714 
17715             @Override
17716             public OnnxType.TypeVariable typeVariable() {
17717                 return typeVariable;
17718             }
17719         }
17720 
17721         public enum InputParameter implements OnnxParameter {
17722             X(TypeConstraint.T.typeVariable(), Quantifier.REQUIRED),
17723             ;
17724 
17725             final OnnxType type;
17726             final Quantifier quantifier;
17727 
17728             InputParameter(OnnxType type, Quantifier quantifier) {
17729                 this.type = type;
17730                 this.quantifier = quantifier;
17731             }
17732 
17733             @Override
17734             public OnnxType type() {
17735                 return type;
17736             }
17737 
17738             @Override
17739             public Quantifier quantifier() {
17740                 return quantifier;
17741             }
17742         }
17743 
17744         public enum OutputParameter implements OnnxParameter {
17745             Y(TypeConstraint.T.typeVariable(), Quantifier.REQUIRED),
17746             ;
17747 
17748             final OnnxType type;
17749             final Quantifier quantifier;
17750 
17751             OutputParameter(OnnxType type, Quantifier quantifier) {
17752                 this.type = type;
17753                 this.quantifier = quantifier;
17754             }
17755 
17756             @Override
17757             public OnnxType type() {
17758                 return type;
17759             }
17760 
17761             @Override
17762             public Quantifier quantifier() {
17763                 return quantifier;
17764             }
17765         }
17766 
17767         public static final OnnxSchema SCHEMA = new OnnxSchemaRecord(
17768                 NAME,
17769                 List.of(Attribute.values()),
17770                 List.of(TypeConstraint.values()),
17771                 List.of(InputParameter.values()),
17772                 List.of(OutputParameter.values())
17773         );
17774 
17775         public Not(ExternalizedOp def) {
17776             super(SCHEMA, def);
17777         }
17778 
17779         Not(Not that, CopyContext cc) {
17780             super(that, cc);
17781         }
17782 
17783         @Override
17784         public Not transform(CopyContext cc, OpTransformer ot) {
17785             return new Not(this, cc);
17786         }
17787 
17788         Not(TypeElement resultType, Value X) {
17789             super(SCHEMA, resultType, Set.of(), List.of(X), List.of());
17790         }
17791 
17792         @Override
17793         public SequencedSet<OnnxParameter> onnxOutputs() {
17794             return onnxOutputs(SCHEMA);
17795         }
17796 
17797         @Override
17798         public SequencedMap<OnnxParameter, Object> onnxInputs() {
17799             return onnxInputs(SCHEMA, List.of(X()));
17800         }
17801 
17802         public Value X() {
17803             return operands().get(0);
17804         }
17805 
17806     }
17807 
17808     public static Not Not(TypeElement resultType, Value X) {
17809         return new Not(resultType, X);
17810     }
17811 
17812     @OpFactory.OpDeclaration(OneHot.NAME)
17813     public static final class OneHot extends OnnxOp {
17814         public static final String NAME = "OneHot";
17815 
17816         public enum Attribute implements OnnxAttribute {
17817             axis(Integer.class, true, -1),
17818             ;
17819 
17820                 final Class<?> t;
17821                 final boolean optional;
17822                 final Object defaultValue;
17823 
17824                 Attribute(Class<?> type, boolean optional, Object defaultValue) {
17825                     this.t = type;
17826                     this.optional = optional;
17827                     this.defaultValue = defaultValue;
17828                     assert optional || defaultValue == null;
17829                 }
17830 
17831                 public Class<?> type() {
17832                     return t;
17833                 }
17834 
17835                 public boolean isOptional() {
17836                     return optional;
17837                 }
17838 
17839                 public Object defaultValue() {
17840                     return defaultValue;
17841                 }
17842         }
17843 
17844         public enum TypeConstraint implements OnnxTypeConstraint {
17845             T1(new OnnxType.TypeVariable("T1", List.of(OnnxType.tensor(OnnxType.uint8()), OnnxType.tensor(OnnxType.uint16()), OnnxType.tensor(OnnxType.uint32()), OnnxType.tensor(OnnxType.uint64()), OnnxType.tensor(OnnxType.int8()), OnnxType.tensor(OnnxType.int16()), OnnxType.tensor(OnnxType.int32()), OnnxType.tensor(OnnxType.int64()), OnnxType.tensor(OnnxType.float16()), OnnxType.tensor(OnnxType.float32()), OnnxType.tensor(OnnxType.float64())))),
17846             T2(new OnnxType.TypeVariable("T2", List.of(OnnxType.tensor(OnnxType.uint8()), OnnxType.tensor(OnnxType.uint16()), OnnxType.tensor(OnnxType.uint32()), OnnxType.tensor(OnnxType.uint64()), OnnxType.tensor(OnnxType.int8()), OnnxType.tensor(OnnxType.int16()), OnnxType.tensor(OnnxType.int32()), OnnxType.tensor(OnnxType.int64()), OnnxType.tensor(OnnxType.float16()), OnnxType.tensor(OnnxType.float32()), OnnxType.tensor(OnnxType.float64())))),
17847             T3(new OnnxType.TypeVariable("T3", List.of(OnnxType.tensor(OnnxType.uint8()), OnnxType.tensor(OnnxType.uint16()), OnnxType.tensor(OnnxType.uint32()), OnnxType.tensor(OnnxType.uint64()), OnnxType.tensor(OnnxType.int8()), OnnxType.tensor(OnnxType.int16()), OnnxType.tensor(OnnxType.int32()), OnnxType.tensor(OnnxType.int64()), OnnxType.tensor(OnnxType.float16()), OnnxType.tensor(OnnxType.float32()), OnnxType.tensor(OnnxType.float64()), OnnxType.tensor(OnnxType.string()), OnnxType.tensor(OnnxType.bool()), OnnxType.tensor(OnnxType.complex64()), OnnxType.tensor(OnnxType.complex128())))),
17848             ;
17849 
17850             final OnnxType.TypeVariable typeVariable;
17851 
17852             TypeConstraint(OnnxType.TypeVariable typeVariable) {
17853                 assert typeVariable.name().equals(name());
17854                 this.typeVariable = typeVariable;
17855             }
17856 
17857             @Override
17858             public OnnxType.TypeVariable typeVariable() {
17859                 return typeVariable;
17860             }
17861         }
17862 
17863         public enum InputParameter implements OnnxParameter {
17864             indices(TypeConstraint.T1.typeVariable(), Quantifier.REQUIRED),
17865             depth(TypeConstraint.T2.typeVariable(), Quantifier.REQUIRED),
17866             values(TypeConstraint.T3.typeVariable(), Quantifier.REQUIRED),
17867             ;
17868 
17869             final OnnxType type;
17870             final Quantifier quantifier;
17871 
17872             InputParameter(OnnxType type, Quantifier quantifier) {
17873                 this.type = type;
17874                 this.quantifier = quantifier;
17875             }
17876 
17877             @Override
17878             public OnnxType type() {
17879                 return type;
17880             }
17881 
17882             @Override
17883             public Quantifier quantifier() {
17884                 return quantifier;
17885             }
17886         }
17887 
17888         public enum OutputParameter implements OnnxParameter {
17889             output(TypeConstraint.T3.typeVariable(), Quantifier.REQUIRED),
17890             ;
17891 
17892             final OnnxType type;
17893             final Quantifier quantifier;
17894 
17895             OutputParameter(OnnxType type, Quantifier quantifier) {
17896                 this.type = type;
17897                 this.quantifier = quantifier;
17898             }
17899 
17900             @Override
17901             public OnnxType type() {
17902                 return type;
17903             }
17904 
17905             @Override
17906             public Quantifier quantifier() {
17907                 return quantifier;
17908             }
17909         }
17910 
17911         public static final OnnxSchema SCHEMA = new OnnxSchemaRecord(
17912                 NAME,
17913                 List.of(Attribute.values()),
17914                 List.of(TypeConstraint.values()),
17915                 List.of(InputParameter.values()),
17916                 List.of(OutputParameter.values())
17917         );
17918 
17919         public OneHot(ExternalizedOp def) {
17920             super(SCHEMA, def);
17921         }
17922 
17923         OneHot(OneHot that, CopyContext cc) {
17924             super(that, cc);
17925         }
17926 
17927         @Override
17928         public OneHot transform(CopyContext cc, OpTransformer ot) {
17929             return new OneHot(this, cc);
17930         }
17931 
17932         OneHot(TypeElement resultType, Value indices, Value depth, Value values, java.util.Optional<Integer> axis) {
17933             super(SCHEMA, resultType, Set.of(), List.of(indices, depth, values), List.of(axis));
17934         }
17935 
17936         @Override
17937         public SequencedSet<OnnxParameter> onnxOutputs() {
17938             return onnxOutputs(SCHEMA);
17939         }
17940 
17941         @Override
17942         public SequencedMap<OnnxParameter, Object> onnxInputs() {
17943             return onnxInputs(SCHEMA, List.of(indices(), depth(), values()));
17944         }
17945 
17946         public Value indices() {
17947             return operands().get(0);
17948         }
17949 
17950         public Value depth() {
17951             return operands().get(1);
17952         }
17953 
17954         public Value values() {
17955             return operands().get(2);
17956         }
17957 
17958         public java.util.Optional<Integer> axis() {
17959             Integer axis = Attribute.axis.access(Integer.class, onnxAttributes);
17960             return java.util.Optional.ofNullable(axis);
17961         }
17962 
17963     }
17964 
17965     public static OneHot OneHot(TypeElement resultType, Value indices, Value depth, Value values, java.util.Optional<Integer> axis) {
17966         return new OneHot(resultType, indices, depth, values, axis);
17967     }
17968 
17969     @OpFactory.OpDeclaration(OneHotEncoder.NAME)
17970     public static final class OneHotEncoder extends OnnxOp {
17971         public static final String NAME = "OneHotEncoder";
17972 
17973         public enum Attribute implements OnnxAttribute {
17974             cats_strings(String[].class, true, null),
17975             cats_int64s(int[].class, true, null),
17976             zeros(Integer.class, true, 1),
17977             ;
17978 
17979                 final Class<?> t;
17980                 final boolean optional;
17981                 final Object defaultValue;
17982 
17983                 Attribute(Class<?> type, boolean optional, Object defaultValue) {
17984                     this.t = type;
17985                     this.optional = optional;
17986                     this.defaultValue = defaultValue;
17987                     assert optional || defaultValue == null;
17988                 }
17989 
17990                 public Class<?> type() {
17991                     return t;
17992                 }
17993 
17994                 public boolean isOptional() {
17995                     return optional;
17996                 }
17997 
17998                 public Object defaultValue() {
17999                     return defaultValue;
18000                 }
18001         }
18002 
18003         public enum TypeConstraint implements OnnxTypeConstraint {
18004             T(new OnnxType.TypeVariable("T", List.of(OnnxType.tensor(OnnxType.string()), OnnxType.tensor(OnnxType.int64()), OnnxType.tensor(OnnxType.int32()), OnnxType.tensor(OnnxType.float32()), OnnxType.tensor(OnnxType.float64())))),
18005             ;
18006 
18007             final OnnxType.TypeVariable typeVariable;
18008 
18009             TypeConstraint(OnnxType.TypeVariable typeVariable) {
18010                 assert typeVariable.name().equals(name());
18011                 this.typeVariable = typeVariable;
18012             }
18013 
18014             @Override
18015             public OnnxType.TypeVariable typeVariable() {
18016                 return typeVariable;
18017             }
18018         }
18019 
18020         public enum InputParameter implements OnnxParameter {
18021             X(TypeConstraint.T.typeVariable(), Quantifier.REQUIRED),
18022             ;
18023 
18024             final OnnxType type;
18025             final Quantifier quantifier;
18026 
18027             InputParameter(OnnxType type, Quantifier quantifier) {
18028                 this.type = type;
18029                 this.quantifier = quantifier;
18030             }
18031 
18032             @Override
18033             public OnnxType type() {
18034                 return type;
18035             }
18036 
18037             @Override
18038             public Quantifier quantifier() {
18039                 return quantifier;
18040             }
18041         }
18042 
18043         public enum OutputParameter implements OnnxParameter {
18044             Y(OnnxType.tensor(OnnxType.float32()), Quantifier.REQUIRED),
18045             ;
18046 
18047             final OnnxType type;
18048             final Quantifier quantifier;
18049 
18050             OutputParameter(OnnxType type, Quantifier quantifier) {
18051                 this.type = type;
18052                 this.quantifier = quantifier;
18053             }
18054 
18055             @Override
18056             public OnnxType type() {
18057                 return type;
18058             }
18059 
18060             @Override
18061             public Quantifier quantifier() {
18062                 return quantifier;
18063             }
18064         }
18065 
18066         public static final OnnxSchema SCHEMA = new OnnxSchemaRecord(
18067                 NAME,
18068                 List.of(Attribute.values()),
18069                 List.of(TypeConstraint.values()),
18070                 List.of(InputParameter.values()),
18071                 List.of(OutputParameter.values())
18072         );
18073 
18074         public OneHotEncoder(ExternalizedOp def) {
18075             super(SCHEMA, def);
18076         }
18077 
18078         OneHotEncoder(OneHotEncoder that, CopyContext cc) {
18079             super(that, cc);
18080         }
18081 
18082         @Override
18083         public OneHotEncoder transform(CopyContext cc, OpTransformer ot) {
18084             return new OneHotEncoder(this, cc);
18085         }
18086 
18087         OneHotEncoder(TypeElement resultType, Value X, java.util.Optional<String[]> cats_strings, java.util.Optional<int[]> cats_int64s, java.util.Optional<Integer> zeros) {
18088             super(SCHEMA, resultType, Set.of(), List.of(X), List.of(cats_strings, cats_int64s, zeros));
18089         }
18090 
18091         @Override
18092         public SequencedSet<OnnxParameter> onnxOutputs() {
18093             return onnxOutputs(SCHEMA);
18094         }
18095 
18096         @Override
18097         public SequencedMap<OnnxParameter, Object> onnxInputs() {
18098             return onnxInputs(SCHEMA, List.of(X()));
18099         }
18100 
18101         public Value X() {
18102             return operands().get(0);
18103         }
18104 
18105         public java.util.Optional<String[]> cats_strings() {
18106             String[] cats_strings = Attribute.cats_strings.access(String[].class, onnxAttributes);
18107             return java.util.Optional.ofNullable(cats_strings).map(String[]::clone);
18108         }
18109 
18110         public java.util.Optional<int[]> cats_int64s() {
18111             int[] cats_int64s = Attribute.cats_int64s.access(int[].class, onnxAttributes);
18112             return java.util.Optional.ofNullable(cats_int64s).map(int[]::clone);
18113         }
18114 
18115         public java.util.Optional<Integer> zeros() {
18116             Integer zeros = Attribute.zeros.access(Integer.class, onnxAttributes);
18117             return java.util.Optional.ofNullable(zeros);
18118         }
18119 
18120     }
18121 
18122     public static OneHotEncoder OneHotEncoder(TypeElement resultType, Value X, java.util.Optional<String[]> cats_strings, java.util.Optional<int[]> cats_int64s, java.util.Optional<Integer> zeros) {
18123         return new OneHotEncoder(resultType, X, cats_strings, cats_int64s, zeros);
18124     }
18125 
18126     @OpFactory.OpDeclaration(Optional.NAME)
18127     public static final class Optional extends OnnxOp {
18128         public static final String NAME = "Optional";
18129 
18130         public enum Attribute implements OnnxAttribute {
18131             type(Object.class, true, null),
18132             ;
18133 
18134                 final Class<?> t;
18135                 final boolean optional;
18136                 final Object defaultValue;
18137 
18138                 Attribute(Class<?> type, boolean optional, Object defaultValue) {
18139                     this.t = type;
18140                     this.optional = optional;
18141                     this.defaultValue = defaultValue;
18142                     assert optional || defaultValue == null;
18143                 }
18144 
18145                 public Class<?> type() {
18146                     return t;
18147                 }
18148 
18149                 public boolean isOptional() {
18150                     return optional;
18151                 }
18152 
18153                 public Object defaultValue() {
18154                     return defaultValue;
18155                 }
18156         }
18157 
18158         public enum TypeConstraint implements OnnxTypeConstraint {
18159             V(new OnnxType.TypeVariable("V", List.of(OnnxType.tensor(OnnxType.uint8()), OnnxType.tensor(OnnxType.uint16()), OnnxType.tensor(OnnxType.uint32()), OnnxType.tensor(OnnxType.uint64()), OnnxType.tensor(OnnxType.int8()), OnnxType.tensor(OnnxType.int16()), OnnxType.tensor(OnnxType.int32()), OnnxType.tensor(OnnxType.int64()), OnnxType.tensor(OnnxType.float16()), OnnxType.tensor(OnnxType.float32()), OnnxType.tensor(OnnxType.float64()), OnnxType.tensor(OnnxType.string()), OnnxType.tensor(OnnxType.bool()), OnnxType.tensor(OnnxType.complex64()), OnnxType.tensor(OnnxType.complex128()), OnnxType.seq(OnnxType.tensor(OnnxType.uint8())), OnnxType.seq(OnnxType.tensor(OnnxType.uint16())), OnnxType.seq(OnnxType.tensor(OnnxType.uint32())), OnnxType.seq(OnnxType.tensor(OnnxType.uint64())), OnnxType.seq(OnnxType.tensor(OnnxType.int8())), OnnxType.seq(OnnxType.tensor(OnnxType.int16())), OnnxType.seq(OnnxType.tensor(OnnxType.int32())), OnnxType.seq(OnnxType.tensor(OnnxType.int64())), OnnxType.seq(OnnxType.tensor(OnnxType.float16())), OnnxType.seq(OnnxType.tensor(OnnxType.float32())), OnnxType.seq(OnnxType.tensor(OnnxType.float64())), OnnxType.seq(OnnxType.tensor(OnnxType.string())), OnnxType.seq(OnnxType.tensor(OnnxType.bool())), OnnxType.seq(OnnxType.tensor(OnnxType.complex64())), OnnxType.seq(OnnxType.tensor(OnnxType.complex128()))))),
18160             O(new OnnxType.TypeVariable("O", List.of(OnnxType.optional(OnnxType.seq(OnnxType.tensor(OnnxType.uint8()))), OnnxType.optional(OnnxType.seq(OnnxType.tensor(OnnxType.uint16()))), OnnxType.optional(OnnxType.seq(OnnxType.tensor(OnnxType.uint32()))), OnnxType.optional(OnnxType.seq(OnnxType.tensor(OnnxType.uint64()))), OnnxType.optional(OnnxType.seq(OnnxType.tensor(OnnxType.int8()))), OnnxType.optional(OnnxType.seq(OnnxType.tensor(OnnxType.int16()))), OnnxType.optional(OnnxType.seq(OnnxType.tensor(OnnxType.int32()))), OnnxType.optional(OnnxType.seq(OnnxType.tensor(OnnxType.int64()))), OnnxType.optional(OnnxType.seq(OnnxType.tensor(OnnxType.float16()))), OnnxType.optional(OnnxType.seq(OnnxType.tensor(OnnxType.float32()))), OnnxType.optional(OnnxType.seq(OnnxType.tensor(OnnxType.float64()))), OnnxType.optional(OnnxType.seq(OnnxType.tensor(OnnxType.string()))), OnnxType.optional(OnnxType.seq(OnnxType.tensor(OnnxType.bool()))), OnnxType.optional(OnnxType.seq(OnnxType.tensor(OnnxType.complex64()))), OnnxType.optional(OnnxType.seq(OnnxType.tensor(OnnxType.complex128()))), OnnxType.optional(OnnxType.tensor(OnnxType.uint8())), OnnxType.optional(OnnxType.tensor(OnnxType.uint16())), OnnxType.optional(OnnxType.tensor(OnnxType.uint32())), OnnxType.optional(OnnxType.tensor(OnnxType.uint64())), OnnxType.optional(OnnxType.tensor(OnnxType.int8())), OnnxType.optional(OnnxType.tensor(OnnxType.int16())), OnnxType.optional(OnnxType.tensor(OnnxType.int32())), OnnxType.optional(OnnxType.tensor(OnnxType.int64())), OnnxType.optional(OnnxType.tensor(OnnxType.float16())), OnnxType.optional(OnnxType.tensor(OnnxType.float32())), OnnxType.optional(OnnxType.tensor(OnnxType.float64())), OnnxType.optional(OnnxType.tensor(OnnxType.string())), OnnxType.optional(OnnxType.tensor(OnnxType.bool())), OnnxType.optional(OnnxType.tensor(OnnxType.complex64())), OnnxType.optional(OnnxType.tensor(OnnxType.complex128()))))),
18161             ;
18162 
18163             final OnnxType.TypeVariable typeVariable;
18164 
18165             TypeConstraint(OnnxType.TypeVariable typeVariable) {
18166                 assert typeVariable.name().equals(name());
18167                 this.typeVariable = typeVariable;
18168             }
18169 
18170             @Override
18171             public OnnxType.TypeVariable typeVariable() {
18172                 return typeVariable;
18173             }
18174         }
18175 
18176         public enum InputParameter implements OnnxParameter {
18177             input(TypeConstraint.V.typeVariable(), Quantifier.OPTIONAL),
18178             ;
18179 
18180             final OnnxType type;
18181             final Quantifier quantifier;
18182 
18183             InputParameter(OnnxType type, Quantifier quantifier) {
18184                 this.type = type;
18185                 this.quantifier = quantifier;
18186             }
18187 
18188             @Override
18189             public OnnxType type() {
18190                 return type;
18191             }
18192 
18193             @Override
18194             public Quantifier quantifier() {
18195                 return quantifier;
18196             }
18197         }
18198 
18199         public enum OutputParameter implements OnnxParameter {
18200             output(TypeConstraint.O.typeVariable(), Quantifier.REQUIRED),
18201             ;
18202 
18203             final OnnxType type;
18204             final Quantifier quantifier;
18205 
18206             OutputParameter(OnnxType type, Quantifier quantifier) {
18207                 this.type = type;
18208                 this.quantifier = quantifier;
18209             }
18210 
18211             @Override
18212             public OnnxType type() {
18213                 return type;
18214             }
18215 
18216             @Override
18217             public Quantifier quantifier() {
18218                 return quantifier;
18219             }
18220         }
18221 
18222         public static final OnnxSchema SCHEMA = new OnnxSchemaRecord(
18223                 NAME,
18224                 List.of(Attribute.values()),
18225                 List.of(TypeConstraint.values()),
18226                 List.of(InputParameter.values()),
18227                 List.of(OutputParameter.values())
18228         );
18229 
18230         public Optional(ExternalizedOp def) {
18231             super(SCHEMA, def);
18232         }
18233 
18234         Optional(Optional that, CopyContext cc) {
18235             super(that, cc);
18236         }
18237 
18238         @Override
18239         public Optional transform(CopyContext cc, OpTransformer ot) {
18240             return new Optional(this, cc);
18241         }
18242 
18243         Optional(TypeElement resultType, java.util.Optional<Value> input, java.util.Optional<Object> type) {
18244             super(SCHEMA, resultType, Set.of(), List.of(input), List.of(type));
18245         }
18246 
18247         @Override
18248         public SequencedSet<OnnxParameter> onnxOutputs() {
18249             return onnxOutputs(SCHEMA);
18250         }
18251 
18252         @Override
18253         public SequencedMap<OnnxParameter, Object> onnxInputs() {
18254             return onnxInputs(SCHEMA, List.of(input()));
18255         }
18256 
18257         public java.util.Optional<Value> input() {
18258             int i = optionalInputArguments.indexOf(InputParameter.input);
18259             return i != -1 ? java.util.Optional.of(operands().get(0 + i)) : java.util.Optional.empty();
18260         }
18261 
18262         public java.util.Optional<Object> type() {
18263             Object type = Attribute.type.access(Object.class, onnxAttributes);
18264             return java.util.Optional.ofNullable(type);
18265         }
18266 
18267     }
18268 
18269     public static Optional Optional(TypeElement resultType, java.util.Optional<Value> input, java.util.Optional<Object> type) {
18270         return new Optional(resultType, input, type);
18271     }
18272 
18273     @OpFactory.OpDeclaration(OptionalGetElement.NAME)
18274     public static final class OptionalGetElement extends OnnxOp {
18275         public static final String NAME = "OptionalGetElement";
18276 
18277         public enum Attribute implements OnnxAttribute.None { }
18278 
18279         public enum TypeConstraint implements OnnxTypeConstraint {
18280             O(new OnnxType.TypeVariable("O", List.of(OnnxType.optional(OnnxType.seq(OnnxType.tensor(OnnxType.uint8()))), OnnxType.optional(OnnxType.seq(OnnxType.tensor(OnnxType.uint16()))), OnnxType.optional(OnnxType.seq(OnnxType.tensor(OnnxType.uint32()))), OnnxType.optional(OnnxType.seq(OnnxType.tensor(OnnxType.uint64()))), OnnxType.optional(OnnxType.seq(OnnxType.tensor(OnnxType.int8()))), OnnxType.optional(OnnxType.seq(OnnxType.tensor(OnnxType.int16()))), OnnxType.optional(OnnxType.seq(OnnxType.tensor(OnnxType.int32()))), OnnxType.optional(OnnxType.seq(OnnxType.tensor(OnnxType.int64()))), OnnxType.optional(OnnxType.seq(OnnxType.tensor(OnnxType.float16()))), OnnxType.optional(OnnxType.seq(OnnxType.tensor(OnnxType.float32()))), OnnxType.optional(OnnxType.seq(OnnxType.tensor(OnnxType.float64()))), OnnxType.optional(OnnxType.seq(OnnxType.tensor(OnnxType.string()))), OnnxType.optional(OnnxType.seq(OnnxType.tensor(OnnxType.bool()))), OnnxType.optional(OnnxType.seq(OnnxType.tensor(OnnxType.complex64()))), OnnxType.optional(OnnxType.seq(OnnxType.tensor(OnnxType.complex128()))), OnnxType.optional(OnnxType.tensor(OnnxType.uint8())), OnnxType.optional(OnnxType.tensor(OnnxType.uint16())), OnnxType.optional(OnnxType.tensor(OnnxType.uint32())), OnnxType.optional(OnnxType.tensor(OnnxType.uint64())), OnnxType.optional(OnnxType.tensor(OnnxType.int8())), OnnxType.optional(OnnxType.tensor(OnnxType.int16())), OnnxType.optional(OnnxType.tensor(OnnxType.int32())), OnnxType.optional(OnnxType.tensor(OnnxType.int64())), OnnxType.optional(OnnxType.tensor(OnnxType.float16())), OnnxType.optional(OnnxType.tensor(OnnxType.float32())), OnnxType.optional(OnnxType.tensor(OnnxType.float64())), OnnxType.optional(OnnxType.tensor(OnnxType.string())), OnnxType.optional(OnnxType.tensor(OnnxType.bool())), OnnxType.optional(OnnxType.tensor(OnnxType.complex64())), OnnxType.optional(OnnxType.tensor(OnnxType.complex128())), OnnxType.tensor(OnnxType.uint8()), OnnxType.tensor(OnnxType.uint16()), OnnxType.tensor(OnnxType.uint32()), OnnxType.tensor(OnnxType.uint64()), OnnxType.tensor(OnnxType.int8()), OnnxType.tensor(OnnxType.int16()), OnnxType.tensor(OnnxType.int32()), OnnxType.tensor(OnnxType.int64()), OnnxType.tensor(OnnxType.float16()), OnnxType.tensor(OnnxType.float32()), OnnxType.tensor(OnnxType.float64()), OnnxType.tensor(OnnxType.string()), OnnxType.tensor(OnnxType.bool()), OnnxType.tensor(OnnxType.complex64()), OnnxType.tensor(OnnxType.complex128()), OnnxType.seq(OnnxType.tensor(OnnxType.uint8())), OnnxType.seq(OnnxType.tensor(OnnxType.uint16())), OnnxType.seq(OnnxType.tensor(OnnxType.uint32())), OnnxType.seq(OnnxType.tensor(OnnxType.uint64())), OnnxType.seq(OnnxType.tensor(OnnxType.int8())), OnnxType.seq(OnnxType.tensor(OnnxType.int16())), OnnxType.seq(OnnxType.tensor(OnnxType.int32())), OnnxType.seq(OnnxType.tensor(OnnxType.int64())), OnnxType.seq(OnnxType.tensor(OnnxType.float16())), OnnxType.seq(OnnxType.tensor(OnnxType.float32())), OnnxType.seq(OnnxType.tensor(OnnxType.float64())), OnnxType.seq(OnnxType.tensor(OnnxType.string())), OnnxType.seq(OnnxType.tensor(OnnxType.bool())), OnnxType.seq(OnnxType.tensor(OnnxType.complex64())), OnnxType.seq(OnnxType.tensor(OnnxType.complex128()))))),
18281             V(new OnnxType.TypeVariable("V", List.of(OnnxType.tensor(OnnxType.uint8()), OnnxType.tensor(OnnxType.uint16()), OnnxType.tensor(OnnxType.uint32()), OnnxType.tensor(OnnxType.uint64()), OnnxType.tensor(OnnxType.int8()), OnnxType.tensor(OnnxType.int16()), OnnxType.tensor(OnnxType.int32()), OnnxType.tensor(OnnxType.int64()), OnnxType.tensor(OnnxType.float16()), OnnxType.tensor(OnnxType.float32()), OnnxType.tensor(OnnxType.float64()), OnnxType.tensor(OnnxType.string()), OnnxType.tensor(OnnxType.bool()), OnnxType.tensor(OnnxType.complex64()), OnnxType.tensor(OnnxType.complex128()), OnnxType.seq(OnnxType.tensor(OnnxType.uint8())), OnnxType.seq(OnnxType.tensor(OnnxType.uint16())), OnnxType.seq(OnnxType.tensor(OnnxType.uint32())), OnnxType.seq(OnnxType.tensor(OnnxType.uint64())), OnnxType.seq(OnnxType.tensor(OnnxType.int8())), OnnxType.seq(OnnxType.tensor(OnnxType.int16())), OnnxType.seq(OnnxType.tensor(OnnxType.int32())), OnnxType.seq(OnnxType.tensor(OnnxType.int64())), OnnxType.seq(OnnxType.tensor(OnnxType.float16())), OnnxType.seq(OnnxType.tensor(OnnxType.float32())), OnnxType.seq(OnnxType.tensor(OnnxType.float64())), OnnxType.seq(OnnxType.tensor(OnnxType.string())), OnnxType.seq(OnnxType.tensor(OnnxType.bool())), OnnxType.seq(OnnxType.tensor(OnnxType.complex64())), OnnxType.seq(OnnxType.tensor(OnnxType.complex128()))))),
18282             ;
18283 
18284             final OnnxType.TypeVariable typeVariable;
18285 
18286             TypeConstraint(OnnxType.TypeVariable typeVariable) {
18287                 assert typeVariable.name().equals(name());
18288                 this.typeVariable = typeVariable;
18289             }
18290 
18291             @Override
18292             public OnnxType.TypeVariable typeVariable() {
18293                 return typeVariable;
18294             }
18295         }
18296 
18297         public enum InputParameter implements OnnxParameter {
18298             input(TypeConstraint.O.typeVariable(), Quantifier.REQUIRED),
18299             ;
18300 
18301             final OnnxType type;
18302             final Quantifier quantifier;
18303 
18304             InputParameter(OnnxType type, Quantifier quantifier) {
18305                 this.type = type;
18306                 this.quantifier = quantifier;
18307             }
18308 
18309             @Override
18310             public OnnxType type() {
18311                 return type;
18312             }
18313 
18314             @Override
18315             public Quantifier quantifier() {
18316                 return quantifier;
18317             }
18318         }
18319 
18320         public enum OutputParameter implements OnnxParameter {
18321             output(TypeConstraint.V.typeVariable(), Quantifier.REQUIRED),
18322             ;
18323 
18324             final OnnxType type;
18325             final Quantifier quantifier;
18326 
18327             OutputParameter(OnnxType type, Quantifier quantifier) {
18328                 this.type = type;
18329                 this.quantifier = quantifier;
18330             }
18331 
18332             @Override
18333             public OnnxType type() {
18334                 return type;
18335             }
18336 
18337             @Override
18338             public Quantifier quantifier() {
18339                 return quantifier;
18340             }
18341         }
18342 
18343         public static final OnnxSchema SCHEMA = new OnnxSchemaRecord(
18344                 NAME,
18345                 List.of(Attribute.values()),
18346                 List.of(TypeConstraint.values()),
18347                 List.of(InputParameter.values()),
18348                 List.of(OutputParameter.values())
18349         );
18350 
18351         public OptionalGetElement(ExternalizedOp def) {
18352             super(SCHEMA, def);
18353         }
18354 
18355         OptionalGetElement(OptionalGetElement that, CopyContext cc) {
18356             super(that, cc);
18357         }
18358 
18359         @Override
18360         public OptionalGetElement transform(CopyContext cc, OpTransformer ot) {
18361             return new OptionalGetElement(this, cc);
18362         }
18363 
18364         OptionalGetElement(TypeElement resultType, Value input) {
18365             super(SCHEMA, resultType, Set.of(), List.of(input), List.of());
18366         }
18367 
18368         @Override
18369         public SequencedSet<OnnxParameter> onnxOutputs() {
18370             return onnxOutputs(SCHEMA);
18371         }
18372 
18373         @Override
18374         public SequencedMap<OnnxParameter, Object> onnxInputs() {
18375             return onnxInputs(SCHEMA, List.of(input()));
18376         }
18377 
18378         public Value input() {
18379             return operands().get(0);
18380         }
18381 
18382     }
18383 
18384     public static OptionalGetElement OptionalGetElement(TypeElement resultType, Value input) {
18385         return new OptionalGetElement(resultType, input);
18386     }
18387 
18388     @OpFactory.OpDeclaration(OptionalHasElement.NAME)
18389     public static final class OptionalHasElement extends OnnxOp {
18390         public static final String NAME = "OptionalHasElement";
18391 
18392         public enum Attribute implements OnnxAttribute.None { }
18393 
18394         public enum TypeConstraint implements OnnxTypeConstraint {
18395             O(new OnnxType.TypeVariable("O", List.of(OnnxType.optional(OnnxType.seq(OnnxType.tensor(OnnxType.uint8()))), OnnxType.optional(OnnxType.seq(OnnxType.tensor(OnnxType.uint16()))), OnnxType.optional(OnnxType.seq(OnnxType.tensor(OnnxType.uint32()))), OnnxType.optional(OnnxType.seq(OnnxType.tensor(OnnxType.uint64()))), OnnxType.optional(OnnxType.seq(OnnxType.tensor(OnnxType.int8()))), OnnxType.optional(OnnxType.seq(OnnxType.tensor(OnnxType.int16()))), OnnxType.optional(OnnxType.seq(OnnxType.tensor(OnnxType.int32()))), OnnxType.optional(OnnxType.seq(OnnxType.tensor(OnnxType.int64()))), OnnxType.optional(OnnxType.seq(OnnxType.tensor(OnnxType.float16()))), OnnxType.optional(OnnxType.seq(OnnxType.tensor(OnnxType.float32()))), OnnxType.optional(OnnxType.seq(OnnxType.tensor(OnnxType.float64()))), OnnxType.optional(OnnxType.seq(OnnxType.tensor(OnnxType.string()))), OnnxType.optional(OnnxType.seq(OnnxType.tensor(OnnxType.bool()))), OnnxType.optional(OnnxType.seq(OnnxType.tensor(OnnxType.complex64()))), OnnxType.optional(OnnxType.seq(OnnxType.tensor(OnnxType.complex128()))), OnnxType.optional(OnnxType.tensor(OnnxType.uint8())), OnnxType.optional(OnnxType.tensor(OnnxType.uint16())), OnnxType.optional(OnnxType.tensor(OnnxType.uint32())), OnnxType.optional(OnnxType.tensor(OnnxType.uint64())), OnnxType.optional(OnnxType.tensor(OnnxType.int8())), OnnxType.optional(OnnxType.tensor(OnnxType.int16())), OnnxType.optional(OnnxType.tensor(OnnxType.int32())), OnnxType.optional(OnnxType.tensor(OnnxType.int64())), OnnxType.optional(OnnxType.tensor(OnnxType.float16())), OnnxType.optional(OnnxType.tensor(OnnxType.float32())), OnnxType.optional(OnnxType.tensor(OnnxType.float64())), OnnxType.optional(OnnxType.tensor(OnnxType.string())), OnnxType.optional(OnnxType.tensor(OnnxType.bool())), OnnxType.optional(OnnxType.tensor(OnnxType.complex64())), OnnxType.optional(OnnxType.tensor(OnnxType.complex128())), OnnxType.tensor(OnnxType.uint8()), OnnxType.tensor(OnnxType.uint16()), OnnxType.tensor(OnnxType.uint32()), OnnxType.tensor(OnnxType.uint64()), OnnxType.tensor(OnnxType.int8()), OnnxType.tensor(OnnxType.int16()), OnnxType.tensor(OnnxType.int32()), OnnxType.tensor(OnnxType.int64()), OnnxType.tensor(OnnxType.float16()), OnnxType.tensor(OnnxType.float32()), OnnxType.tensor(OnnxType.float64()), OnnxType.tensor(OnnxType.string()), OnnxType.tensor(OnnxType.bool()), OnnxType.tensor(OnnxType.complex64()), OnnxType.tensor(OnnxType.complex128()), OnnxType.seq(OnnxType.tensor(OnnxType.uint8())), OnnxType.seq(OnnxType.tensor(OnnxType.uint16())), OnnxType.seq(OnnxType.tensor(OnnxType.uint32())), OnnxType.seq(OnnxType.tensor(OnnxType.uint64())), OnnxType.seq(OnnxType.tensor(OnnxType.int8())), OnnxType.seq(OnnxType.tensor(OnnxType.int16())), OnnxType.seq(OnnxType.tensor(OnnxType.int32())), OnnxType.seq(OnnxType.tensor(OnnxType.int64())), OnnxType.seq(OnnxType.tensor(OnnxType.float16())), OnnxType.seq(OnnxType.tensor(OnnxType.float32())), OnnxType.seq(OnnxType.tensor(OnnxType.float64())), OnnxType.seq(OnnxType.tensor(OnnxType.string())), OnnxType.seq(OnnxType.tensor(OnnxType.bool())), OnnxType.seq(OnnxType.tensor(OnnxType.complex64())), OnnxType.seq(OnnxType.tensor(OnnxType.complex128()))))),
18396             B(new OnnxType.TypeVariable("B", List.of(OnnxType.tensor(OnnxType.bool())))),
18397             ;
18398 
18399             final OnnxType.TypeVariable typeVariable;
18400 
18401             TypeConstraint(OnnxType.TypeVariable typeVariable) {
18402                 assert typeVariable.name().equals(name());
18403                 this.typeVariable = typeVariable;
18404             }
18405 
18406             @Override
18407             public OnnxType.TypeVariable typeVariable() {
18408                 return typeVariable;
18409             }
18410         }
18411 
18412         public enum InputParameter implements OnnxParameter {
18413             input(TypeConstraint.O.typeVariable(), Quantifier.OPTIONAL),
18414             ;
18415 
18416             final OnnxType type;
18417             final Quantifier quantifier;
18418 
18419             InputParameter(OnnxType type, Quantifier quantifier) {
18420                 this.type = type;
18421                 this.quantifier = quantifier;
18422             }
18423 
18424             @Override
18425             public OnnxType type() {
18426                 return type;
18427             }
18428 
18429             @Override
18430             public Quantifier quantifier() {
18431                 return quantifier;
18432             }
18433         }
18434 
18435         public enum OutputParameter implements OnnxParameter {
18436             output(TypeConstraint.B.typeVariable(), Quantifier.REQUIRED),
18437             ;
18438 
18439             final OnnxType type;
18440             final Quantifier quantifier;
18441 
18442             OutputParameter(OnnxType type, Quantifier quantifier) {
18443                 this.type = type;
18444                 this.quantifier = quantifier;
18445             }
18446 
18447             @Override
18448             public OnnxType type() {
18449                 return type;
18450             }
18451 
18452             @Override
18453             public Quantifier quantifier() {
18454                 return quantifier;
18455             }
18456         }
18457 
18458         public static final OnnxSchema SCHEMA = new OnnxSchemaRecord(
18459                 NAME,
18460                 List.of(Attribute.values()),
18461                 List.of(TypeConstraint.values()),
18462                 List.of(InputParameter.values()),
18463                 List.of(OutputParameter.values())
18464         );
18465 
18466         public OptionalHasElement(ExternalizedOp def) {
18467             super(SCHEMA, def);
18468         }
18469 
18470         OptionalHasElement(OptionalHasElement that, CopyContext cc) {
18471             super(that, cc);
18472         }
18473 
18474         @Override
18475         public OptionalHasElement transform(CopyContext cc, OpTransformer ot) {
18476             return new OptionalHasElement(this, cc);
18477         }
18478 
18479         OptionalHasElement(TypeElement resultType, java.util.Optional<Value> input) {
18480             super(SCHEMA, resultType, Set.of(), List.of(input), List.of());
18481         }
18482 
18483         @Override
18484         public SequencedSet<OnnxParameter> onnxOutputs() {
18485             return onnxOutputs(SCHEMA);
18486         }
18487 
18488         @Override
18489         public SequencedMap<OnnxParameter, Object> onnxInputs() {
18490             return onnxInputs(SCHEMA, List.of(input()));
18491         }
18492 
18493         public java.util.Optional<Value> input() {
18494             int i = optionalInputArguments.indexOf(InputParameter.input);
18495             return i != -1 ? java.util.Optional.of(operands().get(0 + i)) : java.util.Optional.empty();
18496         }
18497 
18498     }
18499 
18500     public static OptionalHasElement OptionalHasElement(TypeElement resultType, java.util.Optional<Value> input) {
18501         return new OptionalHasElement(resultType, input);
18502     }
18503 
18504     @OpFactory.OpDeclaration(Or.NAME)
18505     public static final class Or extends OnnxOp {
18506         public static final String NAME = "Or";
18507 
18508         public enum Attribute implements OnnxAttribute.None { }
18509 
18510         public enum TypeConstraint implements OnnxTypeConstraint {
18511             T(new OnnxType.TypeVariable("T", List.of(OnnxType.tensor(OnnxType.bool())))),
18512             T1(new OnnxType.TypeVariable("T1", List.of(OnnxType.tensor(OnnxType.bool())))),
18513             ;
18514 
18515             final OnnxType.TypeVariable typeVariable;
18516 
18517             TypeConstraint(OnnxType.TypeVariable typeVariable) {
18518                 assert typeVariable.name().equals(name());
18519                 this.typeVariable = typeVariable;
18520             }
18521 
18522             @Override
18523             public OnnxType.TypeVariable typeVariable() {
18524                 return typeVariable;
18525             }
18526         }
18527 
18528         public enum InputParameter implements OnnxParameter {
18529             A(TypeConstraint.T.typeVariable(), Quantifier.REQUIRED),
18530             B(TypeConstraint.T.typeVariable(), Quantifier.REQUIRED),
18531             ;
18532 
18533             final OnnxType type;
18534             final Quantifier quantifier;
18535 
18536             InputParameter(OnnxType type, Quantifier quantifier) {
18537                 this.type = type;
18538                 this.quantifier = quantifier;
18539             }
18540 
18541             @Override
18542             public OnnxType type() {
18543                 return type;
18544             }
18545 
18546             @Override
18547             public Quantifier quantifier() {
18548                 return quantifier;
18549             }
18550         }
18551 
18552         public enum OutputParameter implements OnnxParameter {
18553             C(TypeConstraint.T1.typeVariable(), Quantifier.REQUIRED),
18554             ;
18555 
18556             final OnnxType type;
18557             final Quantifier quantifier;
18558 
18559             OutputParameter(OnnxType type, Quantifier quantifier) {
18560                 this.type = type;
18561                 this.quantifier = quantifier;
18562             }
18563 
18564             @Override
18565             public OnnxType type() {
18566                 return type;
18567             }
18568 
18569             @Override
18570             public Quantifier quantifier() {
18571                 return quantifier;
18572             }
18573         }
18574 
18575         public static final OnnxSchema SCHEMA = new OnnxSchemaRecord(
18576                 NAME,
18577                 List.of(Attribute.values()),
18578                 List.of(TypeConstraint.values()),
18579                 List.of(InputParameter.values()),
18580                 List.of(OutputParameter.values())
18581         );
18582 
18583         public Or(ExternalizedOp def) {
18584             super(SCHEMA, def);
18585         }
18586 
18587         Or(Or that, CopyContext cc) {
18588             super(that, cc);
18589         }
18590 
18591         @Override
18592         public Or transform(CopyContext cc, OpTransformer ot) {
18593             return new Or(this, cc);
18594         }
18595 
18596         Or(TypeElement resultType, Value A, Value B) {
18597             super(SCHEMA, resultType, Set.of(), List.of(A, B), List.of());
18598         }
18599 
18600         @Override
18601         public SequencedSet<OnnxParameter> onnxOutputs() {
18602             return onnxOutputs(SCHEMA);
18603         }
18604 
18605         @Override
18606         public SequencedMap<OnnxParameter, Object> onnxInputs() {
18607             return onnxInputs(SCHEMA, List.of(A(), B()));
18608         }
18609 
18610         public Value A() {
18611             return operands().get(0);
18612         }
18613 
18614         public Value B() {
18615             return operands().get(1);
18616         }
18617 
18618     }
18619 
18620     public static Or Or(TypeElement resultType, Value A, Value B) {
18621         return new Or(resultType, A, B);
18622     }
18623 
18624     @OpFactory.OpDeclaration(PRelu.NAME)
18625     public static final class PRelu extends OnnxOp {
18626         public static final String NAME = "PRelu";
18627 
18628         public enum Attribute implements OnnxAttribute.None { }
18629 
18630         public enum TypeConstraint implements OnnxTypeConstraint {
18631             T(new OnnxType.TypeVariable("T", List.of(OnnxType.tensor(OnnxType.bfloat16()), OnnxType.tensor(OnnxType.float16()), OnnxType.tensor(OnnxType.float32()), OnnxType.tensor(OnnxType.float64()), OnnxType.tensor(OnnxType.uint32()), OnnxType.tensor(OnnxType.uint64()), OnnxType.tensor(OnnxType.int32()), OnnxType.tensor(OnnxType.int64())))),
18632             ;
18633 
18634             final OnnxType.TypeVariable typeVariable;
18635 
18636             TypeConstraint(OnnxType.TypeVariable typeVariable) {
18637                 assert typeVariable.name().equals(name());
18638                 this.typeVariable = typeVariable;
18639             }
18640 
18641             @Override
18642             public OnnxType.TypeVariable typeVariable() {
18643                 return typeVariable;
18644             }
18645         }
18646 
18647         public enum InputParameter implements OnnxParameter {
18648             X(TypeConstraint.T.typeVariable(), Quantifier.REQUIRED),
18649             slope(TypeConstraint.T.typeVariable(), Quantifier.REQUIRED),
18650             ;
18651 
18652             final OnnxType type;
18653             final Quantifier quantifier;
18654 
18655             InputParameter(OnnxType type, Quantifier quantifier) {
18656                 this.type = type;
18657                 this.quantifier = quantifier;
18658             }
18659 
18660             @Override
18661             public OnnxType type() {
18662                 return type;
18663             }
18664 
18665             @Override
18666             public Quantifier quantifier() {
18667                 return quantifier;
18668             }
18669         }
18670 
18671         public enum OutputParameter implements OnnxParameter {
18672             Y(TypeConstraint.T.typeVariable(), Quantifier.REQUIRED),
18673             ;
18674 
18675             final OnnxType type;
18676             final Quantifier quantifier;
18677 
18678             OutputParameter(OnnxType type, Quantifier quantifier) {
18679                 this.type = type;
18680                 this.quantifier = quantifier;
18681             }
18682 
18683             @Override
18684             public OnnxType type() {
18685                 return type;
18686             }
18687 
18688             @Override
18689             public Quantifier quantifier() {
18690                 return quantifier;
18691             }
18692         }
18693 
18694         public static final OnnxSchema SCHEMA = new OnnxSchemaRecord(
18695                 NAME,
18696                 List.of(Attribute.values()),
18697                 List.of(TypeConstraint.values()),
18698                 List.of(InputParameter.values()),
18699                 List.of(OutputParameter.values())
18700         );
18701 
18702         public PRelu(ExternalizedOp def) {
18703             super(SCHEMA, def);
18704         }
18705 
18706         PRelu(PRelu that, CopyContext cc) {
18707             super(that, cc);
18708         }
18709 
18710         @Override
18711         public PRelu transform(CopyContext cc, OpTransformer ot) {
18712             return new PRelu(this, cc);
18713         }
18714 
18715         PRelu(TypeElement resultType, Value X, Value slope) {
18716             super(SCHEMA, resultType, Set.of(), List.of(X, slope), List.of());
18717         }
18718 
18719         @Override
18720         public SequencedSet<OnnxParameter> onnxOutputs() {
18721             return onnxOutputs(SCHEMA);
18722         }
18723 
18724         @Override
18725         public SequencedMap<OnnxParameter, Object> onnxInputs() {
18726             return onnxInputs(SCHEMA, List.of(X(), slope()));
18727         }
18728 
18729         public Value X() {
18730             return operands().get(0);
18731         }
18732 
18733         public Value slope() {
18734             return operands().get(1);
18735         }
18736 
18737     }
18738 
18739     public static PRelu PRelu(TypeElement resultType, Value X, Value slope) {
18740         return new PRelu(resultType, X, slope);
18741     }
18742 
18743     @OpFactory.OpDeclaration(Pad.NAME)
18744     public static final class Pad extends OnnxOp {
18745         public static final String NAME = "Pad";
18746 
18747         public enum Attribute implements OnnxAttribute {
18748             mode(String.class, true, "constant"),
18749             ;
18750 
18751                 final Class<?> t;
18752                 final boolean optional;
18753                 final Object defaultValue;
18754 
18755                 Attribute(Class<?> type, boolean optional, Object defaultValue) {
18756                     this.t = type;
18757                     this.optional = optional;
18758                     this.defaultValue = defaultValue;
18759                     assert optional || defaultValue == null;
18760                 }
18761 
18762                 public Class<?> type() {
18763                     return t;
18764                 }
18765 
18766                 public boolean isOptional() {
18767                     return optional;
18768                 }
18769 
18770                 public Object defaultValue() {
18771                     return defaultValue;
18772                 }
18773         }
18774 
18775         public enum TypeConstraint implements OnnxTypeConstraint {
18776             T(new OnnxType.TypeVariable("T", List.of(OnnxType.tensor(OnnxType.uint8()), OnnxType.tensor(OnnxType.uint16()), OnnxType.tensor(OnnxType.uint32()), OnnxType.tensor(OnnxType.uint64()), OnnxType.tensor(OnnxType.int8()), OnnxType.tensor(OnnxType.int16()), OnnxType.tensor(OnnxType.int32()), OnnxType.tensor(OnnxType.int64()), OnnxType.tensor(OnnxType.bfloat16()), OnnxType.tensor(OnnxType.float16()), OnnxType.tensor(OnnxType.float32()), OnnxType.tensor(OnnxType.float64()), OnnxType.tensor(OnnxType.string()), OnnxType.tensor(OnnxType.bool()), OnnxType.tensor(OnnxType.complex64()), OnnxType.tensor(OnnxType.complex128()), OnnxType.tensor(OnnxType.float8e4m3fn()), OnnxType.tensor(OnnxType.float8e4m3fnuz()), OnnxType.tensor(OnnxType.float8e5m2()), OnnxType.tensor(OnnxType.float8e5m2fnuz()), OnnxType.tensor(OnnxType.uint4()), OnnxType.tensor(OnnxType.int4()), OnnxType.tensor(OnnxType.float4e2m1())))),
18777             Tind(new OnnxType.TypeVariable("Tind", List.of(OnnxType.tensor(OnnxType.int32()), OnnxType.tensor(OnnxType.int64())))),
18778             ;
18779 
18780             final OnnxType.TypeVariable typeVariable;
18781 
18782             TypeConstraint(OnnxType.TypeVariable typeVariable) {
18783                 assert typeVariable.name().equals(name());
18784                 this.typeVariable = typeVariable;
18785             }
18786 
18787             @Override
18788             public OnnxType.TypeVariable typeVariable() {
18789                 return typeVariable;
18790             }
18791         }
18792 
18793         public enum InputParameter implements OnnxParameter {
18794             data(TypeConstraint.T.typeVariable(), Quantifier.REQUIRED),
18795             pads(OnnxType.tensor(OnnxType.int64()), Quantifier.REQUIRED),
18796             constant_value(TypeConstraint.T.typeVariable(), Quantifier.OPTIONAL),
18797             axes(TypeConstraint.Tind.typeVariable(), Quantifier.OPTIONAL),
18798             ;
18799 
18800             final OnnxType type;
18801             final Quantifier quantifier;
18802 
18803             InputParameter(OnnxType type, Quantifier quantifier) {
18804                 this.type = type;
18805                 this.quantifier = quantifier;
18806             }
18807 
18808             @Override
18809             public OnnxType type() {
18810                 return type;
18811             }
18812 
18813             @Override
18814             public Quantifier quantifier() {
18815                 return quantifier;
18816             }
18817         }
18818 
18819         public enum OutputParameter implements OnnxParameter {
18820             output(TypeConstraint.T.typeVariable(), Quantifier.REQUIRED),
18821             ;
18822 
18823             final OnnxType type;
18824             final Quantifier quantifier;
18825 
18826             OutputParameter(OnnxType type, Quantifier quantifier) {
18827                 this.type = type;
18828                 this.quantifier = quantifier;
18829             }
18830 
18831             @Override
18832             public OnnxType type() {
18833                 return type;
18834             }
18835 
18836             @Override
18837             public Quantifier quantifier() {
18838                 return quantifier;
18839             }
18840         }
18841 
18842         public static final OnnxSchema SCHEMA = new OnnxSchemaRecord(
18843                 NAME,
18844                 List.of(Attribute.values()),
18845                 List.of(TypeConstraint.values()),
18846                 List.of(InputParameter.values()),
18847                 List.of(OutputParameter.values())
18848         );
18849 
18850         public Pad(ExternalizedOp def) {
18851             super(SCHEMA, def);
18852         }
18853 
18854         Pad(Pad that, CopyContext cc) {
18855             super(that, cc);
18856         }
18857 
18858         @Override
18859         public Pad transform(CopyContext cc, OpTransformer ot) {
18860             return new Pad(this, cc);
18861         }
18862 
18863         Pad(TypeElement resultType, Value data, Value pads, java.util.Optional<Value> constant_value, java.util.Optional<Value> axes, java.util.Optional<String> mode) {
18864             super(SCHEMA, resultType, Set.of(), List.of(data, pads, constant_value, axes), List.of(mode));
18865         }
18866 
18867         @Override
18868         public SequencedSet<OnnxParameter> onnxOutputs() {
18869             return onnxOutputs(SCHEMA);
18870         }
18871 
18872         @Override
18873         public SequencedMap<OnnxParameter, Object> onnxInputs() {
18874             return onnxInputs(SCHEMA, List.of(data(), pads(), constant_value(), axes()));
18875         }
18876 
18877         public Value data() {
18878             return operands().get(0);
18879         }
18880 
18881         public Value pads() {
18882             return operands().get(1);
18883         }
18884 
18885         public java.util.Optional<Value> constant_value() {
18886             int i = optionalInputArguments.indexOf(InputParameter.constant_value);
18887             return i != -1 ? java.util.Optional.of(operands().get(2 + i)) : java.util.Optional.empty();
18888         }
18889 
18890         public java.util.Optional<Value> axes() {
18891             int i = optionalInputArguments.indexOf(InputParameter.axes);
18892             return i != -1 ? java.util.Optional.of(operands().get(2 + i)) : java.util.Optional.empty();
18893         }
18894 
18895         public java.util.Optional<String> mode() {
18896             String mode = Attribute.mode.access(String.class, onnxAttributes);
18897             return java.util.Optional.ofNullable(mode);
18898         }
18899 
18900     }
18901 
18902     public static Pad Pad(TypeElement resultType, Value data, Value pads, java.util.Optional<Value> constant_value, java.util.Optional<Value> axes, java.util.Optional<String> mode) {
18903         return new Pad(resultType, data, pads, constant_value, axes, mode);
18904     }
18905 
18906     @OpFactory.OpDeclaration(Pow.NAME)
18907     public static final class Pow extends OnnxOp {
18908         public static final String NAME = "Pow";
18909 
18910         public enum Attribute implements OnnxAttribute.None { }
18911 
18912         public enum TypeConstraint implements OnnxTypeConstraint {
18913             T(new OnnxType.TypeVariable("T", List.of(OnnxType.tensor(OnnxType.int32()), OnnxType.tensor(OnnxType.int64()), OnnxType.tensor(OnnxType.float16()), OnnxType.tensor(OnnxType.float32()), OnnxType.tensor(OnnxType.float64()), OnnxType.tensor(OnnxType.bfloat16())))),
18914             T1(new OnnxType.TypeVariable("T1", List.of(OnnxType.tensor(OnnxType.uint8()), OnnxType.tensor(OnnxType.uint16()), OnnxType.tensor(OnnxType.uint32()), OnnxType.tensor(OnnxType.uint64()), OnnxType.tensor(OnnxType.int8()), OnnxType.tensor(OnnxType.int16()), OnnxType.tensor(OnnxType.int32()), OnnxType.tensor(OnnxType.int64()), OnnxType.tensor(OnnxType.float16()), OnnxType.tensor(OnnxType.float32()), OnnxType.tensor(OnnxType.float64()), OnnxType.tensor(OnnxType.bfloat16())))),
18915             ;
18916 
18917             final OnnxType.TypeVariable typeVariable;
18918 
18919             TypeConstraint(OnnxType.TypeVariable typeVariable) {
18920                 assert typeVariable.name().equals(name());
18921                 this.typeVariable = typeVariable;
18922             }
18923 
18924             @Override
18925             public OnnxType.TypeVariable typeVariable() {
18926                 return typeVariable;
18927             }
18928         }
18929 
18930         public enum InputParameter implements OnnxParameter {
18931             X(TypeConstraint.T.typeVariable(), Quantifier.REQUIRED),
18932             Y(TypeConstraint.T1.typeVariable(), Quantifier.REQUIRED),
18933             ;
18934 
18935             final OnnxType type;
18936             final Quantifier quantifier;
18937 
18938             InputParameter(OnnxType type, Quantifier quantifier) {
18939                 this.type = type;
18940                 this.quantifier = quantifier;
18941             }
18942 
18943             @Override
18944             public OnnxType type() {
18945                 return type;
18946             }
18947 
18948             @Override
18949             public Quantifier quantifier() {
18950                 return quantifier;
18951             }
18952         }
18953 
18954         public enum OutputParameter implements OnnxParameter {
18955             Z(TypeConstraint.T.typeVariable(), Quantifier.REQUIRED),
18956             ;
18957 
18958             final OnnxType type;
18959             final Quantifier quantifier;
18960 
18961             OutputParameter(OnnxType type, Quantifier quantifier) {
18962                 this.type = type;
18963                 this.quantifier = quantifier;
18964             }
18965 
18966             @Override
18967             public OnnxType type() {
18968                 return type;
18969             }
18970 
18971             @Override
18972             public Quantifier quantifier() {
18973                 return quantifier;
18974             }
18975         }
18976 
18977         public static final OnnxSchema SCHEMA = new OnnxSchemaRecord(
18978                 NAME,
18979                 List.of(Attribute.values()),
18980                 List.of(TypeConstraint.values()),
18981                 List.of(InputParameter.values()),
18982                 List.of(OutputParameter.values())
18983         );
18984 
18985         public Pow(ExternalizedOp def) {
18986             super(SCHEMA, def);
18987         }
18988 
18989         Pow(Pow that, CopyContext cc) {
18990             super(that, cc);
18991         }
18992 
18993         @Override
18994         public Pow transform(CopyContext cc, OpTransformer ot) {
18995             return new Pow(this, cc);
18996         }
18997 
18998         Pow(TypeElement resultType, Value X, Value Y) {
18999             super(SCHEMA, resultType, Set.of(), List.of(X, Y), List.of());
19000         }
19001 
19002         @Override
19003         public SequencedSet<OnnxParameter> onnxOutputs() {
19004             return onnxOutputs(SCHEMA);
19005         }
19006 
19007         @Override
19008         public SequencedMap<OnnxParameter, Object> onnxInputs() {
19009             return onnxInputs(SCHEMA, List.of(X(), Y()));
19010         }
19011 
19012         public Value X() {
19013             return operands().get(0);
19014         }
19015 
19016         public Value Y() {
19017             return operands().get(1);
19018         }
19019 
19020     }
19021 
19022     public static Pow Pow(TypeElement resultType, Value X, Value Y) {
19023         return new Pow(resultType, X, Y);
19024     }
19025 
19026     @OpFactory.OpDeclaration(QLinearConv.NAME)
19027     public static final class QLinearConv extends OnnxOp {
19028         public static final String NAME = "QLinearConv";
19029 
19030         public enum Attribute implements OnnxAttribute {
19031             pads(int[].class, true, null),
19032             dilations(int[].class, true, null),
19033             auto_pad(String.class, true, "NOTSET"),
19034             strides(int[].class, true, null),
19035             group(Integer.class, true, 1),
19036             kernel_shape(int[].class, true, null),
19037             ;
19038 
19039                 final Class<?> t;
19040                 final boolean optional;
19041                 final Object defaultValue;
19042 
19043                 Attribute(Class<?> type, boolean optional, Object defaultValue) {
19044                     this.t = type;
19045                     this.optional = optional;
19046                     this.defaultValue = defaultValue;
19047                     assert optional || defaultValue == null;
19048                 }
19049 
19050                 public Class<?> type() {
19051                     return t;
19052                 }
19053 
19054                 public boolean isOptional() {
19055                     return optional;
19056                 }
19057 
19058                 public Object defaultValue() {
19059                     return defaultValue;
19060                 }
19061         }
19062 
19063         public enum TypeConstraint implements OnnxTypeConstraint {
19064             T1(new OnnxType.TypeVariable("T1", List.of(OnnxType.tensor(OnnxType.int8()), OnnxType.tensor(OnnxType.uint8())))),
19065             T2(new OnnxType.TypeVariable("T2", List.of(OnnxType.tensor(OnnxType.int8()), OnnxType.tensor(OnnxType.uint8())))),
19066             T3(new OnnxType.TypeVariable("T3", List.of(OnnxType.tensor(OnnxType.int8()), OnnxType.tensor(OnnxType.uint8())))),
19067             T4(new OnnxType.TypeVariable("T4", List.of(OnnxType.tensor(OnnxType.int32())))),
19068             ;
19069 
19070             final OnnxType.TypeVariable typeVariable;
19071 
19072             TypeConstraint(OnnxType.TypeVariable typeVariable) {
19073                 assert typeVariable.name().equals(name());
19074                 this.typeVariable = typeVariable;
19075             }
19076 
19077             @Override
19078             public OnnxType.TypeVariable typeVariable() {
19079                 return typeVariable;
19080             }
19081         }
19082 
19083         public enum InputParameter implements OnnxParameter {
19084             x(TypeConstraint.T1.typeVariable(), Quantifier.REQUIRED),
19085             x_scale(OnnxType.tensor(OnnxType.float32()), Quantifier.REQUIRED),
19086             x_zero_point(TypeConstraint.T1.typeVariable(), Quantifier.REQUIRED),
19087             w(TypeConstraint.T2.typeVariable(), Quantifier.REQUIRED),
19088             w_scale(OnnxType.tensor(OnnxType.float32()), Quantifier.REQUIRED),
19089             w_zero_point(TypeConstraint.T2.typeVariable(), Quantifier.REQUIRED),
19090             y_scale(OnnxType.tensor(OnnxType.float32()), Quantifier.REQUIRED),
19091             y_zero_point(TypeConstraint.T3.typeVariable(), Quantifier.REQUIRED),
19092             B(TypeConstraint.T4.typeVariable(), Quantifier.OPTIONAL),
19093             ;
19094 
19095             final OnnxType type;
19096             final Quantifier quantifier;
19097 
19098             InputParameter(OnnxType type, Quantifier quantifier) {
19099                 this.type = type;
19100                 this.quantifier = quantifier;
19101             }
19102 
19103             @Override
19104             public OnnxType type() {
19105                 return type;
19106             }
19107 
19108             @Override
19109             public Quantifier quantifier() {
19110                 return quantifier;
19111             }
19112         }
19113 
19114         public enum OutputParameter implements OnnxParameter {
19115             y(TypeConstraint.T3.typeVariable(), Quantifier.REQUIRED),
19116             ;
19117 
19118             final OnnxType type;
19119             final Quantifier quantifier;
19120 
19121             OutputParameter(OnnxType type, Quantifier quantifier) {
19122                 this.type = type;
19123                 this.quantifier = quantifier;
19124             }
19125 
19126             @Override
19127             public OnnxType type() {
19128                 return type;
19129             }
19130 
19131             @Override
19132             public Quantifier quantifier() {
19133                 return quantifier;
19134             }
19135         }
19136 
19137         public static final OnnxSchema SCHEMA = new OnnxSchemaRecord(
19138                 NAME,
19139                 List.of(Attribute.values()),
19140                 List.of(TypeConstraint.values()),
19141                 List.of(InputParameter.values()),
19142                 List.of(OutputParameter.values())
19143         );
19144 
19145         public QLinearConv(ExternalizedOp def) {
19146             super(SCHEMA, def);
19147         }
19148 
19149         QLinearConv(QLinearConv that, CopyContext cc) {
19150             super(that, cc);
19151         }
19152 
19153         @Override
19154         public QLinearConv transform(CopyContext cc, OpTransformer ot) {
19155             return new QLinearConv(this, cc);
19156         }
19157 
19158         QLinearConv(TypeElement resultType, Value x, Value x_scale, Value x_zero_point, Value w, Value w_scale, Value w_zero_point, Value y_scale, Value y_zero_point, java.util.Optional<Value> B, java.util.Optional<int[]> pads, java.util.Optional<int[]> dilations, java.util.Optional<String> auto_pad, java.util.Optional<int[]> strides, java.util.Optional<Integer> group, java.util.Optional<int[]> kernel_shape) {
19159             super(SCHEMA, resultType, Set.of(), List.of(x, x_scale, x_zero_point, w, w_scale, w_zero_point, y_scale, y_zero_point, B), List.of(pads, dilations, auto_pad, strides, group, kernel_shape));
19160         }
19161 
19162         @Override
19163         public SequencedSet<OnnxParameter> onnxOutputs() {
19164             return onnxOutputs(SCHEMA);
19165         }
19166 
19167         @Override
19168         public SequencedMap<OnnxParameter, Object> onnxInputs() {
19169             return onnxInputs(SCHEMA, List.of(x(), x_scale(), x_zero_point(), w(), w_scale(), w_zero_point(), y_scale(), y_zero_point(), B()));
19170         }
19171 
19172         public Value x() {
19173             return operands().get(0);
19174         }
19175 
19176         public Value x_scale() {
19177             return operands().get(1);
19178         }
19179 
19180         public Value x_zero_point() {
19181             return operands().get(2);
19182         }
19183 
19184         public Value w() {
19185             return operands().get(3);
19186         }
19187 
19188         public Value w_scale() {
19189             return operands().get(4);
19190         }
19191 
19192         public Value w_zero_point() {
19193             return operands().get(5);
19194         }
19195 
19196         public Value y_scale() {
19197             return operands().get(6);
19198         }
19199 
19200         public Value y_zero_point() {
19201             return operands().get(7);
19202         }
19203 
19204         public java.util.Optional<Value> B() {
19205             int i = optionalInputArguments.indexOf(InputParameter.B);
19206             return i != -1 ? java.util.Optional.of(operands().get(8 + i)) : java.util.Optional.empty();
19207         }
19208 
19209         public java.util.Optional<int[]> pads() {
19210             int[] pads = Attribute.pads.access(int[].class, onnxAttributes);
19211             return java.util.Optional.ofNullable(pads).map(int[]::clone);
19212         }
19213 
19214         public java.util.Optional<int[]> dilations() {
19215             int[] dilations = Attribute.dilations.access(int[].class, onnxAttributes);
19216             return java.util.Optional.ofNullable(dilations).map(int[]::clone);
19217         }
19218 
19219         public java.util.Optional<String> auto_pad() {
19220             String auto_pad = Attribute.auto_pad.access(String.class, onnxAttributes);
19221             return java.util.Optional.ofNullable(auto_pad);
19222         }
19223 
19224         public java.util.Optional<int[]> strides() {
19225             int[] strides = Attribute.strides.access(int[].class, onnxAttributes);
19226             return java.util.Optional.ofNullable(strides).map(int[]::clone);
19227         }
19228 
19229         public java.util.Optional<Integer> group() {
19230             Integer group = Attribute.group.access(Integer.class, onnxAttributes);
19231             return java.util.Optional.ofNullable(group);
19232         }
19233 
19234         public java.util.Optional<int[]> kernel_shape() {
19235             int[] kernel_shape = Attribute.kernel_shape.access(int[].class, onnxAttributes);
19236             return java.util.Optional.ofNullable(kernel_shape).map(int[]::clone);
19237         }
19238 
19239     }
19240 
19241     public static QLinearConv QLinearConv(TypeElement resultType, Value x, Value x_scale, Value x_zero_point, Value w, Value w_scale, Value w_zero_point, Value y_scale, Value y_zero_point, java.util.Optional<Value> B, java.util.Optional<int[]> pads, java.util.Optional<int[]> dilations, java.util.Optional<String> auto_pad, java.util.Optional<int[]> strides, java.util.Optional<Integer> group, java.util.Optional<int[]> kernel_shape) {
19242         return new QLinearConv(resultType, x, x_scale, x_zero_point, w, w_scale, w_zero_point, y_scale, y_zero_point, B, pads, dilations, auto_pad, strides, group, kernel_shape);
19243     }
19244 
19245     @OpFactory.OpDeclaration(QLinearMatMul.NAME)
19246     public static final class QLinearMatMul extends OnnxOp {
19247         public static final String NAME = "QLinearMatMul";
19248 
19249         public enum Attribute implements OnnxAttribute.None { }
19250 
19251         public enum TypeConstraint implements OnnxTypeConstraint {
19252             TS(new OnnxType.TypeVariable("TS", List.of(OnnxType.tensor(OnnxType.float32()), OnnxType.tensor(OnnxType.float16()), OnnxType.tensor(OnnxType.bfloat16())))),
19253             T1(new OnnxType.TypeVariable("T1", List.of(OnnxType.tensor(OnnxType.int8()), OnnxType.tensor(OnnxType.uint8()), OnnxType.tensor(OnnxType.float8e4m3fn()), OnnxType.tensor(OnnxType.float8e4m3fnuz()), OnnxType.tensor(OnnxType.float8e5m2()), OnnxType.tensor(OnnxType.float8e5m2fnuz())))),
19254             T2(new OnnxType.TypeVariable("T2", List.of(OnnxType.tensor(OnnxType.int8()), OnnxType.tensor(OnnxType.uint8()), OnnxType.tensor(OnnxType.float8e4m3fn()), OnnxType.tensor(OnnxType.float8e4m3fnuz()), OnnxType.tensor(OnnxType.float8e5m2()), OnnxType.tensor(OnnxType.float8e5m2fnuz())))),
19255             T3(new OnnxType.TypeVariable("T3", List.of(OnnxType.tensor(OnnxType.int8()), OnnxType.tensor(OnnxType.uint8()), OnnxType.tensor(OnnxType.float8e4m3fn()), OnnxType.tensor(OnnxType.float8e4m3fnuz()), OnnxType.tensor(OnnxType.float8e5m2()), OnnxType.tensor(OnnxType.float8e5m2fnuz())))),
19256             ;
19257 
19258             final OnnxType.TypeVariable typeVariable;
19259 
19260             TypeConstraint(OnnxType.TypeVariable typeVariable) {
19261                 assert typeVariable.name().equals(name());
19262                 this.typeVariable = typeVariable;
19263             }
19264 
19265             @Override
19266             public OnnxType.TypeVariable typeVariable() {
19267                 return typeVariable;
19268             }
19269         }
19270 
19271         public enum InputParameter implements OnnxParameter {
19272             a(TypeConstraint.T1.typeVariable(), Quantifier.REQUIRED),
19273             a_scale(TypeConstraint.TS.typeVariable(), Quantifier.REQUIRED),
19274             a_zero_point(TypeConstraint.T1.typeVariable(), Quantifier.REQUIRED),
19275             b(TypeConstraint.T2.typeVariable(), Quantifier.REQUIRED),
19276             b_scale(TypeConstraint.TS.typeVariable(), Quantifier.REQUIRED),
19277             b_zero_point(TypeConstraint.T2.typeVariable(), Quantifier.REQUIRED),
19278             y_scale(TypeConstraint.TS.typeVariable(), Quantifier.REQUIRED),
19279             y_zero_point(TypeConstraint.T3.typeVariable(), Quantifier.REQUIRED),
19280             ;
19281 
19282             final OnnxType type;
19283             final Quantifier quantifier;
19284 
19285             InputParameter(OnnxType type, Quantifier quantifier) {
19286                 this.type = type;
19287                 this.quantifier = quantifier;
19288             }
19289 
19290             @Override
19291             public OnnxType type() {
19292                 return type;
19293             }
19294 
19295             @Override
19296             public Quantifier quantifier() {
19297                 return quantifier;
19298             }
19299         }
19300 
19301         public enum OutputParameter implements OnnxParameter {
19302             y(TypeConstraint.T3.typeVariable(), Quantifier.REQUIRED),
19303             ;
19304 
19305             final OnnxType type;
19306             final Quantifier quantifier;
19307 
19308             OutputParameter(OnnxType type, Quantifier quantifier) {
19309                 this.type = type;
19310                 this.quantifier = quantifier;
19311             }
19312 
19313             @Override
19314             public OnnxType type() {
19315                 return type;
19316             }
19317 
19318             @Override
19319             public Quantifier quantifier() {
19320                 return quantifier;
19321             }
19322         }
19323 
19324         public static final OnnxSchema SCHEMA = new OnnxSchemaRecord(
19325                 NAME,
19326                 List.of(Attribute.values()),
19327                 List.of(TypeConstraint.values()),
19328                 List.of(InputParameter.values()),
19329                 List.of(OutputParameter.values())
19330         );
19331 
19332         public QLinearMatMul(ExternalizedOp def) {
19333             super(SCHEMA, def);
19334         }
19335 
19336         QLinearMatMul(QLinearMatMul that, CopyContext cc) {
19337             super(that, cc);
19338         }
19339 
19340         @Override
19341         public QLinearMatMul transform(CopyContext cc, OpTransformer ot) {
19342             return new QLinearMatMul(this, cc);
19343         }
19344 
19345         QLinearMatMul(TypeElement resultType, Value a, Value a_scale, Value a_zero_point, Value b, Value b_scale, Value b_zero_point, Value y_scale, Value y_zero_point) {
19346             super(SCHEMA, resultType, Set.of(), List.of(a, a_scale, a_zero_point, b, b_scale, b_zero_point, y_scale, y_zero_point), List.of());
19347         }
19348 
19349         @Override
19350         public SequencedSet<OnnxParameter> onnxOutputs() {
19351             return onnxOutputs(SCHEMA);
19352         }
19353 
19354         @Override
19355         public SequencedMap<OnnxParameter, Object> onnxInputs() {
19356             return onnxInputs(SCHEMA, List.of(a(), a_scale(), a_zero_point(), b(), b_scale(), b_zero_point(), y_scale(), y_zero_point()));
19357         }
19358 
19359         public Value a() {
19360             return operands().get(0);
19361         }
19362 
19363         public Value a_scale() {
19364             return operands().get(1);
19365         }
19366 
19367         public Value a_zero_point() {
19368             return operands().get(2);
19369         }
19370 
19371         public Value b() {
19372             return operands().get(3);
19373         }
19374 
19375         public Value b_scale() {
19376             return operands().get(4);
19377         }
19378 
19379         public Value b_zero_point() {
19380             return operands().get(5);
19381         }
19382 
19383         public Value y_scale() {
19384             return operands().get(6);
19385         }
19386 
19387         public Value y_zero_point() {
19388             return operands().get(7);
19389         }
19390 
19391     }
19392 
19393     public static QLinearMatMul QLinearMatMul(TypeElement resultType, Value a, Value a_scale, Value a_zero_point, Value b, Value b_scale, Value b_zero_point, Value y_scale, Value y_zero_point) {
19394         return new QLinearMatMul(resultType, a, a_scale, a_zero_point, b, b_scale, b_zero_point, y_scale, y_zero_point);
19395     }
19396 
19397     @OpFactory.OpDeclaration(QuantizeLinear.NAME)
19398     public static final class QuantizeLinear extends OnnxOp {
19399         public static final String NAME = "QuantizeLinear";
19400 
19401         public enum Attribute implements OnnxAttribute {
19402             output_dtype(Integer.class, true, 0),
19403             saturate(Integer.class, true, 1),
19404             axis(Integer.class, true, 1),
19405             block_size(Integer.class, true, 0),
19406             ;
19407 
19408                 final Class<?> t;
19409                 final boolean optional;
19410                 final Object defaultValue;
19411 
19412                 Attribute(Class<?> type, boolean optional, Object defaultValue) {
19413                     this.t = type;
19414                     this.optional = optional;
19415                     this.defaultValue = defaultValue;
19416                     assert optional || defaultValue == null;
19417                 }
19418 
19419                 public Class<?> type() {
19420                     return t;
19421                 }
19422 
19423                 public boolean isOptional() {
19424                     return optional;
19425                 }
19426 
19427                 public Object defaultValue() {
19428                     return defaultValue;
19429                 }
19430         }
19431 
19432         public enum TypeConstraint implements OnnxTypeConstraint {
19433             T1(new OnnxType.TypeVariable("T1", List.of(OnnxType.tensor(OnnxType.float32()), OnnxType.tensor(OnnxType.float16()), OnnxType.tensor(OnnxType.bfloat16()), OnnxType.tensor(OnnxType.int32())))),
19434             T2(new OnnxType.TypeVariable("T2", List.of(OnnxType.tensor(OnnxType.int8()), OnnxType.tensor(OnnxType.uint8()), OnnxType.tensor(OnnxType.int16()), OnnxType.tensor(OnnxType.uint16()), OnnxType.tensor(OnnxType.float8e4m3fn()), OnnxType.tensor(OnnxType.float8e4m3fnuz()), OnnxType.tensor(OnnxType.float8e5m2()), OnnxType.tensor(OnnxType.float8e5m2fnuz()), OnnxType.tensor(OnnxType.uint4()), OnnxType.tensor(OnnxType.int4()), OnnxType.tensor(OnnxType.float4e2m1())))),
19435             ;
19436 
19437             final OnnxType.TypeVariable typeVariable;
19438 
19439             TypeConstraint(OnnxType.TypeVariable typeVariable) {
19440                 assert typeVariable.name().equals(name());
19441                 this.typeVariable = typeVariable;
19442             }
19443 
19444             @Override
19445             public OnnxType.TypeVariable typeVariable() {
19446                 return typeVariable;
19447             }
19448         }
19449 
19450         public enum InputParameter implements OnnxParameter {
19451             x(TypeConstraint.T1.typeVariable(), Quantifier.REQUIRED),
19452             y_scale(TypeConstraint.T1.typeVariable(), Quantifier.REQUIRED),
19453             y_zero_point(TypeConstraint.T2.typeVariable(), Quantifier.OPTIONAL),
19454             ;
19455 
19456             final OnnxType type;
19457             final Quantifier quantifier;
19458 
19459             InputParameter(OnnxType type, Quantifier quantifier) {
19460                 this.type = type;
19461                 this.quantifier = quantifier;
19462             }
19463 
19464             @Override
19465             public OnnxType type() {
19466                 return type;
19467             }
19468 
19469             @Override
19470             public Quantifier quantifier() {
19471                 return quantifier;
19472             }
19473         }
19474 
19475         public enum OutputParameter implements OnnxParameter {
19476             y(TypeConstraint.T2.typeVariable(), Quantifier.REQUIRED),
19477             ;
19478 
19479             final OnnxType type;
19480             final Quantifier quantifier;
19481 
19482             OutputParameter(OnnxType type, Quantifier quantifier) {
19483                 this.type = type;
19484                 this.quantifier = quantifier;
19485             }
19486 
19487             @Override
19488             public OnnxType type() {
19489                 return type;
19490             }
19491 
19492             @Override
19493             public Quantifier quantifier() {
19494                 return quantifier;
19495             }
19496         }
19497 
19498         public static final OnnxSchema SCHEMA = new OnnxSchemaRecord(
19499                 NAME,
19500                 List.of(Attribute.values()),
19501                 List.of(TypeConstraint.values()),
19502                 List.of(InputParameter.values()),
19503                 List.of(OutputParameter.values())
19504         );
19505 
19506         public QuantizeLinear(ExternalizedOp def) {
19507             super(SCHEMA, def);
19508         }
19509 
19510         QuantizeLinear(QuantizeLinear that, CopyContext cc) {
19511             super(that, cc);
19512         }
19513 
19514         @Override
19515         public QuantizeLinear transform(CopyContext cc, OpTransformer ot) {
19516             return new QuantizeLinear(this, cc);
19517         }
19518 
19519         QuantizeLinear(TypeElement resultType, Value x, Value y_scale, java.util.Optional<Value> y_zero_point, java.util.Optional<Integer> output_dtype, java.util.Optional<Integer> saturate, java.util.Optional<Integer> axis, java.util.Optional<Integer> block_size) {
19520             super(SCHEMA, resultType, Set.of(), List.of(x, y_scale, y_zero_point), List.of(output_dtype, saturate, axis, block_size));
19521         }
19522 
19523         @Override
19524         public SequencedSet<OnnxParameter> onnxOutputs() {
19525             return onnxOutputs(SCHEMA);
19526         }
19527 
19528         @Override
19529         public SequencedMap<OnnxParameter, Object> onnxInputs() {
19530             return onnxInputs(SCHEMA, List.of(x(), y_scale(), y_zero_point()));
19531         }
19532 
19533         public Value x() {
19534             return operands().get(0);
19535         }
19536 
19537         public Value y_scale() {
19538             return operands().get(1);
19539         }
19540 
19541         public java.util.Optional<Value> y_zero_point() {
19542             int i = optionalInputArguments.indexOf(InputParameter.y_zero_point);
19543             return i != -1 ? java.util.Optional.of(operands().get(2 + i)) : java.util.Optional.empty();
19544         }
19545 
19546         public java.util.Optional<Integer> output_dtype() {
19547             Integer output_dtype = Attribute.output_dtype.access(Integer.class, onnxAttributes);
19548             return java.util.Optional.ofNullable(output_dtype);
19549         }
19550 
19551         public java.util.Optional<Integer> saturate() {
19552             Integer saturate = Attribute.saturate.access(Integer.class, onnxAttributes);
19553             return java.util.Optional.ofNullable(saturate);
19554         }
19555 
19556         public java.util.Optional<Integer> axis() {
19557             Integer axis = Attribute.axis.access(Integer.class, onnxAttributes);
19558             return java.util.Optional.ofNullable(axis);
19559         }
19560 
19561         public java.util.Optional<Integer> block_size() {
19562             Integer block_size = Attribute.block_size.access(Integer.class, onnxAttributes);
19563             return java.util.Optional.ofNullable(block_size);
19564         }
19565 
19566     }
19567 
19568     public static QuantizeLinear QuantizeLinear(TypeElement resultType, Value x, Value y_scale, java.util.Optional<Value> y_zero_point, java.util.Optional<Integer> output_dtype, java.util.Optional<Integer> saturate, java.util.Optional<Integer> axis, java.util.Optional<Integer> block_size) {
19569         return new QuantizeLinear(resultType, x, y_scale, y_zero_point, output_dtype, saturate, axis, block_size);
19570     }
19571 
19572     @OpFactory.OpDeclaration(RNN.NAME)
19573     public static final class RNN extends OnnxOp {
19574         public static final String NAME = "RNN";
19575 
19576         public enum Attribute implements OnnxAttribute {
19577             layout(Integer.class, true, 0),
19578             activation_alpha(float[].class, true, null),
19579             hidden_size(Integer.class, true, null),
19580             activation_beta(float[].class, true, null),
19581             activations(String[].class, true, null),
19582             clip(Float.class, true, null),
19583             direction(String.class, true, "forward"),
19584             ;
19585 
19586                 final Class<?> t;
19587                 final boolean optional;
19588                 final Object defaultValue;
19589 
19590                 Attribute(Class<?> type, boolean optional, Object defaultValue) {
19591                     this.t = type;
19592                     this.optional = optional;
19593                     this.defaultValue = defaultValue;
19594                     assert optional || defaultValue == null;
19595                 }
19596 
19597                 public Class<?> type() {
19598                     return t;
19599                 }
19600 
19601                 public boolean isOptional() {
19602                     return optional;
19603                 }
19604 
19605                 public Object defaultValue() {
19606                     return defaultValue;
19607                 }
19608         }
19609 
19610         public enum TypeConstraint implements OnnxTypeConstraint {
19611             T(new OnnxType.TypeVariable("T", List.of(OnnxType.tensor(OnnxType.bfloat16()), OnnxType.tensor(OnnxType.float16()), OnnxType.tensor(OnnxType.float32()), OnnxType.tensor(OnnxType.float64())))),
19612             T1(new OnnxType.TypeVariable("T1", List.of(OnnxType.tensor(OnnxType.int32())))),
19613             ;
19614 
19615             final OnnxType.TypeVariable typeVariable;
19616 
19617             TypeConstraint(OnnxType.TypeVariable typeVariable) {
19618                 assert typeVariable.name().equals(name());
19619                 this.typeVariable = typeVariable;
19620             }
19621 
19622             @Override
19623             public OnnxType.TypeVariable typeVariable() {
19624                 return typeVariable;
19625             }
19626         }
19627 
19628         public enum InputParameter implements OnnxParameter {
19629             X(TypeConstraint.T.typeVariable(), Quantifier.REQUIRED),
19630             W(TypeConstraint.T.typeVariable(), Quantifier.REQUIRED),
19631             R(TypeConstraint.T.typeVariable(), Quantifier.REQUIRED),
19632             B(TypeConstraint.T.typeVariable(), Quantifier.OPTIONAL),
19633             sequence_lens(TypeConstraint.T1.typeVariable(), Quantifier.OPTIONAL),
19634             initial_h(TypeConstraint.T.typeVariable(), Quantifier.OPTIONAL),
19635             ;
19636 
19637             final OnnxType type;
19638             final Quantifier quantifier;
19639 
19640             InputParameter(OnnxType type, Quantifier quantifier) {
19641                 this.type = type;
19642                 this.quantifier = quantifier;
19643             }
19644 
19645             @Override
19646             public OnnxType type() {
19647                 return type;
19648             }
19649 
19650             @Override
19651             public Quantifier quantifier() {
19652                 return quantifier;
19653             }
19654         }
19655 
19656         public enum OutputParameter implements OnnxParameter {
19657             Y(TypeConstraint.T.typeVariable(), Quantifier.OPTIONAL),
19658             Y_h(TypeConstraint.T.typeVariable(), Quantifier.OPTIONAL),
19659             ;
19660 
19661             final OnnxType type;
19662             final Quantifier quantifier;
19663 
19664             OutputParameter(OnnxType type, Quantifier quantifier) {
19665                 this.type = type;
19666                 this.quantifier = quantifier;
19667             }
19668 
19669             @Override
19670             public OnnxType type() {
19671                 return type;
19672             }
19673 
19674             @Override
19675             public Quantifier quantifier() {
19676                 return quantifier;
19677             }
19678         }
19679 
19680         public static final OnnxSchema SCHEMA = new OnnxSchemaRecord(
19681                 NAME,
19682                 List.of(Attribute.values()),
19683                 List.of(TypeConstraint.values()),
19684                 List.of(InputParameter.values()),
19685                 List.of(OutputParameter.values())
19686         );
19687 
19688         public RNN(ExternalizedOp def) {
19689             super(SCHEMA, def);
19690         }
19691 
19692         RNN(RNN that, CopyContext cc) {
19693             super(that, cc);
19694         }
19695 
19696         @Override
19697         public RNN transform(CopyContext cc, OpTransformer ot) {
19698             return new RNN(this, cc);
19699         }
19700 
19701         RNN(TypeElement resultType, Set<OutputParameter> optionalOutputs, Value X, Value W, Value R, java.util.Optional<Value> B, java.util.Optional<Value> sequence_lens, java.util.Optional<Value> initial_h, java.util.Optional<Integer> layout, java.util.Optional<float[]> activation_alpha, java.util.Optional<Integer> hidden_size, java.util.Optional<float[]> activation_beta, java.util.Optional<String[]> activations, java.util.Optional<Float> clip, java.util.Optional<String> direction) {
19702             super(SCHEMA, resultType, optionalOutputs, List.of(X, W, R, B, sequence_lens, initial_h), List.of(layout, activation_alpha, hidden_size, activation_beta, activations, clip, direction));
19703         }
19704 
19705         @Override
19706         public SequencedSet<OnnxParameter> onnxOutputs() {
19707             return onnxOutputs(SCHEMA);
19708         }
19709 
19710         @Override
19711         public SequencedMap<OnnxParameter, Object> onnxInputs() {
19712             return onnxInputs(SCHEMA, List.of(X(), W(), R(), B(), sequence_lens(), initial_h()));
19713         }
19714 
19715         public Value X() {
19716             return operands().get(0);
19717         }
19718 
19719         public Value W() {
19720             return operands().get(1);
19721         }
19722 
19723         public Value R() {
19724             return operands().get(2);
19725         }
19726 
19727         public java.util.Optional<Value> B() {
19728             int i = optionalInputArguments.indexOf(InputParameter.B);
19729             return i != -1 ? java.util.Optional.of(operands().get(3 + i)) : java.util.Optional.empty();
19730         }
19731 
19732         public java.util.Optional<Value> sequence_lens() {
19733             int i = optionalInputArguments.indexOf(InputParameter.sequence_lens);
19734             return i != -1 ? java.util.Optional.of(operands().get(3 + i)) : java.util.Optional.empty();
19735         }
19736 
19737         public java.util.Optional<Value> initial_h() {
19738             int i = optionalInputArguments.indexOf(InputParameter.initial_h);
19739             return i != -1 ? java.util.Optional.of(operands().get(3 + i)) : java.util.Optional.empty();
19740         }
19741 
19742         public java.util.Optional<Integer> layout() {
19743             Integer layout = Attribute.layout.access(Integer.class, onnxAttributes);
19744             return java.util.Optional.ofNullable(layout);
19745         }
19746 
19747         public java.util.Optional<float[]> activation_alpha() {
19748             float[] activation_alpha = Attribute.activation_alpha.access(float[].class, onnxAttributes);
19749             return java.util.Optional.ofNullable(activation_alpha).map(float[]::clone);
19750         }
19751 
19752         public java.util.Optional<Integer> hidden_size() {
19753             Integer hidden_size = Attribute.hidden_size.access(Integer.class, onnxAttributes);
19754             return java.util.Optional.ofNullable(hidden_size);
19755         }
19756 
19757         public java.util.Optional<float[]> activation_beta() {
19758             float[] activation_beta = Attribute.activation_beta.access(float[].class, onnxAttributes);
19759             return java.util.Optional.ofNullable(activation_beta).map(float[]::clone);
19760         }
19761 
19762         public java.util.Optional<String[]> activations() {
19763             String[] activations = Attribute.activations.access(String[].class, onnxAttributes);
19764             return java.util.Optional.ofNullable(activations).map(String[]::clone);
19765         }
19766 
19767         public java.util.Optional<Float> clip() {
19768             Float clip = Attribute.clip.access(Float.class, onnxAttributes);
19769             return java.util.Optional.ofNullable(clip);
19770         }
19771 
19772         public java.util.Optional<String> direction() {
19773             String direction = Attribute.direction.access(String.class, onnxAttributes);
19774             return java.util.Optional.ofNullable(direction);
19775         }
19776 
19777     }
19778 
19779     public static RNN RNN(TypeElement resultType, Set<RNN.OutputParameter> optionalOutputs, Value X, Value W, Value R, java.util.Optional<Value> B, java.util.Optional<Value> sequence_lens, java.util.Optional<Value> initial_h, java.util.Optional<Integer> layout, java.util.Optional<float[]> activation_alpha, java.util.Optional<Integer> hidden_size, java.util.Optional<float[]> activation_beta, java.util.Optional<String[]> activations, java.util.Optional<Float> clip, java.util.Optional<String> direction) {
19780         return new RNN(resultType, optionalOutputs, X, W, R, B, sequence_lens, initial_h, layout, activation_alpha, hidden_size, activation_beta, activations, clip, direction);
19781     }
19782 
19783     @OpFactory.OpDeclaration(RandomNormal.NAME)
19784     public static final class RandomNormal extends OnnxOp {
19785         public static final String NAME = "RandomNormal";
19786 
19787         public enum Attribute implements OnnxAttribute {
19788             shape(int[].class, false, null),
19789             seed(Float.class, true, null),
19790             mean(Float.class, true, 0.0f),
19791             scale(Float.class, true, 1.0f),
19792             dtype(Integer.class, true, 1),
19793             ;
19794 
19795                 final Class<?> t;
19796                 final boolean optional;
19797                 final Object defaultValue;
19798 
19799                 Attribute(Class<?> type, boolean optional, Object defaultValue) {
19800                     this.t = type;
19801                     this.optional = optional;
19802                     this.defaultValue = defaultValue;
19803                     assert optional || defaultValue == null;
19804                 }
19805 
19806                 public Class<?> type() {
19807                     return t;
19808                 }
19809 
19810                 public boolean isOptional() {
19811                     return optional;
19812                 }
19813 
19814                 public Object defaultValue() {
19815                     return defaultValue;
19816                 }
19817         }
19818 
19819         public enum TypeConstraint implements OnnxTypeConstraint {
19820             T(new OnnxType.TypeVariable("T", List.of(OnnxType.tensor(OnnxType.bfloat16()), OnnxType.tensor(OnnxType.float16()), OnnxType.tensor(OnnxType.float32()), OnnxType.tensor(OnnxType.float64())))),
19821             ;
19822 
19823             final OnnxType.TypeVariable typeVariable;
19824 
19825             TypeConstraint(OnnxType.TypeVariable typeVariable) {
19826                 assert typeVariable.name().equals(name());
19827                 this.typeVariable = typeVariable;
19828             }
19829 
19830             @Override
19831             public OnnxType.TypeVariable typeVariable() {
19832                 return typeVariable;
19833             }
19834         }
19835 
19836         public enum InputParameter implements OnnxParameter.None { }
19837 
19838         public enum OutputParameter implements OnnxParameter {
19839             output(TypeConstraint.T.typeVariable(), Quantifier.REQUIRED),
19840             ;
19841 
19842             final OnnxType type;
19843             final Quantifier quantifier;
19844 
19845             OutputParameter(OnnxType type, Quantifier quantifier) {
19846                 this.type = type;
19847                 this.quantifier = quantifier;
19848             }
19849 
19850             @Override
19851             public OnnxType type() {
19852                 return type;
19853             }
19854 
19855             @Override
19856             public Quantifier quantifier() {
19857                 return quantifier;
19858             }
19859         }
19860 
19861         public static final OnnxSchema SCHEMA = new OnnxSchemaRecord(
19862                 NAME,
19863                 List.of(Attribute.values()),
19864                 List.of(TypeConstraint.values()),
19865                 List.of(InputParameter.values()),
19866                 List.of(OutputParameter.values())
19867         );
19868 
19869         public RandomNormal(ExternalizedOp def) {
19870             super(SCHEMA, def);
19871         }
19872 
19873         RandomNormal(RandomNormal that, CopyContext cc) {
19874             super(that, cc);
19875         }
19876 
19877         @Override
19878         public RandomNormal transform(CopyContext cc, OpTransformer ot) {
19879             return new RandomNormal(this, cc);
19880         }
19881 
19882         RandomNormal(TypeElement resultType, int[] shape, java.util.Optional<Float> seed, java.util.Optional<Float> mean, java.util.Optional<Float> scale, java.util.Optional<Integer> dtype) {
19883             super(SCHEMA, resultType, Set.of(), List.of(), List.of(shape, seed, mean, scale, dtype));
19884         }
19885 
19886         @Override
19887         public SequencedSet<OnnxParameter> onnxOutputs() {
19888             return onnxOutputs(SCHEMA);
19889         }
19890 
19891         @Override
19892         public SequencedMap<OnnxParameter, Object> onnxInputs() {
19893             return onnxInputs(SCHEMA, List.of());
19894         }
19895 
19896         public int[] shape() {
19897             int[] shape = Attribute.shape.access(int[].class, onnxAttributes);
19898             return shape.clone();
19899         }
19900 
19901         public java.util.Optional<Float> seed() {
19902             Float seed = Attribute.seed.access(Float.class, onnxAttributes);
19903             return java.util.Optional.ofNullable(seed);
19904         }
19905 
19906         public java.util.Optional<Float> mean() {
19907             Float mean = Attribute.mean.access(Float.class, onnxAttributes);
19908             return java.util.Optional.ofNullable(mean);
19909         }
19910 
19911         public java.util.Optional<Float> scale() {
19912             Float scale = Attribute.scale.access(Float.class, onnxAttributes);
19913             return java.util.Optional.ofNullable(scale);
19914         }
19915 
19916         public java.util.Optional<Integer> dtype() {
19917             Integer dtype = Attribute.dtype.access(Integer.class, onnxAttributes);
19918             return java.util.Optional.ofNullable(dtype);
19919         }
19920 
19921     }
19922 
19923     public static RandomNormal RandomNormal(TypeElement resultType, int[] shape, java.util.Optional<Float> seed, java.util.Optional<Float> mean, java.util.Optional<Float> scale, java.util.Optional<Integer> dtype) {
19924         return new RandomNormal(resultType, shape, seed, mean, scale, dtype);
19925     }
19926 
19927     @OpFactory.OpDeclaration(RandomNormalLike.NAME)
19928     public static final class RandomNormalLike extends OnnxOp {
19929         public static final String NAME = "RandomNormalLike";
19930 
19931         public enum Attribute implements OnnxAttribute {
19932             seed(Float.class, true, null),
19933             mean(Float.class, true, 0.0f),
19934             scale(Float.class, true, 1.0f),
19935             dtype(Integer.class, true, null),
19936             ;
19937 
19938                 final Class<?> t;
19939                 final boolean optional;
19940                 final Object defaultValue;
19941 
19942                 Attribute(Class<?> type, boolean optional, Object defaultValue) {
19943                     this.t = type;
19944                     this.optional = optional;
19945                     this.defaultValue = defaultValue;
19946                     assert optional || defaultValue == null;
19947                 }
19948 
19949                 public Class<?> type() {
19950                     return t;
19951                 }
19952 
19953                 public boolean isOptional() {
19954                     return optional;
19955                 }
19956 
19957                 public Object defaultValue() {
19958                     return defaultValue;
19959                 }
19960         }
19961 
19962         public enum TypeConstraint implements OnnxTypeConstraint {
19963             T1(new OnnxType.TypeVariable("T1", List.of(OnnxType.tensor(OnnxType.uint8()), OnnxType.tensor(OnnxType.uint16()), OnnxType.tensor(OnnxType.uint32()), OnnxType.tensor(OnnxType.uint64()), OnnxType.tensor(OnnxType.int8()), OnnxType.tensor(OnnxType.int16()), OnnxType.tensor(OnnxType.int32()), OnnxType.tensor(OnnxType.int64()), OnnxType.tensor(OnnxType.bfloat16()), OnnxType.tensor(OnnxType.float16()), OnnxType.tensor(OnnxType.float32()), OnnxType.tensor(OnnxType.float64()), OnnxType.tensor(OnnxType.string()), OnnxType.tensor(OnnxType.bool()), OnnxType.tensor(OnnxType.complex64()), OnnxType.tensor(OnnxType.complex128())))),
19964             T2(new OnnxType.TypeVariable("T2", List.of(OnnxType.tensor(OnnxType.bfloat16()), OnnxType.tensor(OnnxType.float16()), OnnxType.tensor(OnnxType.float32()), OnnxType.tensor(OnnxType.float64())))),
19965             ;
19966 
19967             final OnnxType.TypeVariable typeVariable;
19968 
19969             TypeConstraint(OnnxType.TypeVariable typeVariable) {
19970                 assert typeVariable.name().equals(name());
19971                 this.typeVariable = typeVariable;
19972             }
19973 
19974             @Override
19975             public OnnxType.TypeVariable typeVariable() {
19976                 return typeVariable;
19977             }
19978         }
19979 
19980         public enum InputParameter implements OnnxParameter {
19981             input(TypeConstraint.T1.typeVariable(), Quantifier.REQUIRED),
19982             ;
19983 
19984             final OnnxType type;
19985             final Quantifier quantifier;
19986 
19987             InputParameter(OnnxType type, Quantifier quantifier) {
19988                 this.type = type;
19989                 this.quantifier = quantifier;
19990             }
19991 
19992             @Override
19993             public OnnxType type() {
19994                 return type;
19995             }
19996 
19997             @Override
19998             public Quantifier quantifier() {
19999                 return quantifier;
20000             }
20001         }
20002 
20003         public enum OutputParameter implements OnnxParameter {
20004             output(TypeConstraint.T2.typeVariable(), Quantifier.REQUIRED),
20005             ;
20006 
20007             final OnnxType type;
20008             final Quantifier quantifier;
20009 
20010             OutputParameter(OnnxType type, Quantifier quantifier) {
20011                 this.type = type;
20012                 this.quantifier = quantifier;
20013             }
20014 
20015             @Override
20016             public OnnxType type() {
20017                 return type;
20018             }
20019 
20020             @Override
20021             public Quantifier quantifier() {
20022                 return quantifier;
20023             }
20024         }
20025 
20026         public static final OnnxSchema SCHEMA = new OnnxSchemaRecord(
20027                 NAME,
20028                 List.of(Attribute.values()),
20029                 List.of(TypeConstraint.values()),
20030                 List.of(InputParameter.values()),
20031                 List.of(OutputParameter.values())
20032         );
20033 
20034         public RandomNormalLike(ExternalizedOp def) {
20035             super(SCHEMA, def);
20036         }
20037 
20038         RandomNormalLike(RandomNormalLike that, CopyContext cc) {
20039             super(that, cc);
20040         }
20041 
20042         @Override
20043         public RandomNormalLike transform(CopyContext cc, OpTransformer ot) {
20044             return new RandomNormalLike(this, cc);
20045         }
20046 
20047         RandomNormalLike(TypeElement resultType, Value input, java.util.Optional<Float> seed, java.util.Optional<Float> mean, java.util.Optional<Float> scale, java.util.Optional<Integer> dtype) {
20048             super(SCHEMA, resultType, Set.of(), List.of(input), List.of(seed, mean, scale, dtype));
20049         }
20050 
20051         @Override
20052         public SequencedSet<OnnxParameter> onnxOutputs() {
20053             return onnxOutputs(SCHEMA);
20054         }
20055 
20056         @Override
20057         public SequencedMap<OnnxParameter, Object> onnxInputs() {
20058             return onnxInputs(SCHEMA, List.of(input()));
20059         }
20060 
20061         public Value input() {
20062             return operands().get(0);
20063         }
20064 
20065         public java.util.Optional<Float> seed() {
20066             Float seed = Attribute.seed.access(Float.class, onnxAttributes);
20067             return java.util.Optional.ofNullable(seed);
20068         }
20069 
20070         public java.util.Optional<Float> mean() {
20071             Float mean = Attribute.mean.access(Float.class, onnxAttributes);
20072             return java.util.Optional.ofNullable(mean);
20073         }
20074 
20075         public java.util.Optional<Float> scale() {
20076             Float scale = Attribute.scale.access(Float.class, onnxAttributes);
20077             return java.util.Optional.ofNullable(scale);
20078         }
20079 
20080         public java.util.Optional<Integer> dtype() {
20081             Integer dtype = Attribute.dtype.access(Integer.class, onnxAttributes);
20082             return java.util.Optional.ofNullable(dtype);
20083         }
20084 
20085     }
20086 
20087     public static RandomNormalLike RandomNormalLike(TypeElement resultType, Value input, java.util.Optional<Float> seed, java.util.Optional<Float> mean, java.util.Optional<Float> scale, java.util.Optional<Integer> dtype) {
20088         return new RandomNormalLike(resultType, input, seed, mean, scale, dtype);
20089     }
20090 
20091     @OpFactory.OpDeclaration(RandomUniform.NAME)
20092     public static final class RandomUniform extends OnnxOp {
20093         public static final String NAME = "RandomUniform";
20094 
20095         public enum Attribute implements OnnxAttribute {
20096             high(Float.class, true, 1.0f),
20097             shape(int[].class, false, null),
20098             seed(Float.class, true, null),
20099             low(Float.class, true, 0.0f),
20100             dtype(Integer.class, true, 1),
20101             ;
20102 
20103                 final Class<?> t;
20104                 final boolean optional;
20105                 final Object defaultValue;
20106 
20107                 Attribute(Class<?> type, boolean optional, Object defaultValue) {
20108                     this.t = type;
20109                     this.optional = optional;
20110                     this.defaultValue = defaultValue;
20111                     assert optional || defaultValue == null;
20112                 }
20113 
20114                 public Class<?> type() {
20115                     return t;
20116                 }
20117 
20118                 public boolean isOptional() {
20119                     return optional;
20120                 }
20121 
20122                 public Object defaultValue() {
20123                     return defaultValue;
20124                 }
20125         }
20126 
20127         public enum TypeConstraint implements OnnxTypeConstraint {
20128             T(new OnnxType.TypeVariable("T", List.of(OnnxType.tensor(OnnxType.bfloat16()), OnnxType.tensor(OnnxType.float16()), OnnxType.tensor(OnnxType.float32()), OnnxType.tensor(OnnxType.float64())))),
20129             ;
20130 
20131             final OnnxType.TypeVariable typeVariable;
20132 
20133             TypeConstraint(OnnxType.TypeVariable typeVariable) {
20134                 assert typeVariable.name().equals(name());
20135                 this.typeVariable = typeVariable;
20136             }
20137 
20138             @Override
20139             public OnnxType.TypeVariable typeVariable() {
20140                 return typeVariable;
20141             }
20142         }
20143 
20144         public enum InputParameter implements OnnxParameter.None { }
20145 
20146         public enum OutputParameter implements OnnxParameter {
20147             output(TypeConstraint.T.typeVariable(), Quantifier.REQUIRED),
20148             ;
20149 
20150             final OnnxType type;
20151             final Quantifier quantifier;
20152 
20153             OutputParameter(OnnxType type, Quantifier quantifier) {
20154                 this.type = type;
20155                 this.quantifier = quantifier;
20156             }
20157 
20158             @Override
20159             public OnnxType type() {
20160                 return type;
20161             }
20162 
20163             @Override
20164             public Quantifier quantifier() {
20165                 return quantifier;
20166             }
20167         }
20168 
20169         public static final OnnxSchema SCHEMA = new OnnxSchemaRecord(
20170                 NAME,
20171                 List.of(Attribute.values()),
20172                 List.of(TypeConstraint.values()),
20173                 List.of(InputParameter.values()),
20174                 List.of(OutputParameter.values())
20175         );
20176 
20177         public RandomUniform(ExternalizedOp def) {
20178             super(SCHEMA, def);
20179         }
20180 
20181         RandomUniform(RandomUniform that, CopyContext cc) {
20182             super(that, cc);
20183         }
20184 
20185         @Override
20186         public RandomUniform transform(CopyContext cc, OpTransformer ot) {
20187             return new RandomUniform(this, cc);
20188         }
20189 
20190         RandomUniform(TypeElement resultType, java.util.Optional<Float> high, int[] shape, java.util.Optional<Float> seed, java.util.Optional<Float> low, java.util.Optional<Integer> dtype) {
20191             super(SCHEMA, resultType, Set.of(), List.of(), List.of(high, shape, seed, low, dtype));
20192         }
20193 
20194         @Override
20195         public SequencedSet<OnnxParameter> onnxOutputs() {
20196             return onnxOutputs(SCHEMA);
20197         }
20198 
20199         @Override
20200         public SequencedMap<OnnxParameter, Object> onnxInputs() {
20201             return onnxInputs(SCHEMA, List.of());
20202         }
20203 
20204         public java.util.Optional<Float> high() {
20205             Float high = Attribute.high.access(Float.class, onnxAttributes);
20206             return java.util.Optional.ofNullable(high);
20207         }
20208 
20209         public int[] shape() {
20210             int[] shape = Attribute.shape.access(int[].class, onnxAttributes);
20211             return shape.clone();
20212         }
20213 
20214         public java.util.Optional<Float> seed() {
20215             Float seed = Attribute.seed.access(Float.class, onnxAttributes);
20216             return java.util.Optional.ofNullable(seed);
20217         }
20218 
20219         public java.util.Optional<Float> low() {
20220             Float low = Attribute.low.access(Float.class, onnxAttributes);
20221             return java.util.Optional.ofNullable(low);
20222         }
20223 
20224         public java.util.Optional<Integer> dtype() {
20225             Integer dtype = Attribute.dtype.access(Integer.class, onnxAttributes);
20226             return java.util.Optional.ofNullable(dtype);
20227         }
20228 
20229     }
20230 
20231     public static RandomUniform RandomUniform(TypeElement resultType, java.util.Optional<Float> high, int[] shape, java.util.Optional<Float> seed, java.util.Optional<Float> low, java.util.Optional<Integer> dtype) {
20232         return new RandomUniform(resultType, high, shape, seed, low, dtype);
20233     }
20234 
20235     @OpFactory.OpDeclaration(RandomUniformLike.NAME)
20236     public static final class RandomUniformLike extends OnnxOp {
20237         public static final String NAME = "RandomUniformLike";
20238 
20239         public enum Attribute implements OnnxAttribute {
20240             high(Float.class, true, 1.0f),
20241             seed(Float.class, true, null),
20242             low(Float.class, true, 0.0f),
20243             dtype(Integer.class, true, null),
20244             ;
20245 
20246                 final Class<?> t;
20247                 final boolean optional;
20248                 final Object defaultValue;
20249 
20250                 Attribute(Class<?> type, boolean optional, Object defaultValue) {
20251                     this.t = type;
20252                     this.optional = optional;
20253                     this.defaultValue = defaultValue;
20254                     assert optional || defaultValue == null;
20255                 }
20256 
20257                 public Class<?> type() {
20258                     return t;
20259                 }
20260 
20261                 public boolean isOptional() {
20262                     return optional;
20263                 }
20264 
20265                 public Object defaultValue() {
20266                     return defaultValue;
20267                 }
20268         }
20269 
20270         public enum TypeConstraint implements OnnxTypeConstraint {
20271             T1(new OnnxType.TypeVariable("T1", List.of(OnnxType.tensor(OnnxType.uint8()), OnnxType.tensor(OnnxType.uint16()), OnnxType.tensor(OnnxType.uint32()), OnnxType.tensor(OnnxType.uint64()), OnnxType.tensor(OnnxType.int8()), OnnxType.tensor(OnnxType.int16()), OnnxType.tensor(OnnxType.int32()), OnnxType.tensor(OnnxType.int64()), OnnxType.tensor(OnnxType.bfloat16()), OnnxType.tensor(OnnxType.float16()), OnnxType.tensor(OnnxType.float32()), OnnxType.tensor(OnnxType.float64()), OnnxType.tensor(OnnxType.string()), OnnxType.tensor(OnnxType.bool()), OnnxType.tensor(OnnxType.complex64()), OnnxType.tensor(OnnxType.complex128())))),
20272             T2(new OnnxType.TypeVariable("T2", List.of(OnnxType.tensor(OnnxType.bfloat16()), OnnxType.tensor(OnnxType.float16()), OnnxType.tensor(OnnxType.float32()), OnnxType.tensor(OnnxType.float64())))),
20273             ;
20274 
20275             final OnnxType.TypeVariable typeVariable;
20276 
20277             TypeConstraint(OnnxType.TypeVariable typeVariable) {
20278                 assert typeVariable.name().equals(name());
20279                 this.typeVariable = typeVariable;
20280             }
20281 
20282             @Override
20283             public OnnxType.TypeVariable typeVariable() {
20284                 return typeVariable;
20285             }
20286         }
20287 
20288         public enum InputParameter implements OnnxParameter {
20289             input(TypeConstraint.T1.typeVariable(), Quantifier.REQUIRED),
20290             ;
20291 
20292             final OnnxType type;
20293             final Quantifier quantifier;
20294 
20295             InputParameter(OnnxType type, Quantifier quantifier) {
20296                 this.type = type;
20297                 this.quantifier = quantifier;
20298             }
20299 
20300             @Override
20301             public OnnxType type() {
20302                 return type;
20303             }
20304 
20305             @Override
20306             public Quantifier quantifier() {
20307                 return quantifier;
20308             }
20309         }
20310 
20311         public enum OutputParameter implements OnnxParameter {
20312             output(TypeConstraint.T2.typeVariable(), Quantifier.REQUIRED),
20313             ;
20314 
20315             final OnnxType type;
20316             final Quantifier quantifier;
20317 
20318             OutputParameter(OnnxType type, Quantifier quantifier) {
20319                 this.type = type;
20320                 this.quantifier = quantifier;
20321             }
20322 
20323             @Override
20324             public OnnxType type() {
20325                 return type;
20326             }
20327 
20328             @Override
20329             public Quantifier quantifier() {
20330                 return quantifier;
20331             }
20332         }
20333 
20334         public static final OnnxSchema SCHEMA = new OnnxSchemaRecord(
20335                 NAME,
20336                 List.of(Attribute.values()),
20337                 List.of(TypeConstraint.values()),
20338                 List.of(InputParameter.values()),
20339                 List.of(OutputParameter.values())
20340         );
20341 
20342         public RandomUniformLike(ExternalizedOp def) {
20343             super(SCHEMA, def);
20344         }
20345 
20346         RandomUniformLike(RandomUniformLike that, CopyContext cc) {
20347             super(that, cc);
20348         }
20349 
20350         @Override
20351         public RandomUniformLike transform(CopyContext cc, OpTransformer ot) {
20352             return new RandomUniformLike(this, cc);
20353         }
20354 
20355         RandomUniformLike(TypeElement resultType, Value input, java.util.Optional<Float> high, java.util.Optional<Float> seed, java.util.Optional<Float> low, java.util.Optional<Integer> dtype) {
20356             super(SCHEMA, resultType, Set.of(), List.of(input), List.of(high, seed, low, dtype));
20357         }
20358 
20359         @Override
20360         public SequencedSet<OnnxParameter> onnxOutputs() {
20361             return onnxOutputs(SCHEMA);
20362         }
20363 
20364         @Override
20365         public SequencedMap<OnnxParameter, Object> onnxInputs() {
20366             return onnxInputs(SCHEMA, List.of(input()));
20367         }
20368 
20369         public Value input() {
20370             return operands().get(0);
20371         }
20372 
20373         public java.util.Optional<Float> high() {
20374             Float high = Attribute.high.access(Float.class, onnxAttributes);
20375             return java.util.Optional.ofNullable(high);
20376         }
20377 
20378         public java.util.Optional<Float> seed() {
20379             Float seed = Attribute.seed.access(Float.class, onnxAttributes);
20380             return java.util.Optional.ofNullable(seed);
20381         }
20382 
20383         public java.util.Optional<Float> low() {
20384             Float low = Attribute.low.access(Float.class, onnxAttributes);
20385             return java.util.Optional.ofNullable(low);
20386         }
20387 
20388         public java.util.Optional<Integer> dtype() {
20389             Integer dtype = Attribute.dtype.access(Integer.class, onnxAttributes);
20390             return java.util.Optional.ofNullable(dtype);
20391         }
20392 
20393     }
20394 
20395     public static RandomUniformLike RandomUniformLike(TypeElement resultType, Value input, java.util.Optional<Float> high, java.util.Optional<Float> seed, java.util.Optional<Float> low, java.util.Optional<Integer> dtype) {
20396         return new RandomUniformLike(resultType, input, high, seed, low, dtype);
20397     }
20398 
20399     @OpFactory.OpDeclaration(Range.NAME)
20400     public static final class Range extends OnnxOp {
20401         public static final String NAME = "Range";
20402 
20403         public enum Attribute implements OnnxAttribute.None { }
20404 
20405         public enum TypeConstraint implements OnnxTypeConstraint {
20406             T(new OnnxType.TypeVariable("T", List.of(OnnxType.tensor(OnnxType.float32()), OnnxType.tensor(OnnxType.float64()), OnnxType.tensor(OnnxType.int16()), OnnxType.tensor(OnnxType.int32()), OnnxType.tensor(OnnxType.int64())))),
20407             ;
20408 
20409             final OnnxType.TypeVariable typeVariable;
20410 
20411             TypeConstraint(OnnxType.TypeVariable typeVariable) {
20412                 assert typeVariable.name().equals(name());
20413                 this.typeVariable = typeVariable;
20414             }
20415 
20416             @Override
20417             public OnnxType.TypeVariable typeVariable() {
20418                 return typeVariable;
20419             }
20420         }
20421 
20422         public enum InputParameter implements OnnxParameter {
20423             start(TypeConstraint.T.typeVariable(), Quantifier.REQUIRED),
20424             limit(TypeConstraint.T.typeVariable(), Quantifier.REQUIRED),
20425             delta(TypeConstraint.T.typeVariable(), Quantifier.REQUIRED),
20426             ;
20427 
20428             final OnnxType type;
20429             final Quantifier quantifier;
20430 
20431             InputParameter(OnnxType type, Quantifier quantifier) {
20432                 this.type = type;
20433                 this.quantifier = quantifier;
20434             }
20435 
20436             @Override
20437             public OnnxType type() {
20438                 return type;
20439             }
20440 
20441             @Override
20442             public Quantifier quantifier() {
20443                 return quantifier;
20444             }
20445         }
20446 
20447         public enum OutputParameter implements OnnxParameter {
20448             output(TypeConstraint.T.typeVariable(), Quantifier.REQUIRED),
20449             ;
20450 
20451             final OnnxType type;
20452             final Quantifier quantifier;
20453 
20454             OutputParameter(OnnxType type, Quantifier quantifier) {
20455                 this.type = type;
20456                 this.quantifier = quantifier;
20457             }
20458 
20459             @Override
20460             public OnnxType type() {
20461                 return type;
20462             }
20463 
20464             @Override
20465             public Quantifier quantifier() {
20466                 return quantifier;
20467             }
20468         }
20469 
20470         public static final OnnxSchema SCHEMA = new OnnxSchemaRecord(
20471                 NAME,
20472                 List.of(Attribute.values()),
20473                 List.of(TypeConstraint.values()),
20474                 List.of(InputParameter.values()),
20475                 List.of(OutputParameter.values())
20476         );
20477 
20478         public Range(ExternalizedOp def) {
20479             super(SCHEMA, def);
20480         }
20481 
20482         Range(Range that, CopyContext cc) {
20483             super(that, cc);
20484         }
20485 
20486         @Override
20487         public Range transform(CopyContext cc, OpTransformer ot) {
20488             return new Range(this, cc);
20489         }
20490 
20491         Range(TypeElement resultType, Value start, Value limit, Value delta) {
20492             super(SCHEMA, resultType, Set.of(), List.of(start, limit, delta), List.of());
20493         }
20494 
20495         @Override
20496         public SequencedSet<OnnxParameter> onnxOutputs() {
20497             return onnxOutputs(SCHEMA);
20498         }
20499 
20500         @Override
20501         public SequencedMap<OnnxParameter, Object> onnxInputs() {
20502             return onnxInputs(SCHEMA, List.of(start(), limit(), delta()));
20503         }
20504 
20505         public Value start() {
20506             return operands().get(0);
20507         }
20508 
20509         public Value limit() {
20510             return operands().get(1);
20511         }
20512 
20513         public Value delta() {
20514             return operands().get(2);
20515         }
20516 
20517     }
20518 
20519     public static Range Range(TypeElement resultType, Value start, Value limit, Value delta) {
20520         return new Range(resultType, start, limit, delta);
20521     }
20522 
20523     @OpFactory.OpDeclaration(Reciprocal.NAME)
20524     public static final class Reciprocal extends OnnxOp {
20525         public static final String NAME = "Reciprocal";
20526 
20527         public enum Attribute implements OnnxAttribute.None { }
20528 
20529         public enum TypeConstraint implements OnnxTypeConstraint {
20530             T(new OnnxType.TypeVariable("T", List.of(OnnxType.tensor(OnnxType.float16()), OnnxType.tensor(OnnxType.float32()), OnnxType.tensor(OnnxType.float64()), OnnxType.tensor(OnnxType.bfloat16())))),
20531             ;
20532 
20533             final OnnxType.TypeVariable typeVariable;
20534 
20535             TypeConstraint(OnnxType.TypeVariable typeVariable) {
20536                 assert typeVariable.name().equals(name());
20537                 this.typeVariable = typeVariable;
20538             }
20539 
20540             @Override
20541             public OnnxType.TypeVariable typeVariable() {
20542                 return typeVariable;
20543             }
20544         }
20545 
20546         public enum InputParameter implements OnnxParameter {
20547             X(TypeConstraint.T.typeVariable(), Quantifier.REQUIRED),
20548             ;
20549 
20550             final OnnxType type;
20551             final Quantifier quantifier;
20552 
20553             InputParameter(OnnxType type, Quantifier quantifier) {
20554                 this.type = type;
20555                 this.quantifier = quantifier;
20556             }
20557 
20558             @Override
20559             public OnnxType type() {
20560                 return type;
20561             }
20562 
20563             @Override
20564             public Quantifier quantifier() {
20565                 return quantifier;
20566             }
20567         }
20568 
20569         public enum OutputParameter implements OnnxParameter {
20570             Y(TypeConstraint.T.typeVariable(), Quantifier.REQUIRED),
20571             ;
20572 
20573             final OnnxType type;
20574             final Quantifier quantifier;
20575 
20576             OutputParameter(OnnxType type, Quantifier quantifier) {
20577                 this.type = type;
20578                 this.quantifier = quantifier;
20579             }
20580 
20581             @Override
20582             public OnnxType type() {
20583                 return type;
20584             }
20585 
20586             @Override
20587             public Quantifier quantifier() {
20588                 return quantifier;
20589             }
20590         }
20591 
20592         public static final OnnxSchema SCHEMA = new OnnxSchemaRecord(
20593                 NAME,
20594                 List.of(Attribute.values()),
20595                 List.of(TypeConstraint.values()),
20596                 List.of(InputParameter.values()),
20597                 List.of(OutputParameter.values())
20598         );
20599 
20600         public Reciprocal(ExternalizedOp def) {
20601             super(SCHEMA, def);
20602         }
20603 
20604         Reciprocal(Reciprocal that, CopyContext cc) {
20605             super(that, cc);
20606         }
20607 
20608         @Override
20609         public Reciprocal transform(CopyContext cc, OpTransformer ot) {
20610             return new Reciprocal(this, cc);
20611         }
20612 
20613         Reciprocal(TypeElement resultType, Value X) {
20614             super(SCHEMA, resultType, Set.of(), List.of(X), List.of());
20615         }
20616 
20617         @Override
20618         public SequencedSet<OnnxParameter> onnxOutputs() {
20619             return onnxOutputs(SCHEMA);
20620         }
20621 
20622         @Override
20623         public SequencedMap<OnnxParameter, Object> onnxInputs() {
20624             return onnxInputs(SCHEMA, List.of(X()));
20625         }
20626 
20627         public Value X() {
20628             return operands().get(0);
20629         }
20630 
20631     }
20632 
20633     public static Reciprocal Reciprocal(TypeElement resultType, Value X) {
20634         return new Reciprocal(resultType, X);
20635     }
20636 
20637     @OpFactory.OpDeclaration(ReduceL1.NAME)
20638     public static final class ReduceL1 extends OnnxOp {
20639         public static final String NAME = "ReduceL1";
20640 
20641         public enum Attribute implements OnnxAttribute {
20642             noop_with_empty_axes(Integer.class, true, 0),
20643             keepdims(Integer.class, true, 1),
20644             ;
20645 
20646                 final Class<?> t;
20647                 final boolean optional;
20648                 final Object defaultValue;
20649 
20650                 Attribute(Class<?> type, boolean optional, Object defaultValue) {
20651                     this.t = type;
20652                     this.optional = optional;
20653                     this.defaultValue = defaultValue;
20654                     assert optional || defaultValue == null;
20655                 }
20656 
20657                 public Class<?> type() {
20658                     return t;
20659                 }
20660 
20661                 public boolean isOptional() {
20662                     return optional;
20663                 }
20664 
20665                 public Object defaultValue() {
20666                     return defaultValue;
20667                 }
20668         }
20669 
20670         public enum TypeConstraint implements OnnxTypeConstraint {
20671             T(new OnnxType.TypeVariable("T", List.of(OnnxType.tensor(OnnxType.uint32()), OnnxType.tensor(OnnxType.uint64()), OnnxType.tensor(OnnxType.int32()), OnnxType.tensor(OnnxType.int64()), OnnxType.tensor(OnnxType.float16()), OnnxType.tensor(OnnxType.float32()), OnnxType.tensor(OnnxType.float64()), OnnxType.tensor(OnnxType.bfloat16())))),
20672             ;
20673 
20674             final OnnxType.TypeVariable typeVariable;
20675 
20676             TypeConstraint(OnnxType.TypeVariable typeVariable) {
20677                 assert typeVariable.name().equals(name());
20678                 this.typeVariable = typeVariable;
20679             }
20680 
20681             @Override
20682             public OnnxType.TypeVariable typeVariable() {
20683                 return typeVariable;
20684             }
20685         }
20686 
20687         public enum InputParameter implements OnnxParameter {
20688             data(TypeConstraint.T.typeVariable(), Quantifier.REQUIRED),
20689             axes(OnnxType.tensor(OnnxType.int64()), Quantifier.OPTIONAL),
20690             ;
20691 
20692             final OnnxType type;
20693             final Quantifier quantifier;
20694 
20695             InputParameter(OnnxType type, Quantifier quantifier) {
20696                 this.type = type;
20697                 this.quantifier = quantifier;
20698             }
20699 
20700             @Override
20701             public OnnxType type() {
20702                 return type;
20703             }
20704 
20705             @Override
20706             public Quantifier quantifier() {
20707                 return quantifier;
20708             }
20709         }
20710 
20711         public enum OutputParameter implements OnnxParameter {
20712             reduced(TypeConstraint.T.typeVariable(), Quantifier.REQUIRED),
20713             ;
20714 
20715             final OnnxType type;
20716             final Quantifier quantifier;
20717 
20718             OutputParameter(OnnxType type, Quantifier quantifier) {
20719                 this.type = type;
20720                 this.quantifier = quantifier;
20721             }
20722 
20723             @Override
20724             public OnnxType type() {
20725                 return type;
20726             }
20727 
20728             @Override
20729             public Quantifier quantifier() {
20730                 return quantifier;
20731             }
20732         }
20733 
20734         public static final OnnxSchema SCHEMA = new OnnxSchemaRecord(
20735                 NAME,
20736                 List.of(Attribute.values()),
20737                 List.of(TypeConstraint.values()),
20738                 List.of(InputParameter.values()),
20739                 List.of(OutputParameter.values())
20740         );
20741 
20742         public ReduceL1(ExternalizedOp def) {
20743             super(SCHEMA, def);
20744         }
20745 
20746         ReduceL1(ReduceL1 that, CopyContext cc) {
20747             super(that, cc);
20748         }
20749 
20750         @Override
20751         public ReduceL1 transform(CopyContext cc, OpTransformer ot) {
20752             return new ReduceL1(this, cc);
20753         }
20754 
20755         ReduceL1(TypeElement resultType, Value data, java.util.Optional<Value> axes, java.util.Optional<Integer> noop_with_empty_axes, java.util.Optional<Integer> keepdims) {
20756             super(SCHEMA, resultType, Set.of(), List.of(data, axes), List.of(noop_with_empty_axes, keepdims));
20757         }
20758 
20759         @Override
20760         public SequencedSet<OnnxParameter> onnxOutputs() {
20761             return onnxOutputs(SCHEMA);
20762         }
20763 
20764         @Override
20765         public SequencedMap<OnnxParameter, Object> onnxInputs() {
20766             return onnxInputs(SCHEMA, List.of(data(), axes()));
20767         }
20768 
20769         public Value data() {
20770             return operands().get(0);
20771         }
20772 
20773         public java.util.Optional<Value> axes() {
20774             int i = optionalInputArguments.indexOf(InputParameter.axes);
20775             return i != -1 ? java.util.Optional.of(operands().get(1 + i)) : java.util.Optional.empty();
20776         }
20777 
20778         public java.util.Optional<Integer> noop_with_empty_axes() {
20779             Integer noop_with_empty_axes = Attribute.noop_with_empty_axes.access(Integer.class, onnxAttributes);
20780             return java.util.Optional.ofNullable(noop_with_empty_axes);
20781         }
20782 
20783         public java.util.Optional<Integer> keepdims() {
20784             Integer keepdims = Attribute.keepdims.access(Integer.class, onnxAttributes);
20785             return java.util.Optional.ofNullable(keepdims);
20786         }
20787 
20788     }
20789 
20790     public static ReduceL1 ReduceL1(TypeElement resultType, Value data, java.util.Optional<Value> axes, java.util.Optional<Integer> noop_with_empty_axes, java.util.Optional<Integer> keepdims) {
20791         return new ReduceL1(resultType, data, axes, noop_with_empty_axes, keepdims);
20792     }
20793 
20794     @OpFactory.OpDeclaration(ReduceL2.NAME)
20795     public static final class ReduceL2 extends OnnxOp {
20796         public static final String NAME = "ReduceL2";
20797 
20798         public enum Attribute implements OnnxAttribute {
20799             noop_with_empty_axes(Integer.class, true, 0),
20800             keepdims(Integer.class, true, 1),
20801             ;
20802 
20803                 final Class<?> t;
20804                 final boolean optional;
20805                 final Object defaultValue;
20806 
20807                 Attribute(Class<?> type, boolean optional, Object defaultValue) {
20808                     this.t = type;
20809                     this.optional = optional;
20810                     this.defaultValue = defaultValue;
20811                     assert optional || defaultValue == null;
20812                 }
20813 
20814                 public Class<?> type() {
20815                     return t;
20816                 }
20817 
20818                 public boolean isOptional() {
20819                     return optional;
20820                 }
20821 
20822                 public Object defaultValue() {
20823                     return defaultValue;
20824                 }
20825         }
20826 
20827         public enum TypeConstraint implements OnnxTypeConstraint {
20828             T(new OnnxType.TypeVariable("T", List.of(OnnxType.tensor(OnnxType.uint32()), OnnxType.tensor(OnnxType.uint64()), OnnxType.tensor(OnnxType.int32()), OnnxType.tensor(OnnxType.int64()), OnnxType.tensor(OnnxType.float16()), OnnxType.tensor(OnnxType.float32()), OnnxType.tensor(OnnxType.float64()), OnnxType.tensor(OnnxType.bfloat16())))),
20829             ;
20830 
20831             final OnnxType.TypeVariable typeVariable;
20832 
20833             TypeConstraint(OnnxType.TypeVariable typeVariable) {
20834                 assert typeVariable.name().equals(name());
20835                 this.typeVariable = typeVariable;
20836             }
20837 
20838             @Override
20839             public OnnxType.TypeVariable typeVariable() {
20840                 return typeVariable;
20841             }
20842         }
20843 
20844         public enum InputParameter implements OnnxParameter {
20845             data(TypeConstraint.T.typeVariable(), Quantifier.REQUIRED),
20846             axes(OnnxType.tensor(OnnxType.int64()), Quantifier.OPTIONAL),
20847             ;
20848 
20849             final OnnxType type;
20850             final Quantifier quantifier;
20851 
20852             InputParameter(OnnxType type, Quantifier quantifier) {
20853                 this.type = type;
20854                 this.quantifier = quantifier;
20855             }
20856 
20857             @Override
20858             public OnnxType type() {
20859                 return type;
20860             }
20861 
20862             @Override
20863             public Quantifier quantifier() {
20864                 return quantifier;
20865             }
20866         }
20867 
20868         public enum OutputParameter implements OnnxParameter {
20869             reduced(TypeConstraint.T.typeVariable(), Quantifier.REQUIRED),
20870             ;
20871 
20872             final OnnxType type;
20873             final Quantifier quantifier;
20874 
20875             OutputParameter(OnnxType type, Quantifier quantifier) {
20876                 this.type = type;
20877                 this.quantifier = quantifier;
20878             }
20879 
20880             @Override
20881             public OnnxType type() {
20882                 return type;
20883             }
20884 
20885             @Override
20886             public Quantifier quantifier() {
20887                 return quantifier;
20888             }
20889         }
20890 
20891         public static final OnnxSchema SCHEMA = new OnnxSchemaRecord(
20892                 NAME,
20893                 List.of(Attribute.values()),
20894                 List.of(TypeConstraint.values()),
20895                 List.of(InputParameter.values()),
20896                 List.of(OutputParameter.values())
20897         );
20898 
20899         public ReduceL2(ExternalizedOp def) {
20900             super(SCHEMA, def);
20901         }
20902 
20903         ReduceL2(ReduceL2 that, CopyContext cc) {
20904             super(that, cc);
20905         }
20906 
20907         @Override
20908         public ReduceL2 transform(CopyContext cc, OpTransformer ot) {
20909             return new ReduceL2(this, cc);
20910         }
20911 
20912         ReduceL2(TypeElement resultType, Value data, java.util.Optional<Value> axes, java.util.Optional<Integer> noop_with_empty_axes, java.util.Optional<Integer> keepdims) {
20913             super(SCHEMA, resultType, Set.of(), List.of(data, axes), List.of(noop_with_empty_axes, keepdims));
20914         }
20915 
20916         @Override
20917         public SequencedSet<OnnxParameter> onnxOutputs() {
20918             return onnxOutputs(SCHEMA);
20919         }
20920 
20921         @Override
20922         public SequencedMap<OnnxParameter, Object> onnxInputs() {
20923             return onnxInputs(SCHEMA, List.of(data(), axes()));
20924         }
20925 
20926         public Value data() {
20927             return operands().get(0);
20928         }
20929 
20930         public java.util.Optional<Value> axes() {
20931             int i = optionalInputArguments.indexOf(InputParameter.axes);
20932             return i != -1 ? java.util.Optional.of(operands().get(1 + i)) : java.util.Optional.empty();
20933         }
20934 
20935         public java.util.Optional<Integer> noop_with_empty_axes() {
20936             Integer noop_with_empty_axes = Attribute.noop_with_empty_axes.access(Integer.class, onnxAttributes);
20937             return java.util.Optional.ofNullable(noop_with_empty_axes);
20938         }
20939 
20940         public java.util.Optional<Integer> keepdims() {
20941             Integer keepdims = Attribute.keepdims.access(Integer.class, onnxAttributes);
20942             return java.util.Optional.ofNullable(keepdims);
20943         }
20944 
20945     }
20946 
20947     public static ReduceL2 ReduceL2(TypeElement resultType, Value data, java.util.Optional<Value> axes, java.util.Optional<Integer> noop_with_empty_axes, java.util.Optional<Integer> keepdims) {
20948         return new ReduceL2(resultType, data, axes, noop_with_empty_axes, keepdims);
20949     }
20950 
20951     @OpFactory.OpDeclaration(ReduceLogSum.NAME)
20952     public static final class ReduceLogSum extends OnnxOp {
20953         public static final String NAME = "ReduceLogSum";
20954 
20955         public enum Attribute implements OnnxAttribute {
20956             noop_with_empty_axes(Integer.class, true, 0),
20957             keepdims(Integer.class, true, 1),
20958             ;
20959 
20960                 final Class<?> t;
20961                 final boolean optional;
20962                 final Object defaultValue;
20963 
20964                 Attribute(Class<?> type, boolean optional, Object defaultValue) {
20965                     this.t = type;
20966                     this.optional = optional;
20967                     this.defaultValue = defaultValue;
20968                     assert optional || defaultValue == null;
20969                 }
20970 
20971                 public Class<?> type() {
20972                     return t;
20973                 }
20974 
20975                 public boolean isOptional() {
20976                     return optional;
20977                 }
20978 
20979                 public Object defaultValue() {
20980                     return defaultValue;
20981                 }
20982         }
20983 
20984         public enum TypeConstraint implements OnnxTypeConstraint {
20985             T(new OnnxType.TypeVariable("T", List.of(OnnxType.tensor(OnnxType.uint32()), OnnxType.tensor(OnnxType.uint64()), OnnxType.tensor(OnnxType.int32()), OnnxType.tensor(OnnxType.int64()), OnnxType.tensor(OnnxType.float16()), OnnxType.tensor(OnnxType.float32()), OnnxType.tensor(OnnxType.float64()), OnnxType.tensor(OnnxType.bfloat16())))),
20986             ;
20987 
20988             final OnnxType.TypeVariable typeVariable;
20989 
20990             TypeConstraint(OnnxType.TypeVariable typeVariable) {
20991                 assert typeVariable.name().equals(name());
20992                 this.typeVariable = typeVariable;
20993             }
20994 
20995             @Override
20996             public OnnxType.TypeVariable typeVariable() {
20997                 return typeVariable;
20998             }
20999         }
21000 
21001         public enum InputParameter implements OnnxParameter {
21002             data(TypeConstraint.T.typeVariable(), Quantifier.REQUIRED),
21003             axes(OnnxType.tensor(OnnxType.int64()), Quantifier.OPTIONAL),
21004             ;
21005 
21006             final OnnxType type;
21007             final Quantifier quantifier;
21008 
21009             InputParameter(OnnxType type, Quantifier quantifier) {
21010                 this.type = type;
21011                 this.quantifier = quantifier;
21012             }
21013 
21014             @Override
21015             public OnnxType type() {
21016                 return type;
21017             }
21018 
21019             @Override
21020             public Quantifier quantifier() {
21021                 return quantifier;
21022             }
21023         }
21024 
21025         public enum OutputParameter implements OnnxParameter {
21026             reduced(TypeConstraint.T.typeVariable(), Quantifier.REQUIRED),
21027             ;
21028 
21029             final OnnxType type;
21030             final Quantifier quantifier;
21031 
21032             OutputParameter(OnnxType type, Quantifier quantifier) {
21033                 this.type = type;
21034                 this.quantifier = quantifier;
21035             }
21036 
21037             @Override
21038             public OnnxType type() {
21039                 return type;
21040             }
21041 
21042             @Override
21043             public Quantifier quantifier() {
21044                 return quantifier;
21045             }
21046         }
21047 
21048         public static final OnnxSchema SCHEMA = new OnnxSchemaRecord(
21049                 NAME,
21050                 List.of(Attribute.values()),
21051                 List.of(TypeConstraint.values()),
21052                 List.of(InputParameter.values()),
21053                 List.of(OutputParameter.values())
21054         );
21055 
21056         public ReduceLogSum(ExternalizedOp def) {
21057             super(SCHEMA, def);
21058         }
21059 
21060         ReduceLogSum(ReduceLogSum that, CopyContext cc) {
21061             super(that, cc);
21062         }
21063 
21064         @Override
21065         public ReduceLogSum transform(CopyContext cc, OpTransformer ot) {
21066             return new ReduceLogSum(this, cc);
21067         }
21068 
21069         ReduceLogSum(TypeElement resultType, Value data, java.util.Optional<Value> axes, java.util.Optional<Integer> noop_with_empty_axes, java.util.Optional<Integer> keepdims) {
21070             super(SCHEMA, resultType, Set.of(), List.of(data, axes), List.of(noop_with_empty_axes, keepdims));
21071         }
21072 
21073         @Override
21074         public SequencedSet<OnnxParameter> onnxOutputs() {
21075             return onnxOutputs(SCHEMA);
21076         }
21077 
21078         @Override
21079         public SequencedMap<OnnxParameter, Object> onnxInputs() {
21080             return onnxInputs(SCHEMA, List.of(data(), axes()));
21081         }
21082 
21083         public Value data() {
21084             return operands().get(0);
21085         }
21086 
21087         public java.util.Optional<Value> axes() {
21088             int i = optionalInputArguments.indexOf(InputParameter.axes);
21089             return i != -1 ? java.util.Optional.of(operands().get(1 + i)) : java.util.Optional.empty();
21090         }
21091 
21092         public java.util.Optional<Integer> noop_with_empty_axes() {
21093             Integer noop_with_empty_axes = Attribute.noop_with_empty_axes.access(Integer.class, onnxAttributes);
21094             return java.util.Optional.ofNullable(noop_with_empty_axes);
21095         }
21096 
21097         public java.util.Optional<Integer> keepdims() {
21098             Integer keepdims = Attribute.keepdims.access(Integer.class, onnxAttributes);
21099             return java.util.Optional.ofNullable(keepdims);
21100         }
21101 
21102     }
21103 
21104     public static ReduceLogSum ReduceLogSum(TypeElement resultType, Value data, java.util.Optional<Value> axes, java.util.Optional<Integer> noop_with_empty_axes, java.util.Optional<Integer> keepdims) {
21105         return new ReduceLogSum(resultType, data, axes, noop_with_empty_axes, keepdims);
21106     }
21107 
21108     @OpFactory.OpDeclaration(ReduceLogSumExp.NAME)
21109     public static final class ReduceLogSumExp extends OnnxOp {
21110         public static final String NAME = "ReduceLogSumExp";
21111 
21112         public enum Attribute implements OnnxAttribute {
21113             noop_with_empty_axes(Integer.class, true, 0),
21114             keepdims(Integer.class, true, 1),
21115             ;
21116 
21117                 final Class<?> t;
21118                 final boolean optional;
21119                 final Object defaultValue;
21120 
21121                 Attribute(Class<?> type, boolean optional, Object defaultValue) {
21122                     this.t = type;
21123                     this.optional = optional;
21124                     this.defaultValue = defaultValue;
21125                     assert optional || defaultValue == null;
21126                 }
21127 
21128                 public Class<?> type() {
21129                     return t;
21130                 }
21131 
21132                 public boolean isOptional() {
21133                     return optional;
21134                 }
21135 
21136                 public Object defaultValue() {
21137                     return defaultValue;
21138                 }
21139         }
21140 
21141         public enum TypeConstraint implements OnnxTypeConstraint {
21142             T(new OnnxType.TypeVariable("T", List.of(OnnxType.tensor(OnnxType.uint32()), OnnxType.tensor(OnnxType.uint64()), OnnxType.tensor(OnnxType.int32()), OnnxType.tensor(OnnxType.int64()), OnnxType.tensor(OnnxType.float16()), OnnxType.tensor(OnnxType.float32()), OnnxType.tensor(OnnxType.float64()), OnnxType.tensor(OnnxType.bfloat16())))),
21143             ;
21144 
21145             final OnnxType.TypeVariable typeVariable;
21146 
21147             TypeConstraint(OnnxType.TypeVariable typeVariable) {
21148                 assert typeVariable.name().equals(name());
21149                 this.typeVariable = typeVariable;
21150             }
21151 
21152             @Override
21153             public OnnxType.TypeVariable typeVariable() {
21154                 return typeVariable;
21155             }
21156         }
21157 
21158         public enum InputParameter implements OnnxParameter {
21159             data(TypeConstraint.T.typeVariable(), Quantifier.REQUIRED),
21160             axes(OnnxType.tensor(OnnxType.int64()), Quantifier.OPTIONAL),
21161             ;
21162 
21163             final OnnxType type;
21164             final Quantifier quantifier;
21165 
21166             InputParameter(OnnxType type, Quantifier quantifier) {
21167                 this.type = type;
21168                 this.quantifier = quantifier;
21169             }
21170 
21171             @Override
21172             public OnnxType type() {
21173                 return type;
21174             }
21175 
21176             @Override
21177             public Quantifier quantifier() {
21178                 return quantifier;
21179             }
21180         }
21181 
21182         public enum OutputParameter implements OnnxParameter {
21183             reduced(TypeConstraint.T.typeVariable(), Quantifier.REQUIRED),
21184             ;
21185 
21186             final OnnxType type;
21187             final Quantifier quantifier;
21188 
21189             OutputParameter(OnnxType type, Quantifier quantifier) {
21190                 this.type = type;
21191                 this.quantifier = quantifier;
21192             }
21193 
21194             @Override
21195             public OnnxType type() {
21196                 return type;
21197             }
21198 
21199             @Override
21200             public Quantifier quantifier() {
21201                 return quantifier;
21202             }
21203         }
21204 
21205         public static final OnnxSchema SCHEMA = new OnnxSchemaRecord(
21206                 NAME,
21207                 List.of(Attribute.values()),
21208                 List.of(TypeConstraint.values()),
21209                 List.of(InputParameter.values()),
21210                 List.of(OutputParameter.values())
21211         );
21212 
21213         public ReduceLogSumExp(ExternalizedOp def) {
21214             super(SCHEMA, def);
21215         }
21216 
21217         ReduceLogSumExp(ReduceLogSumExp that, CopyContext cc) {
21218             super(that, cc);
21219         }
21220 
21221         @Override
21222         public ReduceLogSumExp transform(CopyContext cc, OpTransformer ot) {
21223             return new ReduceLogSumExp(this, cc);
21224         }
21225 
21226         ReduceLogSumExp(TypeElement resultType, Value data, java.util.Optional<Value> axes, java.util.Optional<Integer> noop_with_empty_axes, java.util.Optional<Integer> keepdims) {
21227             super(SCHEMA, resultType, Set.of(), List.of(data, axes), List.of(noop_with_empty_axes, keepdims));
21228         }
21229 
21230         @Override
21231         public SequencedSet<OnnxParameter> onnxOutputs() {
21232             return onnxOutputs(SCHEMA);
21233         }
21234 
21235         @Override
21236         public SequencedMap<OnnxParameter, Object> onnxInputs() {
21237             return onnxInputs(SCHEMA, List.of(data(), axes()));
21238         }
21239 
21240         public Value data() {
21241             return operands().get(0);
21242         }
21243 
21244         public java.util.Optional<Value> axes() {
21245             int i = optionalInputArguments.indexOf(InputParameter.axes);
21246             return i != -1 ? java.util.Optional.of(operands().get(1 + i)) : java.util.Optional.empty();
21247         }
21248 
21249         public java.util.Optional<Integer> noop_with_empty_axes() {
21250             Integer noop_with_empty_axes = Attribute.noop_with_empty_axes.access(Integer.class, onnxAttributes);
21251             return java.util.Optional.ofNullable(noop_with_empty_axes);
21252         }
21253 
21254         public java.util.Optional<Integer> keepdims() {
21255             Integer keepdims = Attribute.keepdims.access(Integer.class, onnxAttributes);
21256             return java.util.Optional.ofNullable(keepdims);
21257         }
21258 
21259     }
21260 
21261     public static ReduceLogSumExp ReduceLogSumExp(TypeElement resultType, Value data, java.util.Optional<Value> axes, java.util.Optional<Integer> noop_with_empty_axes, java.util.Optional<Integer> keepdims) {
21262         return new ReduceLogSumExp(resultType, data, axes, noop_with_empty_axes, keepdims);
21263     }
21264 
21265     @OpFactory.OpDeclaration(ReduceMax.NAME)
21266     public static final class ReduceMax extends OnnxOp {
21267         public static final String NAME = "ReduceMax";
21268 
21269         public enum Attribute implements OnnxAttribute {
21270             noop_with_empty_axes(Integer.class, true, 0),
21271             keepdims(Integer.class, true, 1),
21272             ;
21273 
21274                 final Class<?> t;
21275                 final boolean optional;
21276                 final Object defaultValue;
21277 
21278                 Attribute(Class<?> type, boolean optional, Object defaultValue) {
21279                     this.t = type;
21280                     this.optional = optional;
21281                     this.defaultValue = defaultValue;
21282                     assert optional || defaultValue == null;
21283                 }
21284 
21285                 public Class<?> type() {
21286                     return t;
21287                 }
21288 
21289                 public boolean isOptional() {
21290                     return optional;
21291                 }
21292 
21293                 public Object defaultValue() {
21294                     return defaultValue;
21295                 }
21296         }
21297 
21298         public enum TypeConstraint implements OnnxTypeConstraint {
21299             T(new OnnxType.TypeVariable("T", List.of(OnnxType.tensor(OnnxType.uint32()), OnnxType.tensor(OnnxType.uint64()), OnnxType.tensor(OnnxType.int32()), OnnxType.tensor(OnnxType.int64()), OnnxType.tensor(OnnxType.float16()), OnnxType.tensor(OnnxType.float32()), OnnxType.tensor(OnnxType.float64()), OnnxType.tensor(OnnxType.bfloat16()), OnnxType.tensor(OnnxType.uint8()), OnnxType.tensor(OnnxType.int8()), OnnxType.tensor(OnnxType.bool())))),
21300             ;
21301 
21302             final OnnxType.TypeVariable typeVariable;
21303 
21304             TypeConstraint(OnnxType.TypeVariable typeVariable) {
21305                 assert typeVariable.name().equals(name());
21306                 this.typeVariable = typeVariable;
21307             }
21308 
21309             @Override
21310             public OnnxType.TypeVariable typeVariable() {
21311                 return typeVariable;
21312             }
21313         }
21314 
21315         public enum InputParameter implements OnnxParameter {
21316             data(TypeConstraint.T.typeVariable(), Quantifier.REQUIRED),
21317             axes(OnnxType.tensor(OnnxType.int64()), Quantifier.OPTIONAL),
21318             ;
21319 
21320             final OnnxType type;
21321             final Quantifier quantifier;
21322 
21323             InputParameter(OnnxType type, Quantifier quantifier) {
21324                 this.type = type;
21325                 this.quantifier = quantifier;
21326             }
21327 
21328             @Override
21329             public OnnxType type() {
21330                 return type;
21331             }
21332 
21333             @Override
21334             public Quantifier quantifier() {
21335                 return quantifier;
21336             }
21337         }
21338 
21339         public enum OutputParameter implements OnnxParameter {
21340             reduced(TypeConstraint.T.typeVariable(), Quantifier.REQUIRED),
21341             ;
21342 
21343             final OnnxType type;
21344             final Quantifier quantifier;
21345 
21346             OutputParameter(OnnxType type, Quantifier quantifier) {
21347                 this.type = type;
21348                 this.quantifier = quantifier;
21349             }
21350 
21351             @Override
21352             public OnnxType type() {
21353                 return type;
21354             }
21355 
21356             @Override
21357             public Quantifier quantifier() {
21358                 return quantifier;
21359             }
21360         }
21361 
21362         public static final OnnxSchema SCHEMA = new OnnxSchemaRecord(
21363                 NAME,
21364                 List.of(Attribute.values()),
21365                 List.of(TypeConstraint.values()),
21366                 List.of(InputParameter.values()),
21367                 List.of(OutputParameter.values())
21368         );
21369 
21370         public ReduceMax(ExternalizedOp def) {
21371             super(SCHEMA, def);
21372         }
21373 
21374         ReduceMax(ReduceMax that, CopyContext cc) {
21375             super(that, cc);
21376         }
21377 
21378         @Override
21379         public ReduceMax transform(CopyContext cc, OpTransformer ot) {
21380             return new ReduceMax(this, cc);
21381         }
21382 
21383         ReduceMax(TypeElement resultType, Value data, java.util.Optional<Value> axes, java.util.Optional<Integer> noop_with_empty_axes, java.util.Optional<Integer> keepdims) {
21384             super(SCHEMA, resultType, Set.of(), List.of(data, axes), List.of(noop_with_empty_axes, keepdims));
21385         }
21386 
21387         @Override
21388         public SequencedSet<OnnxParameter> onnxOutputs() {
21389             return onnxOutputs(SCHEMA);
21390         }
21391 
21392         @Override
21393         public SequencedMap<OnnxParameter, Object> onnxInputs() {
21394             return onnxInputs(SCHEMA, List.of(data(), axes()));
21395         }
21396 
21397         public Value data() {
21398             return operands().get(0);
21399         }
21400 
21401         public java.util.Optional<Value> axes() {
21402             int i = optionalInputArguments.indexOf(InputParameter.axes);
21403             return i != -1 ? java.util.Optional.of(operands().get(1 + i)) : java.util.Optional.empty();
21404         }
21405 
21406         public java.util.Optional<Integer> noop_with_empty_axes() {
21407             Integer noop_with_empty_axes = Attribute.noop_with_empty_axes.access(Integer.class, onnxAttributes);
21408             return java.util.Optional.ofNullable(noop_with_empty_axes);
21409         }
21410 
21411         public java.util.Optional<Integer> keepdims() {
21412             Integer keepdims = Attribute.keepdims.access(Integer.class, onnxAttributes);
21413             return java.util.Optional.ofNullable(keepdims);
21414         }
21415 
21416     }
21417 
21418     public static ReduceMax ReduceMax(TypeElement resultType, Value data, java.util.Optional<Value> axes, java.util.Optional<Integer> noop_with_empty_axes, java.util.Optional<Integer> keepdims) {
21419         return new ReduceMax(resultType, data, axes, noop_with_empty_axes, keepdims);
21420     }
21421 
21422     @OpFactory.OpDeclaration(ReduceMean.NAME)
21423     public static final class ReduceMean extends OnnxOp {
21424         public static final String NAME = "ReduceMean";
21425 
21426         public enum Attribute implements OnnxAttribute {
21427             noop_with_empty_axes(Integer.class, true, 0),
21428             keepdims(Integer.class, true, 1),
21429             ;
21430 
21431                 final Class<?> t;
21432                 final boolean optional;
21433                 final Object defaultValue;
21434 
21435                 Attribute(Class<?> type, boolean optional, Object defaultValue) {
21436                     this.t = type;
21437                     this.optional = optional;
21438                     this.defaultValue = defaultValue;
21439                     assert optional || defaultValue == null;
21440                 }
21441 
21442                 public Class<?> type() {
21443                     return t;
21444                 }
21445 
21446                 public boolean isOptional() {
21447                     return optional;
21448                 }
21449 
21450                 public Object defaultValue() {
21451                     return defaultValue;
21452                 }
21453         }
21454 
21455         public enum TypeConstraint implements OnnxTypeConstraint {
21456             T(new OnnxType.TypeVariable("T", List.of(OnnxType.tensor(OnnxType.uint32()), OnnxType.tensor(OnnxType.uint64()), OnnxType.tensor(OnnxType.int32()), OnnxType.tensor(OnnxType.int64()), OnnxType.tensor(OnnxType.float16()), OnnxType.tensor(OnnxType.float32()), OnnxType.tensor(OnnxType.float64()), OnnxType.tensor(OnnxType.bfloat16())))),
21457             ;
21458 
21459             final OnnxType.TypeVariable typeVariable;
21460 
21461             TypeConstraint(OnnxType.TypeVariable typeVariable) {
21462                 assert typeVariable.name().equals(name());
21463                 this.typeVariable = typeVariable;
21464             }
21465 
21466             @Override
21467             public OnnxType.TypeVariable typeVariable() {
21468                 return typeVariable;
21469             }
21470         }
21471 
21472         public enum InputParameter implements OnnxParameter {
21473             data(TypeConstraint.T.typeVariable(), Quantifier.REQUIRED),
21474             axes(OnnxType.tensor(OnnxType.int64()), Quantifier.OPTIONAL),
21475             ;
21476 
21477             final OnnxType type;
21478             final Quantifier quantifier;
21479 
21480             InputParameter(OnnxType type, Quantifier quantifier) {
21481                 this.type = type;
21482                 this.quantifier = quantifier;
21483             }
21484 
21485             @Override
21486             public OnnxType type() {
21487                 return type;
21488             }
21489 
21490             @Override
21491             public Quantifier quantifier() {
21492                 return quantifier;
21493             }
21494         }
21495 
21496         public enum OutputParameter implements OnnxParameter {
21497             reduced(TypeConstraint.T.typeVariable(), Quantifier.REQUIRED),
21498             ;
21499 
21500             final OnnxType type;
21501             final Quantifier quantifier;
21502 
21503             OutputParameter(OnnxType type, Quantifier quantifier) {
21504                 this.type = type;
21505                 this.quantifier = quantifier;
21506             }
21507 
21508             @Override
21509             public OnnxType type() {
21510                 return type;
21511             }
21512 
21513             @Override
21514             public Quantifier quantifier() {
21515                 return quantifier;
21516             }
21517         }
21518 
21519         public static final OnnxSchema SCHEMA = new OnnxSchemaRecord(
21520                 NAME,
21521                 List.of(Attribute.values()),
21522                 List.of(TypeConstraint.values()),
21523                 List.of(InputParameter.values()),
21524                 List.of(OutputParameter.values())
21525         );
21526 
21527         public ReduceMean(ExternalizedOp def) {
21528             super(SCHEMA, def);
21529         }
21530 
21531         ReduceMean(ReduceMean that, CopyContext cc) {
21532             super(that, cc);
21533         }
21534 
21535         @Override
21536         public ReduceMean transform(CopyContext cc, OpTransformer ot) {
21537             return new ReduceMean(this, cc);
21538         }
21539 
21540         ReduceMean(TypeElement resultType, Value data, java.util.Optional<Value> axes, java.util.Optional<Integer> noop_with_empty_axes, java.util.Optional<Integer> keepdims) {
21541             super(SCHEMA, resultType, Set.of(), List.of(data, axes), List.of(noop_with_empty_axes, keepdims));
21542         }
21543 
21544         @Override
21545         public SequencedSet<OnnxParameter> onnxOutputs() {
21546             return onnxOutputs(SCHEMA);
21547         }
21548 
21549         @Override
21550         public SequencedMap<OnnxParameter, Object> onnxInputs() {
21551             return onnxInputs(SCHEMA, List.of(data(), axes()));
21552         }
21553 
21554         public Value data() {
21555             return operands().get(0);
21556         }
21557 
21558         public java.util.Optional<Value> axes() {
21559             int i = optionalInputArguments.indexOf(InputParameter.axes);
21560             return i != -1 ? java.util.Optional.of(operands().get(1 + i)) : java.util.Optional.empty();
21561         }
21562 
21563         public java.util.Optional<Integer> noop_with_empty_axes() {
21564             Integer noop_with_empty_axes = Attribute.noop_with_empty_axes.access(Integer.class, onnxAttributes);
21565             return java.util.Optional.ofNullable(noop_with_empty_axes);
21566         }
21567 
21568         public java.util.Optional<Integer> keepdims() {
21569             Integer keepdims = Attribute.keepdims.access(Integer.class, onnxAttributes);
21570             return java.util.Optional.ofNullable(keepdims);
21571         }
21572 
21573     }
21574 
21575     public static ReduceMean ReduceMean(TypeElement resultType, Value data, java.util.Optional<Value> axes, java.util.Optional<Integer> noop_with_empty_axes, java.util.Optional<Integer> keepdims) {
21576         return new ReduceMean(resultType, data, axes, noop_with_empty_axes, keepdims);
21577     }
21578 
21579     @OpFactory.OpDeclaration(ReduceMin.NAME)
21580     public static final class ReduceMin extends OnnxOp {
21581         public static final String NAME = "ReduceMin";
21582 
21583         public enum Attribute implements OnnxAttribute {
21584             noop_with_empty_axes(Integer.class, true, 0),
21585             keepdims(Integer.class, true, 1),
21586             ;
21587 
21588                 final Class<?> t;
21589                 final boolean optional;
21590                 final Object defaultValue;
21591 
21592                 Attribute(Class<?> type, boolean optional, Object defaultValue) {
21593                     this.t = type;
21594                     this.optional = optional;
21595                     this.defaultValue = defaultValue;
21596                     assert optional || defaultValue == null;
21597                 }
21598 
21599                 public Class<?> type() {
21600                     return t;
21601                 }
21602 
21603                 public boolean isOptional() {
21604                     return optional;
21605                 }
21606 
21607                 public Object defaultValue() {
21608                     return defaultValue;
21609                 }
21610         }
21611 
21612         public enum TypeConstraint implements OnnxTypeConstraint {
21613             T(new OnnxType.TypeVariable("T", List.of(OnnxType.tensor(OnnxType.uint32()), OnnxType.tensor(OnnxType.uint64()), OnnxType.tensor(OnnxType.int32()), OnnxType.tensor(OnnxType.int64()), OnnxType.tensor(OnnxType.float16()), OnnxType.tensor(OnnxType.float32()), OnnxType.tensor(OnnxType.float64()), OnnxType.tensor(OnnxType.bfloat16()), OnnxType.tensor(OnnxType.uint8()), OnnxType.tensor(OnnxType.int8()), OnnxType.tensor(OnnxType.bool())))),
21614             ;
21615 
21616             final OnnxType.TypeVariable typeVariable;
21617 
21618             TypeConstraint(OnnxType.TypeVariable typeVariable) {
21619                 assert typeVariable.name().equals(name());
21620                 this.typeVariable = typeVariable;
21621             }
21622 
21623             @Override
21624             public OnnxType.TypeVariable typeVariable() {
21625                 return typeVariable;
21626             }
21627         }
21628 
21629         public enum InputParameter implements OnnxParameter {
21630             data(TypeConstraint.T.typeVariable(), Quantifier.REQUIRED),
21631             axes(OnnxType.tensor(OnnxType.int64()), Quantifier.OPTIONAL),
21632             ;
21633 
21634             final OnnxType type;
21635             final Quantifier quantifier;
21636 
21637             InputParameter(OnnxType type, Quantifier quantifier) {
21638                 this.type = type;
21639                 this.quantifier = quantifier;
21640             }
21641 
21642             @Override
21643             public OnnxType type() {
21644                 return type;
21645             }
21646 
21647             @Override
21648             public Quantifier quantifier() {
21649                 return quantifier;
21650             }
21651         }
21652 
21653         public enum OutputParameter implements OnnxParameter {
21654             reduced(TypeConstraint.T.typeVariable(), Quantifier.REQUIRED),
21655             ;
21656 
21657             final OnnxType type;
21658             final Quantifier quantifier;
21659 
21660             OutputParameter(OnnxType type, Quantifier quantifier) {
21661                 this.type = type;
21662                 this.quantifier = quantifier;
21663             }
21664 
21665             @Override
21666             public OnnxType type() {
21667                 return type;
21668             }
21669 
21670             @Override
21671             public Quantifier quantifier() {
21672                 return quantifier;
21673             }
21674         }
21675 
21676         public static final OnnxSchema SCHEMA = new OnnxSchemaRecord(
21677                 NAME,
21678                 List.of(Attribute.values()),
21679                 List.of(TypeConstraint.values()),
21680                 List.of(InputParameter.values()),
21681                 List.of(OutputParameter.values())
21682         );
21683 
21684         public ReduceMin(ExternalizedOp def) {
21685             super(SCHEMA, def);
21686         }
21687 
21688         ReduceMin(ReduceMin that, CopyContext cc) {
21689             super(that, cc);
21690         }
21691 
21692         @Override
21693         public ReduceMin transform(CopyContext cc, OpTransformer ot) {
21694             return new ReduceMin(this, cc);
21695         }
21696 
21697         ReduceMin(TypeElement resultType, Value data, java.util.Optional<Value> axes, java.util.Optional<Integer> noop_with_empty_axes, java.util.Optional<Integer> keepdims) {
21698             super(SCHEMA, resultType, Set.of(), List.of(data, axes), List.of(noop_with_empty_axes, keepdims));
21699         }
21700 
21701         @Override
21702         public SequencedSet<OnnxParameter> onnxOutputs() {
21703             return onnxOutputs(SCHEMA);
21704         }
21705 
21706         @Override
21707         public SequencedMap<OnnxParameter, Object> onnxInputs() {
21708             return onnxInputs(SCHEMA, List.of(data(), axes()));
21709         }
21710 
21711         public Value data() {
21712             return operands().get(0);
21713         }
21714 
21715         public java.util.Optional<Value> axes() {
21716             int i = optionalInputArguments.indexOf(InputParameter.axes);
21717             return i != -1 ? java.util.Optional.of(operands().get(1 + i)) : java.util.Optional.empty();
21718         }
21719 
21720         public java.util.Optional<Integer> noop_with_empty_axes() {
21721             Integer noop_with_empty_axes = Attribute.noop_with_empty_axes.access(Integer.class, onnxAttributes);
21722             return java.util.Optional.ofNullable(noop_with_empty_axes);
21723         }
21724 
21725         public java.util.Optional<Integer> keepdims() {
21726             Integer keepdims = Attribute.keepdims.access(Integer.class, onnxAttributes);
21727             return java.util.Optional.ofNullable(keepdims);
21728         }
21729 
21730     }
21731 
21732     public static ReduceMin ReduceMin(TypeElement resultType, Value data, java.util.Optional<Value> axes, java.util.Optional<Integer> noop_with_empty_axes, java.util.Optional<Integer> keepdims) {
21733         return new ReduceMin(resultType, data, axes, noop_with_empty_axes, keepdims);
21734     }
21735 
21736     @OpFactory.OpDeclaration(ReduceProd.NAME)
21737     public static final class ReduceProd extends OnnxOp {
21738         public static final String NAME = "ReduceProd";
21739 
21740         public enum Attribute implements OnnxAttribute {
21741             noop_with_empty_axes(Integer.class, true, 0),
21742             keepdims(Integer.class, true, 1),
21743             ;
21744 
21745                 final Class<?> t;
21746                 final boolean optional;
21747                 final Object defaultValue;
21748 
21749                 Attribute(Class<?> type, boolean optional, Object defaultValue) {
21750                     this.t = type;
21751                     this.optional = optional;
21752                     this.defaultValue = defaultValue;
21753                     assert optional || defaultValue == null;
21754                 }
21755 
21756                 public Class<?> type() {
21757                     return t;
21758                 }
21759 
21760                 public boolean isOptional() {
21761                     return optional;
21762                 }
21763 
21764                 public Object defaultValue() {
21765                     return defaultValue;
21766                 }
21767         }
21768 
21769         public enum TypeConstraint implements OnnxTypeConstraint {
21770             T(new OnnxType.TypeVariable("T", List.of(OnnxType.tensor(OnnxType.uint32()), OnnxType.tensor(OnnxType.uint64()), OnnxType.tensor(OnnxType.int32()), OnnxType.tensor(OnnxType.int64()), OnnxType.tensor(OnnxType.float16()), OnnxType.tensor(OnnxType.float32()), OnnxType.tensor(OnnxType.float64()), OnnxType.tensor(OnnxType.bfloat16())))),
21771             ;
21772 
21773             final OnnxType.TypeVariable typeVariable;
21774 
21775             TypeConstraint(OnnxType.TypeVariable typeVariable) {
21776                 assert typeVariable.name().equals(name());
21777                 this.typeVariable = typeVariable;
21778             }
21779 
21780             @Override
21781             public OnnxType.TypeVariable typeVariable() {
21782                 return typeVariable;
21783             }
21784         }
21785 
21786         public enum InputParameter implements OnnxParameter {
21787             data(TypeConstraint.T.typeVariable(), Quantifier.REQUIRED),
21788             axes(OnnxType.tensor(OnnxType.int64()), Quantifier.OPTIONAL),
21789             ;
21790 
21791             final OnnxType type;
21792             final Quantifier quantifier;
21793 
21794             InputParameter(OnnxType type, Quantifier quantifier) {
21795                 this.type = type;
21796                 this.quantifier = quantifier;
21797             }
21798 
21799             @Override
21800             public OnnxType type() {
21801                 return type;
21802             }
21803 
21804             @Override
21805             public Quantifier quantifier() {
21806                 return quantifier;
21807             }
21808         }
21809 
21810         public enum OutputParameter implements OnnxParameter {
21811             reduced(TypeConstraint.T.typeVariable(), Quantifier.REQUIRED),
21812             ;
21813 
21814             final OnnxType type;
21815             final Quantifier quantifier;
21816 
21817             OutputParameter(OnnxType type, Quantifier quantifier) {
21818                 this.type = type;
21819                 this.quantifier = quantifier;
21820             }
21821 
21822             @Override
21823             public OnnxType type() {
21824                 return type;
21825             }
21826 
21827             @Override
21828             public Quantifier quantifier() {
21829                 return quantifier;
21830             }
21831         }
21832 
21833         public static final OnnxSchema SCHEMA = new OnnxSchemaRecord(
21834                 NAME,
21835                 List.of(Attribute.values()),
21836                 List.of(TypeConstraint.values()),
21837                 List.of(InputParameter.values()),
21838                 List.of(OutputParameter.values())
21839         );
21840 
21841         public ReduceProd(ExternalizedOp def) {
21842             super(SCHEMA, def);
21843         }
21844 
21845         ReduceProd(ReduceProd that, CopyContext cc) {
21846             super(that, cc);
21847         }
21848 
21849         @Override
21850         public ReduceProd transform(CopyContext cc, OpTransformer ot) {
21851             return new ReduceProd(this, cc);
21852         }
21853 
21854         ReduceProd(TypeElement resultType, Value data, java.util.Optional<Value> axes, java.util.Optional<Integer> noop_with_empty_axes, java.util.Optional<Integer> keepdims) {
21855             super(SCHEMA, resultType, Set.of(), List.of(data, axes), List.of(noop_with_empty_axes, keepdims));
21856         }
21857 
21858         @Override
21859         public SequencedSet<OnnxParameter> onnxOutputs() {
21860             return onnxOutputs(SCHEMA);
21861         }
21862 
21863         @Override
21864         public SequencedMap<OnnxParameter, Object> onnxInputs() {
21865             return onnxInputs(SCHEMA, List.of(data(), axes()));
21866         }
21867 
21868         public Value data() {
21869             return operands().get(0);
21870         }
21871 
21872         public java.util.Optional<Value> axes() {
21873             int i = optionalInputArguments.indexOf(InputParameter.axes);
21874             return i != -1 ? java.util.Optional.of(operands().get(1 + i)) : java.util.Optional.empty();
21875         }
21876 
21877         public java.util.Optional<Integer> noop_with_empty_axes() {
21878             Integer noop_with_empty_axes = Attribute.noop_with_empty_axes.access(Integer.class, onnxAttributes);
21879             return java.util.Optional.ofNullable(noop_with_empty_axes);
21880         }
21881 
21882         public java.util.Optional<Integer> keepdims() {
21883             Integer keepdims = Attribute.keepdims.access(Integer.class, onnxAttributes);
21884             return java.util.Optional.ofNullable(keepdims);
21885         }
21886 
21887     }
21888 
21889     public static ReduceProd ReduceProd(TypeElement resultType, Value data, java.util.Optional<Value> axes, java.util.Optional<Integer> noop_with_empty_axes, java.util.Optional<Integer> keepdims) {
21890         return new ReduceProd(resultType, data, axes, noop_with_empty_axes, keepdims);
21891     }
21892 
21893     @OpFactory.OpDeclaration(ReduceSum.NAME)
21894     public static final class ReduceSum extends OnnxOp {
21895         public static final String NAME = "ReduceSum";
21896 
21897         public enum Attribute implements OnnxAttribute {
21898             noop_with_empty_axes(Integer.class, true, 0),
21899             keepdims(Integer.class, true, 1),
21900             ;
21901 
21902                 final Class<?> t;
21903                 final boolean optional;
21904                 final Object defaultValue;
21905 
21906                 Attribute(Class<?> type, boolean optional, Object defaultValue) {
21907                     this.t = type;
21908                     this.optional = optional;
21909                     this.defaultValue = defaultValue;
21910                     assert optional || defaultValue == null;
21911                 }
21912 
21913                 public Class<?> type() {
21914                     return t;
21915                 }
21916 
21917                 public boolean isOptional() {
21918                     return optional;
21919                 }
21920 
21921                 public Object defaultValue() {
21922                     return defaultValue;
21923                 }
21924         }
21925 
21926         public enum TypeConstraint implements OnnxTypeConstraint {
21927             T(new OnnxType.TypeVariable("T", List.of(OnnxType.tensor(OnnxType.uint32()), OnnxType.tensor(OnnxType.uint64()), OnnxType.tensor(OnnxType.int32()), OnnxType.tensor(OnnxType.int64()), OnnxType.tensor(OnnxType.float16()), OnnxType.tensor(OnnxType.float32()), OnnxType.tensor(OnnxType.float64()), OnnxType.tensor(OnnxType.bfloat16())))),
21928             ;
21929 
21930             final OnnxType.TypeVariable typeVariable;
21931 
21932             TypeConstraint(OnnxType.TypeVariable typeVariable) {
21933                 assert typeVariable.name().equals(name());
21934                 this.typeVariable = typeVariable;
21935             }
21936 
21937             @Override
21938             public OnnxType.TypeVariable typeVariable() {
21939                 return typeVariable;
21940             }
21941         }
21942 
21943         public enum InputParameter implements OnnxParameter {
21944             data(TypeConstraint.T.typeVariable(), Quantifier.REQUIRED),
21945             axes(OnnxType.tensor(OnnxType.int64()), Quantifier.OPTIONAL),
21946             ;
21947 
21948             final OnnxType type;
21949             final Quantifier quantifier;
21950 
21951             InputParameter(OnnxType type, Quantifier quantifier) {
21952                 this.type = type;
21953                 this.quantifier = quantifier;
21954             }
21955 
21956             @Override
21957             public OnnxType type() {
21958                 return type;
21959             }
21960 
21961             @Override
21962             public Quantifier quantifier() {
21963                 return quantifier;
21964             }
21965         }
21966 
21967         public enum OutputParameter implements OnnxParameter {
21968             reduced(TypeConstraint.T.typeVariable(), Quantifier.REQUIRED),
21969             ;
21970 
21971             final OnnxType type;
21972             final Quantifier quantifier;
21973 
21974             OutputParameter(OnnxType type, Quantifier quantifier) {
21975                 this.type = type;
21976                 this.quantifier = quantifier;
21977             }
21978 
21979             @Override
21980             public OnnxType type() {
21981                 return type;
21982             }
21983 
21984             @Override
21985             public Quantifier quantifier() {
21986                 return quantifier;
21987             }
21988         }
21989 
21990         public static final OnnxSchema SCHEMA = new OnnxSchemaRecord(
21991                 NAME,
21992                 List.of(Attribute.values()),
21993                 List.of(TypeConstraint.values()),
21994                 List.of(InputParameter.values()),
21995                 List.of(OutputParameter.values())
21996         );
21997 
21998         public ReduceSum(ExternalizedOp def) {
21999             super(SCHEMA, def);
22000         }
22001 
22002         ReduceSum(ReduceSum that, CopyContext cc) {
22003             super(that, cc);
22004         }
22005 
22006         @Override
22007         public ReduceSum transform(CopyContext cc, OpTransformer ot) {
22008             return new ReduceSum(this, cc);
22009         }
22010 
22011         ReduceSum(TypeElement resultType, Value data, java.util.Optional<Value> axes, java.util.Optional<Integer> noop_with_empty_axes, java.util.Optional<Integer> keepdims) {
22012             super(SCHEMA, resultType, Set.of(), List.of(data, axes), List.of(noop_with_empty_axes, keepdims));
22013         }
22014 
22015         @Override
22016         public SequencedSet<OnnxParameter> onnxOutputs() {
22017             return onnxOutputs(SCHEMA);
22018         }
22019 
22020         @Override
22021         public SequencedMap<OnnxParameter, Object> onnxInputs() {
22022             return onnxInputs(SCHEMA, List.of(data(), axes()));
22023         }
22024 
22025         public Value data() {
22026             return operands().get(0);
22027         }
22028 
22029         public java.util.Optional<Value> axes() {
22030             int i = optionalInputArguments.indexOf(InputParameter.axes);
22031             return i != -1 ? java.util.Optional.of(operands().get(1 + i)) : java.util.Optional.empty();
22032         }
22033 
22034         public java.util.Optional<Integer> noop_with_empty_axes() {
22035             Integer noop_with_empty_axes = Attribute.noop_with_empty_axes.access(Integer.class, onnxAttributes);
22036             return java.util.Optional.ofNullable(noop_with_empty_axes);
22037         }
22038 
22039         public java.util.Optional<Integer> keepdims() {
22040             Integer keepdims = Attribute.keepdims.access(Integer.class, onnxAttributes);
22041             return java.util.Optional.ofNullable(keepdims);
22042         }
22043 
22044     }
22045 
22046     public static ReduceSum ReduceSum(TypeElement resultType, Value data, java.util.Optional<Value> axes, java.util.Optional<Integer> noop_with_empty_axes, java.util.Optional<Integer> keepdims) {
22047         return new ReduceSum(resultType, data, axes, noop_with_empty_axes, keepdims);
22048     }
22049 
22050     @OpFactory.OpDeclaration(ReduceSumSquare.NAME)
22051     public static final class ReduceSumSquare extends OnnxOp {
22052         public static final String NAME = "ReduceSumSquare";
22053 
22054         public enum Attribute implements OnnxAttribute {
22055             noop_with_empty_axes(Integer.class, true, 0),
22056             keepdims(Integer.class, true, 1),
22057             ;
22058 
22059                 final Class<?> t;
22060                 final boolean optional;
22061                 final Object defaultValue;
22062 
22063                 Attribute(Class<?> type, boolean optional, Object defaultValue) {
22064                     this.t = type;
22065                     this.optional = optional;
22066                     this.defaultValue = defaultValue;
22067                     assert optional || defaultValue == null;
22068                 }
22069 
22070                 public Class<?> type() {
22071                     return t;
22072                 }
22073 
22074                 public boolean isOptional() {
22075                     return optional;
22076                 }
22077 
22078                 public Object defaultValue() {
22079                     return defaultValue;
22080                 }
22081         }
22082 
22083         public enum TypeConstraint implements OnnxTypeConstraint {
22084             T(new OnnxType.TypeVariable("T", List.of(OnnxType.tensor(OnnxType.uint32()), OnnxType.tensor(OnnxType.uint64()), OnnxType.tensor(OnnxType.int32()), OnnxType.tensor(OnnxType.int64()), OnnxType.tensor(OnnxType.float16()), OnnxType.tensor(OnnxType.float32()), OnnxType.tensor(OnnxType.float64()), OnnxType.tensor(OnnxType.bfloat16())))),
22085             ;
22086 
22087             final OnnxType.TypeVariable typeVariable;
22088 
22089             TypeConstraint(OnnxType.TypeVariable typeVariable) {
22090                 assert typeVariable.name().equals(name());
22091                 this.typeVariable = typeVariable;
22092             }
22093 
22094             @Override
22095             public OnnxType.TypeVariable typeVariable() {
22096                 return typeVariable;
22097             }
22098         }
22099 
22100         public enum InputParameter implements OnnxParameter {
22101             data(TypeConstraint.T.typeVariable(), Quantifier.REQUIRED),
22102             axes(OnnxType.tensor(OnnxType.int64()), Quantifier.OPTIONAL),
22103             ;
22104 
22105             final OnnxType type;
22106             final Quantifier quantifier;
22107 
22108             InputParameter(OnnxType type, Quantifier quantifier) {
22109                 this.type = type;
22110                 this.quantifier = quantifier;
22111             }
22112 
22113             @Override
22114             public OnnxType type() {
22115                 return type;
22116             }
22117 
22118             @Override
22119             public Quantifier quantifier() {
22120                 return quantifier;
22121             }
22122         }
22123 
22124         public enum OutputParameter implements OnnxParameter {
22125             reduced(TypeConstraint.T.typeVariable(), Quantifier.REQUIRED),
22126             ;
22127 
22128             final OnnxType type;
22129             final Quantifier quantifier;
22130 
22131             OutputParameter(OnnxType type, Quantifier quantifier) {
22132                 this.type = type;
22133                 this.quantifier = quantifier;
22134             }
22135 
22136             @Override
22137             public OnnxType type() {
22138                 return type;
22139             }
22140 
22141             @Override
22142             public Quantifier quantifier() {
22143                 return quantifier;
22144             }
22145         }
22146 
22147         public static final OnnxSchema SCHEMA = new OnnxSchemaRecord(
22148                 NAME,
22149                 List.of(Attribute.values()),
22150                 List.of(TypeConstraint.values()),
22151                 List.of(InputParameter.values()),
22152                 List.of(OutputParameter.values())
22153         );
22154 
22155         public ReduceSumSquare(ExternalizedOp def) {
22156             super(SCHEMA, def);
22157         }
22158 
22159         ReduceSumSquare(ReduceSumSquare that, CopyContext cc) {
22160             super(that, cc);
22161         }
22162 
22163         @Override
22164         public ReduceSumSquare transform(CopyContext cc, OpTransformer ot) {
22165             return new ReduceSumSquare(this, cc);
22166         }
22167 
22168         ReduceSumSquare(TypeElement resultType, Value data, java.util.Optional<Value> axes, java.util.Optional<Integer> noop_with_empty_axes, java.util.Optional<Integer> keepdims) {
22169             super(SCHEMA, resultType, Set.of(), List.of(data, axes), List.of(noop_with_empty_axes, keepdims));
22170         }
22171 
22172         @Override
22173         public SequencedSet<OnnxParameter> onnxOutputs() {
22174             return onnxOutputs(SCHEMA);
22175         }
22176 
22177         @Override
22178         public SequencedMap<OnnxParameter, Object> onnxInputs() {
22179             return onnxInputs(SCHEMA, List.of(data(), axes()));
22180         }
22181 
22182         public Value data() {
22183             return operands().get(0);
22184         }
22185 
22186         public java.util.Optional<Value> axes() {
22187             int i = optionalInputArguments.indexOf(InputParameter.axes);
22188             return i != -1 ? java.util.Optional.of(operands().get(1 + i)) : java.util.Optional.empty();
22189         }
22190 
22191         public java.util.Optional<Integer> noop_with_empty_axes() {
22192             Integer noop_with_empty_axes = Attribute.noop_with_empty_axes.access(Integer.class, onnxAttributes);
22193             return java.util.Optional.ofNullable(noop_with_empty_axes);
22194         }
22195 
22196         public java.util.Optional<Integer> keepdims() {
22197             Integer keepdims = Attribute.keepdims.access(Integer.class, onnxAttributes);
22198             return java.util.Optional.ofNullable(keepdims);
22199         }
22200 
22201     }
22202 
22203     public static ReduceSumSquare ReduceSumSquare(TypeElement resultType, Value data, java.util.Optional<Value> axes, java.util.Optional<Integer> noop_with_empty_axes, java.util.Optional<Integer> keepdims) {
22204         return new ReduceSumSquare(resultType, data, axes, noop_with_empty_axes, keepdims);
22205     }
22206 
22207     @OpFactory.OpDeclaration(RegexFullMatch.NAME)
22208     public static final class RegexFullMatch extends OnnxOp {
22209         public static final String NAME = "RegexFullMatch";
22210 
22211         public enum Attribute implements OnnxAttribute {
22212             pattern(String.class, true, null),
22213             ;
22214 
22215                 final Class<?> t;
22216                 final boolean optional;
22217                 final Object defaultValue;
22218 
22219                 Attribute(Class<?> type, boolean optional, Object defaultValue) {
22220                     this.t = type;
22221                     this.optional = optional;
22222                     this.defaultValue = defaultValue;
22223                     assert optional || defaultValue == null;
22224                 }
22225 
22226                 public Class<?> type() {
22227                     return t;
22228                 }
22229 
22230                 public boolean isOptional() {
22231                     return optional;
22232                 }
22233 
22234                 public Object defaultValue() {
22235                     return defaultValue;
22236                 }
22237         }
22238 
22239         public enum TypeConstraint implements OnnxTypeConstraint {
22240             T1(new OnnxType.TypeVariable("T1", List.of(OnnxType.tensor(OnnxType.string())))),
22241             T2(new OnnxType.TypeVariable("T2", List.of(OnnxType.tensor(OnnxType.bool())))),
22242             ;
22243 
22244             final OnnxType.TypeVariable typeVariable;
22245 
22246             TypeConstraint(OnnxType.TypeVariable typeVariable) {
22247                 assert typeVariable.name().equals(name());
22248                 this.typeVariable = typeVariable;
22249             }
22250 
22251             @Override
22252             public OnnxType.TypeVariable typeVariable() {
22253                 return typeVariable;
22254             }
22255         }
22256 
22257         public enum InputParameter implements OnnxParameter {
22258             X(TypeConstraint.T1.typeVariable(), Quantifier.REQUIRED),
22259             ;
22260 
22261             final OnnxType type;
22262             final Quantifier quantifier;
22263 
22264             InputParameter(OnnxType type, Quantifier quantifier) {
22265                 this.type = type;
22266                 this.quantifier = quantifier;
22267             }
22268 
22269             @Override
22270             public OnnxType type() {
22271                 return type;
22272             }
22273 
22274             @Override
22275             public Quantifier quantifier() {
22276                 return quantifier;
22277             }
22278         }
22279 
22280         public enum OutputParameter implements OnnxParameter {
22281             Y(TypeConstraint.T2.typeVariable(), Quantifier.REQUIRED),
22282             ;
22283 
22284             final OnnxType type;
22285             final Quantifier quantifier;
22286 
22287             OutputParameter(OnnxType type, Quantifier quantifier) {
22288                 this.type = type;
22289                 this.quantifier = quantifier;
22290             }
22291 
22292             @Override
22293             public OnnxType type() {
22294                 return type;
22295             }
22296 
22297             @Override
22298             public Quantifier quantifier() {
22299                 return quantifier;
22300             }
22301         }
22302 
22303         public static final OnnxSchema SCHEMA = new OnnxSchemaRecord(
22304                 NAME,
22305                 List.of(Attribute.values()),
22306                 List.of(TypeConstraint.values()),
22307                 List.of(InputParameter.values()),
22308                 List.of(OutputParameter.values())
22309         );
22310 
22311         public RegexFullMatch(ExternalizedOp def) {
22312             super(SCHEMA, def);
22313         }
22314 
22315         RegexFullMatch(RegexFullMatch that, CopyContext cc) {
22316             super(that, cc);
22317         }
22318 
22319         @Override
22320         public RegexFullMatch transform(CopyContext cc, OpTransformer ot) {
22321             return new RegexFullMatch(this, cc);
22322         }
22323 
22324         RegexFullMatch(TypeElement resultType, Value X, java.util.Optional<String> pattern) {
22325             super(SCHEMA, resultType, Set.of(), List.of(X), List.of(pattern));
22326         }
22327 
22328         @Override
22329         public SequencedSet<OnnxParameter> onnxOutputs() {
22330             return onnxOutputs(SCHEMA);
22331         }
22332 
22333         @Override
22334         public SequencedMap<OnnxParameter, Object> onnxInputs() {
22335             return onnxInputs(SCHEMA, List.of(X()));
22336         }
22337 
22338         public Value X() {
22339             return operands().get(0);
22340         }
22341 
22342         public java.util.Optional<String> pattern() {
22343             String pattern = Attribute.pattern.access(String.class, onnxAttributes);
22344             return java.util.Optional.ofNullable(pattern);
22345         }
22346 
22347     }
22348 
22349     public static RegexFullMatch RegexFullMatch(TypeElement resultType, Value X, java.util.Optional<String> pattern) {
22350         return new RegexFullMatch(resultType, X, pattern);
22351     }
22352 
22353     @OpFactory.OpDeclaration(Relu.NAME)
22354     public static final class Relu extends OnnxOp {
22355         public static final String NAME = "Relu";
22356 
22357         public enum Attribute implements OnnxAttribute.None { }
22358 
22359         public enum TypeConstraint implements OnnxTypeConstraint {
22360             T(new OnnxType.TypeVariable("T", List.of(OnnxType.tensor(OnnxType.float32()), OnnxType.tensor(OnnxType.int32()), OnnxType.tensor(OnnxType.int8()), OnnxType.tensor(OnnxType.int16()), OnnxType.tensor(OnnxType.int64()), OnnxType.tensor(OnnxType.float16()), OnnxType.tensor(OnnxType.float64()), OnnxType.tensor(OnnxType.bfloat16())))),
22361             ;
22362 
22363             final OnnxType.TypeVariable typeVariable;
22364 
22365             TypeConstraint(OnnxType.TypeVariable typeVariable) {
22366                 assert typeVariable.name().equals(name());
22367                 this.typeVariable = typeVariable;
22368             }
22369 
22370             @Override
22371             public OnnxType.TypeVariable typeVariable() {
22372                 return typeVariable;
22373             }
22374         }
22375 
22376         public enum InputParameter implements OnnxParameter {
22377             X(TypeConstraint.T.typeVariable(), Quantifier.REQUIRED),
22378             ;
22379 
22380             final OnnxType type;
22381             final Quantifier quantifier;
22382 
22383             InputParameter(OnnxType type, Quantifier quantifier) {
22384                 this.type = type;
22385                 this.quantifier = quantifier;
22386             }
22387 
22388             @Override
22389             public OnnxType type() {
22390                 return type;
22391             }
22392 
22393             @Override
22394             public Quantifier quantifier() {
22395                 return quantifier;
22396             }
22397         }
22398 
22399         public enum OutputParameter implements OnnxParameter {
22400             Y(TypeConstraint.T.typeVariable(), Quantifier.REQUIRED),
22401             ;
22402 
22403             final OnnxType type;
22404             final Quantifier quantifier;
22405 
22406             OutputParameter(OnnxType type, Quantifier quantifier) {
22407                 this.type = type;
22408                 this.quantifier = quantifier;
22409             }
22410 
22411             @Override
22412             public OnnxType type() {
22413                 return type;
22414             }
22415 
22416             @Override
22417             public Quantifier quantifier() {
22418                 return quantifier;
22419             }
22420         }
22421 
22422         public static final OnnxSchema SCHEMA = new OnnxSchemaRecord(
22423                 NAME,
22424                 List.of(Attribute.values()),
22425                 List.of(TypeConstraint.values()),
22426                 List.of(InputParameter.values()),
22427                 List.of(OutputParameter.values())
22428         );
22429 
22430         public Relu(ExternalizedOp def) {
22431             super(SCHEMA, def);
22432         }
22433 
22434         Relu(Relu that, CopyContext cc) {
22435             super(that, cc);
22436         }
22437 
22438         @Override
22439         public Relu transform(CopyContext cc, OpTransformer ot) {
22440             return new Relu(this, cc);
22441         }
22442 
22443         Relu(TypeElement resultType, Value X) {
22444             super(SCHEMA, resultType, Set.of(), List.of(X), List.of());
22445         }
22446 
22447         @Override
22448         public SequencedSet<OnnxParameter> onnxOutputs() {
22449             return onnxOutputs(SCHEMA);
22450         }
22451 
22452         @Override
22453         public SequencedMap<OnnxParameter, Object> onnxInputs() {
22454             return onnxInputs(SCHEMA, List.of(X()));
22455         }
22456 
22457         public Value X() {
22458             return operands().get(0);
22459         }
22460 
22461     }
22462 
22463     public static Relu Relu(TypeElement resultType, Value X) {
22464         return new Relu(resultType, X);
22465     }
22466 
22467     @OpFactory.OpDeclaration(Reshape.NAME)
22468     public static final class Reshape extends OnnxOp {
22469         public static final String NAME = "Reshape";
22470 
22471         public enum Attribute implements OnnxAttribute {
22472             allowzero(Integer.class, true, 0),
22473             ;
22474 
22475                 final Class<?> t;
22476                 final boolean optional;
22477                 final Object defaultValue;
22478 
22479                 Attribute(Class<?> type, boolean optional, Object defaultValue) {
22480                     this.t = type;
22481                     this.optional = optional;
22482                     this.defaultValue = defaultValue;
22483                     assert optional || defaultValue == null;
22484                 }
22485 
22486                 public Class<?> type() {
22487                     return t;
22488                 }
22489 
22490                 public boolean isOptional() {
22491                     return optional;
22492                 }
22493 
22494                 public Object defaultValue() {
22495                     return defaultValue;
22496                 }
22497         }
22498 
22499         public enum TypeConstraint implements OnnxTypeConstraint {
22500             T(new OnnxType.TypeVariable("T", List.of(OnnxType.tensor(OnnxType.uint8()), OnnxType.tensor(OnnxType.uint16()), OnnxType.tensor(OnnxType.uint32()), OnnxType.tensor(OnnxType.uint64()), OnnxType.tensor(OnnxType.int8()), OnnxType.tensor(OnnxType.int16()), OnnxType.tensor(OnnxType.int32()), OnnxType.tensor(OnnxType.int64()), OnnxType.tensor(OnnxType.bfloat16()), OnnxType.tensor(OnnxType.float16()), OnnxType.tensor(OnnxType.float32()), OnnxType.tensor(OnnxType.float64()), OnnxType.tensor(OnnxType.string()), OnnxType.tensor(OnnxType.bool()), OnnxType.tensor(OnnxType.complex64()), OnnxType.tensor(OnnxType.complex128()), OnnxType.tensor(OnnxType.float8e4m3fn()), OnnxType.tensor(OnnxType.float8e4m3fnuz()), OnnxType.tensor(OnnxType.float8e5m2()), OnnxType.tensor(OnnxType.float8e5m2fnuz()), OnnxType.tensor(OnnxType.uint4()), OnnxType.tensor(OnnxType.int4()), OnnxType.tensor(OnnxType.float4e2m1())))),
22501             ;
22502 
22503             final OnnxType.TypeVariable typeVariable;
22504 
22505             TypeConstraint(OnnxType.TypeVariable typeVariable) {
22506                 assert typeVariable.name().equals(name());
22507                 this.typeVariable = typeVariable;
22508             }
22509 
22510             @Override
22511             public OnnxType.TypeVariable typeVariable() {
22512                 return typeVariable;
22513             }
22514         }
22515 
22516         public enum InputParameter implements OnnxParameter {
22517             data(TypeConstraint.T.typeVariable(), Quantifier.REQUIRED),
22518             shape(OnnxType.tensor(OnnxType.int64()), Quantifier.REQUIRED),
22519             ;
22520 
22521             final OnnxType type;
22522             final Quantifier quantifier;
22523 
22524             InputParameter(OnnxType type, Quantifier quantifier) {
22525                 this.type = type;
22526                 this.quantifier = quantifier;
22527             }
22528 
22529             @Override
22530             public OnnxType type() {
22531                 return type;
22532             }
22533 
22534             @Override
22535             public Quantifier quantifier() {
22536                 return quantifier;
22537             }
22538         }
22539 
22540         public enum OutputParameter implements OnnxParameter {
22541             reshaped(TypeConstraint.T.typeVariable(), Quantifier.REQUIRED),
22542             ;
22543 
22544             final OnnxType type;
22545             final Quantifier quantifier;
22546 
22547             OutputParameter(OnnxType type, Quantifier quantifier) {
22548                 this.type = type;
22549                 this.quantifier = quantifier;
22550             }
22551 
22552             @Override
22553             public OnnxType type() {
22554                 return type;
22555             }
22556 
22557             @Override
22558             public Quantifier quantifier() {
22559                 return quantifier;
22560             }
22561         }
22562 
22563         public static final OnnxSchema SCHEMA = new OnnxSchemaRecord(
22564                 NAME,
22565                 List.of(Attribute.values()),
22566                 List.of(TypeConstraint.values()),
22567                 List.of(InputParameter.values()),
22568                 List.of(OutputParameter.values())
22569         );
22570 
22571         public Reshape(ExternalizedOp def) {
22572             super(SCHEMA, def);
22573         }
22574 
22575         Reshape(Reshape that, CopyContext cc) {
22576             super(that, cc);
22577         }
22578 
22579         @Override
22580         public Reshape transform(CopyContext cc, OpTransformer ot) {
22581             return new Reshape(this, cc);
22582         }
22583 
22584         Reshape(TypeElement resultType, Value data, Value shape, java.util.Optional<Integer> allowzero) {
22585             super(SCHEMA, resultType, Set.of(), List.of(data, shape), List.of(allowzero));
22586         }
22587 
22588         @Override
22589         public SequencedSet<OnnxParameter> onnxOutputs() {
22590             return onnxOutputs(SCHEMA);
22591         }
22592 
22593         @Override
22594         public SequencedMap<OnnxParameter, Object> onnxInputs() {
22595             return onnxInputs(SCHEMA, List.of(data(), shape()));
22596         }
22597 
22598         public Value data() {
22599             return operands().get(0);
22600         }
22601 
22602         public Value shape() {
22603             return operands().get(1);
22604         }
22605 
22606         public java.util.Optional<Integer> allowzero() {
22607             Integer allowzero = Attribute.allowzero.access(Integer.class, onnxAttributes);
22608             return java.util.Optional.ofNullable(allowzero);
22609         }
22610 
22611     }
22612 
22613     public static Reshape Reshape(TypeElement resultType, Value data, Value shape, java.util.Optional<Integer> allowzero) {
22614         return new Reshape(resultType, data, shape, allowzero);
22615     }
22616 
22617     @OpFactory.OpDeclaration(Resize.NAME)
22618     public static final class Resize extends OnnxOp {
22619         public static final String NAME = "Resize";
22620 
22621         public enum Attribute implements OnnxAttribute {
22622             mode(String.class, true, "nearest"),
22623             extrapolation_value(Float.class, true, 0.0f),
22624             nearest_mode(String.class, true, "round_prefer_floor"),
22625             antialias(Integer.class, true, 0),
22626             cubic_coeff_a(Float.class, true, -0.75f),
22627             axes(int[].class, true, null),
22628             coordinate_transformation_mode(String.class, true, "half_pixel"),
22629             keep_aspect_ratio_policy(String.class, true, "stretch"),
22630             exclude_outside(Integer.class, true, 0),
22631             ;
22632 
22633                 final Class<?> t;
22634                 final boolean optional;
22635                 final Object defaultValue;
22636 
22637                 Attribute(Class<?> type, boolean optional, Object defaultValue) {
22638                     this.t = type;
22639                     this.optional = optional;
22640                     this.defaultValue = defaultValue;
22641                     assert optional || defaultValue == null;
22642                 }
22643 
22644                 public Class<?> type() {
22645                     return t;
22646                 }
22647 
22648                 public boolean isOptional() {
22649                     return optional;
22650                 }
22651 
22652                 public Object defaultValue() {
22653                     return defaultValue;
22654                 }
22655         }
22656 
22657         public enum TypeConstraint implements OnnxTypeConstraint {
22658             T1(new OnnxType.TypeVariable("T1", List.of(OnnxType.tensor(OnnxType.uint8()), OnnxType.tensor(OnnxType.uint16()), OnnxType.tensor(OnnxType.uint32()), OnnxType.tensor(OnnxType.uint64()), OnnxType.tensor(OnnxType.int8()), OnnxType.tensor(OnnxType.int16()), OnnxType.tensor(OnnxType.int32()), OnnxType.tensor(OnnxType.int64()), OnnxType.tensor(OnnxType.bfloat16()), OnnxType.tensor(OnnxType.float16()), OnnxType.tensor(OnnxType.float32()), OnnxType.tensor(OnnxType.float64()), OnnxType.tensor(OnnxType.string()), OnnxType.tensor(OnnxType.bool()), OnnxType.tensor(OnnxType.complex64()), OnnxType.tensor(OnnxType.complex128())))),
22659             T2(new OnnxType.TypeVariable("T2", List.of(OnnxType.tensor(OnnxType.float16()), OnnxType.tensor(OnnxType.float32()), OnnxType.tensor(OnnxType.float64())))),
22660             ;
22661 
22662             final OnnxType.TypeVariable typeVariable;
22663 
22664             TypeConstraint(OnnxType.TypeVariable typeVariable) {
22665                 assert typeVariable.name().equals(name());
22666                 this.typeVariable = typeVariable;
22667             }
22668 
22669             @Override
22670             public OnnxType.TypeVariable typeVariable() {
22671                 return typeVariable;
22672             }
22673         }
22674 
22675         public enum InputParameter implements OnnxParameter {
22676             X(TypeConstraint.T1.typeVariable(), Quantifier.REQUIRED),
22677             roi(TypeConstraint.T2.typeVariable(), Quantifier.OPTIONAL),
22678             scales(OnnxType.tensor(OnnxType.float32()), Quantifier.OPTIONAL),
22679             sizes(OnnxType.tensor(OnnxType.int64()), Quantifier.OPTIONAL),
22680             ;
22681 
22682             final OnnxType type;
22683             final Quantifier quantifier;
22684 
22685             InputParameter(OnnxType type, Quantifier quantifier) {
22686                 this.type = type;
22687                 this.quantifier = quantifier;
22688             }
22689 
22690             @Override
22691             public OnnxType type() {
22692                 return type;
22693             }
22694 
22695             @Override
22696             public Quantifier quantifier() {
22697                 return quantifier;
22698             }
22699         }
22700 
22701         public enum OutputParameter implements OnnxParameter {
22702             Y(TypeConstraint.T1.typeVariable(), Quantifier.REQUIRED),
22703             ;
22704 
22705             final OnnxType type;
22706             final Quantifier quantifier;
22707 
22708             OutputParameter(OnnxType type, Quantifier quantifier) {
22709                 this.type = type;
22710                 this.quantifier = quantifier;
22711             }
22712 
22713             @Override
22714             public OnnxType type() {
22715                 return type;
22716             }
22717 
22718             @Override
22719             public Quantifier quantifier() {
22720                 return quantifier;
22721             }
22722         }
22723 
22724         public static final OnnxSchema SCHEMA = new OnnxSchemaRecord(
22725                 NAME,
22726                 List.of(Attribute.values()),
22727                 List.of(TypeConstraint.values()),
22728                 List.of(InputParameter.values()),
22729                 List.of(OutputParameter.values())
22730         );
22731 
22732         public Resize(ExternalizedOp def) {
22733             super(SCHEMA, def);
22734         }
22735 
22736         Resize(Resize that, CopyContext cc) {
22737             super(that, cc);
22738         }
22739 
22740         @Override
22741         public Resize transform(CopyContext cc, OpTransformer ot) {
22742             return new Resize(this, cc);
22743         }
22744 
22745         Resize(TypeElement resultType, Value X, java.util.Optional<Value> roi, java.util.Optional<Value> scales, java.util.Optional<Value> sizes, java.util.Optional<String> mode, java.util.Optional<Float> extrapolation_value, java.util.Optional<String> nearest_mode, java.util.Optional<Integer> antialias, java.util.Optional<Float> cubic_coeff_a, java.util.Optional<int[]> axes, java.util.Optional<String> coordinate_transformation_mode, java.util.Optional<String> keep_aspect_ratio_policy, java.util.Optional<Integer> exclude_outside) {
22746             super(SCHEMA, resultType, Set.of(), List.of(X, roi, scales, sizes), List.of(mode, extrapolation_value, nearest_mode, antialias, cubic_coeff_a, axes, coordinate_transformation_mode, keep_aspect_ratio_policy, exclude_outside));
22747         }
22748 
22749         @Override
22750         public SequencedSet<OnnxParameter> onnxOutputs() {
22751             return onnxOutputs(SCHEMA);
22752         }
22753 
22754         @Override
22755         public SequencedMap<OnnxParameter, Object> onnxInputs() {
22756             return onnxInputs(SCHEMA, List.of(X(), roi(), scales(), sizes()));
22757         }
22758 
22759         public Value X() {
22760             return operands().get(0);
22761         }
22762 
22763         public java.util.Optional<Value> roi() {
22764             int i = optionalInputArguments.indexOf(InputParameter.roi);
22765             return i != -1 ? java.util.Optional.of(operands().get(1 + i)) : java.util.Optional.empty();
22766         }
22767 
22768         public java.util.Optional<Value> scales() {
22769             int i = optionalInputArguments.indexOf(InputParameter.scales);
22770             return i != -1 ? java.util.Optional.of(operands().get(1 + i)) : java.util.Optional.empty();
22771         }
22772 
22773         public java.util.Optional<Value> sizes() {
22774             int i = optionalInputArguments.indexOf(InputParameter.sizes);
22775             return i != -1 ? java.util.Optional.of(operands().get(1 + i)) : java.util.Optional.empty();
22776         }
22777 
22778         public java.util.Optional<String> mode() {
22779             String mode = Attribute.mode.access(String.class, onnxAttributes);
22780             return java.util.Optional.ofNullable(mode);
22781         }
22782 
22783         public java.util.Optional<Float> extrapolation_value() {
22784             Float extrapolation_value = Attribute.extrapolation_value.access(Float.class, onnxAttributes);
22785             return java.util.Optional.ofNullable(extrapolation_value);
22786         }
22787 
22788         public java.util.Optional<String> nearest_mode() {
22789             String nearest_mode = Attribute.nearest_mode.access(String.class, onnxAttributes);
22790             return java.util.Optional.ofNullable(nearest_mode);
22791         }
22792 
22793         public java.util.Optional<Integer> antialias() {
22794             Integer antialias = Attribute.antialias.access(Integer.class, onnxAttributes);
22795             return java.util.Optional.ofNullable(antialias);
22796         }
22797 
22798         public java.util.Optional<Float> cubic_coeff_a() {
22799             Float cubic_coeff_a = Attribute.cubic_coeff_a.access(Float.class, onnxAttributes);
22800             return java.util.Optional.ofNullable(cubic_coeff_a);
22801         }
22802 
22803         public java.util.Optional<int[]> axes() {
22804             int[] axes = Attribute.axes.access(int[].class, onnxAttributes);
22805             return java.util.Optional.ofNullable(axes).map(int[]::clone);
22806         }
22807 
22808         public java.util.Optional<String> coordinate_transformation_mode() {
22809             String coordinate_transformation_mode = Attribute.coordinate_transformation_mode.access(String.class, onnxAttributes);
22810             return java.util.Optional.ofNullable(coordinate_transformation_mode);
22811         }
22812 
22813         public java.util.Optional<String> keep_aspect_ratio_policy() {
22814             String keep_aspect_ratio_policy = Attribute.keep_aspect_ratio_policy.access(String.class, onnxAttributes);
22815             return java.util.Optional.ofNullable(keep_aspect_ratio_policy);
22816         }
22817 
22818         public java.util.Optional<Integer> exclude_outside() {
22819             Integer exclude_outside = Attribute.exclude_outside.access(Integer.class, onnxAttributes);
22820             return java.util.Optional.ofNullable(exclude_outside);
22821         }
22822 
22823     }
22824 
22825     public static Resize Resize(TypeElement resultType, Value X, java.util.Optional<Value> roi, java.util.Optional<Value> scales, java.util.Optional<Value> sizes, java.util.Optional<String> mode, java.util.Optional<Float> extrapolation_value, java.util.Optional<String> nearest_mode, java.util.Optional<Integer> antialias, java.util.Optional<Float> cubic_coeff_a, java.util.Optional<int[]> axes, java.util.Optional<String> coordinate_transformation_mode, java.util.Optional<String> keep_aspect_ratio_policy, java.util.Optional<Integer> exclude_outside) {
22826         return new Resize(resultType, X, roi, scales, sizes, mode, extrapolation_value, nearest_mode, antialias, cubic_coeff_a, axes, coordinate_transformation_mode, keep_aspect_ratio_policy, exclude_outside);
22827     }
22828 
22829     @OpFactory.OpDeclaration(ReverseSequence.NAME)
22830     public static final class ReverseSequence extends OnnxOp {
22831         public static final String NAME = "ReverseSequence";
22832 
22833         public enum Attribute implements OnnxAttribute {
22834             time_axis(Integer.class, true, 0),
22835             batch_axis(Integer.class, true, 1),
22836             ;
22837 
22838                 final Class<?> t;
22839                 final boolean optional;
22840                 final Object defaultValue;
22841 
22842                 Attribute(Class<?> type, boolean optional, Object defaultValue) {
22843                     this.t = type;
22844                     this.optional = optional;
22845                     this.defaultValue = defaultValue;
22846                     assert optional || defaultValue == null;
22847                 }
22848 
22849                 public Class<?> type() {
22850                     return t;
22851                 }
22852 
22853                 public boolean isOptional() {
22854                     return optional;
22855                 }
22856 
22857                 public Object defaultValue() {
22858                     return defaultValue;
22859                 }
22860         }
22861 
22862         public enum TypeConstraint implements OnnxTypeConstraint {
22863             T(new OnnxType.TypeVariable("T", List.of(OnnxType.tensor(OnnxType.uint8()), OnnxType.tensor(OnnxType.uint16()), OnnxType.tensor(OnnxType.uint32()), OnnxType.tensor(OnnxType.uint64()), OnnxType.tensor(OnnxType.int8()), OnnxType.tensor(OnnxType.int16()), OnnxType.tensor(OnnxType.int32()), OnnxType.tensor(OnnxType.int64()), OnnxType.tensor(OnnxType.float16()), OnnxType.tensor(OnnxType.float32()), OnnxType.tensor(OnnxType.float64()), OnnxType.tensor(OnnxType.string()), OnnxType.tensor(OnnxType.bool()), OnnxType.tensor(OnnxType.complex64()), OnnxType.tensor(OnnxType.complex128())))),
22864             ;
22865 
22866             final OnnxType.TypeVariable typeVariable;
22867 
22868             TypeConstraint(OnnxType.TypeVariable typeVariable) {
22869                 assert typeVariable.name().equals(name());
22870                 this.typeVariable = typeVariable;
22871             }
22872 
22873             @Override
22874             public OnnxType.TypeVariable typeVariable() {
22875                 return typeVariable;
22876             }
22877         }
22878 
22879         public enum InputParameter implements OnnxParameter {
22880             input(TypeConstraint.T.typeVariable(), Quantifier.REQUIRED),
22881             sequence_lens(OnnxType.tensor(OnnxType.int64()), Quantifier.REQUIRED),
22882             ;
22883 
22884             final OnnxType type;
22885             final Quantifier quantifier;
22886 
22887             InputParameter(OnnxType type, Quantifier quantifier) {
22888                 this.type = type;
22889                 this.quantifier = quantifier;
22890             }
22891 
22892             @Override
22893             public OnnxType type() {
22894                 return type;
22895             }
22896 
22897             @Override
22898             public Quantifier quantifier() {
22899                 return quantifier;
22900             }
22901         }
22902 
22903         public enum OutputParameter implements OnnxParameter {
22904             Y(TypeConstraint.T.typeVariable(), Quantifier.REQUIRED),
22905             ;
22906 
22907             final OnnxType type;
22908             final Quantifier quantifier;
22909 
22910             OutputParameter(OnnxType type, Quantifier quantifier) {
22911                 this.type = type;
22912                 this.quantifier = quantifier;
22913             }
22914 
22915             @Override
22916             public OnnxType type() {
22917                 return type;
22918             }
22919 
22920             @Override
22921             public Quantifier quantifier() {
22922                 return quantifier;
22923             }
22924         }
22925 
22926         public static final OnnxSchema SCHEMA = new OnnxSchemaRecord(
22927                 NAME,
22928                 List.of(Attribute.values()),
22929                 List.of(TypeConstraint.values()),
22930                 List.of(InputParameter.values()),
22931                 List.of(OutputParameter.values())
22932         );
22933 
22934         public ReverseSequence(ExternalizedOp def) {
22935             super(SCHEMA, def);
22936         }
22937 
22938         ReverseSequence(ReverseSequence that, CopyContext cc) {
22939             super(that, cc);
22940         }
22941 
22942         @Override
22943         public ReverseSequence transform(CopyContext cc, OpTransformer ot) {
22944             return new ReverseSequence(this, cc);
22945         }
22946 
22947         ReverseSequence(TypeElement resultType, Value input, Value sequence_lens, java.util.Optional<Integer> time_axis, java.util.Optional<Integer> batch_axis) {
22948             super(SCHEMA, resultType, Set.of(), List.of(input, sequence_lens), List.of(time_axis, batch_axis));
22949         }
22950 
22951         @Override
22952         public SequencedSet<OnnxParameter> onnxOutputs() {
22953             return onnxOutputs(SCHEMA);
22954         }
22955 
22956         @Override
22957         public SequencedMap<OnnxParameter, Object> onnxInputs() {
22958             return onnxInputs(SCHEMA, List.of(input(), sequence_lens()));
22959         }
22960 
22961         public Value input() {
22962             return operands().get(0);
22963         }
22964 
22965         public Value sequence_lens() {
22966             return operands().get(1);
22967         }
22968 
22969         public java.util.Optional<Integer> time_axis() {
22970             Integer time_axis = Attribute.time_axis.access(Integer.class, onnxAttributes);
22971             return java.util.Optional.ofNullable(time_axis);
22972         }
22973 
22974         public java.util.Optional<Integer> batch_axis() {
22975             Integer batch_axis = Attribute.batch_axis.access(Integer.class, onnxAttributes);
22976             return java.util.Optional.ofNullable(batch_axis);
22977         }
22978 
22979     }
22980 
22981     public static ReverseSequence ReverseSequence(TypeElement resultType, Value input, Value sequence_lens, java.util.Optional<Integer> time_axis, java.util.Optional<Integer> batch_axis) {
22982         return new ReverseSequence(resultType, input, sequence_lens, time_axis, batch_axis);
22983     }
22984 
22985     @OpFactory.OpDeclaration(RoiAlign.NAME)
22986     public static final class RoiAlign extends OnnxOp {
22987         public static final String NAME = "RoiAlign";
22988 
22989         public enum Attribute implements OnnxAttribute {
22990             mode(String.class, true, "avg"),
22991             output_width(Integer.class, true, 1),
22992             spatial_scale(Float.class, true, 1.0f),
22993             coordinate_transformation_mode(String.class, true, "half_pixel"),
22994             sampling_ratio(Integer.class, true, 0),
22995             output_height(Integer.class, true, 1),
22996             ;
22997 
22998                 final Class<?> t;
22999                 final boolean optional;
23000                 final Object defaultValue;
23001 
23002                 Attribute(Class<?> type, boolean optional, Object defaultValue) {
23003                     this.t = type;
23004                     this.optional = optional;
23005                     this.defaultValue = defaultValue;
23006                     assert optional || defaultValue == null;
23007                 }
23008 
23009                 public Class<?> type() {
23010                     return t;
23011                 }
23012 
23013                 public boolean isOptional() {
23014                     return optional;
23015                 }
23016 
23017                 public Object defaultValue() {
23018                     return defaultValue;
23019                 }
23020         }
23021 
23022         public enum TypeConstraint implements OnnxTypeConstraint {
23023             T1(new OnnxType.TypeVariable("T1", List.of(OnnxType.tensor(OnnxType.bfloat16()), OnnxType.tensor(OnnxType.float16()), OnnxType.tensor(OnnxType.float32()), OnnxType.tensor(OnnxType.float64())))),
23024             T2(new OnnxType.TypeVariable("T2", List.of(OnnxType.tensor(OnnxType.int64())))),
23025             ;
23026 
23027             final OnnxType.TypeVariable typeVariable;
23028 
23029             TypeConstraint(OnnxType.TypeVariable typeVariable) {
23030                 assert typeVariable.name().equals(name());
23031                 this.typeVariable = typeVariable;
23032             }
23033 
23034             @Override
23035             public OnnxType.TypeVariable typeVariable() {
23036                 return typeVariable;
23037             }
23038         }
23039 
23040         public enum InputParameter implements OnnxParameter {
23041             X(TypeConstraint.T1.typeVariable(), Quantifier.REQUIRED),
23042             rois(TypeConstraint.T1.typeVariable(), Quantifier.REQUIRED),
23043             batch_indices(TypeConstraint.T2.typeVariable(), Quantifier.REQUIRED),
23044             ;
23045 
23046             final OnnxType type;
23047             final Quantifier quantifier;
23048 
23049             InputParameter(OnnxType type, Quantifier quantifier) {
23050                 this.type = type;
23051                 this.quantifier = quantifier;
23052             }
23053 
23054             @Override
23055             public OnnxType type() {
23056                 return type;
23057             }
23058 
23059             @Override
23060             public Quantifier quantifier() {
23061                 return quantifier;
23062             }
23063         }
23064 
23065         public enum OutputParameter implements OnnxParameter {
23066             Y(TypeConstraint.T1.typeVariable(), Quantifier.REQUIRED),
23067             ;
23068 
23069             final OnnxType type;
23070             final Quantifier quantifier;
23071 
23072             OutputParameter(OnnxType type, Quantifier quantifier) {
23073                 this.type = type;
23074                 this.quantifier = quantifier;
23075             }
23076 
23077             @Override
23078             public OnnxType type() {
23079                 return type;
23080             }
23081 
23082             @Override
23083             public Quantifier quantifier() {
23084                 return quantifier;
23085             }
23086         }
23087 
23088         public static final OnnxSchema SCHEMA = new OnnxSchemaRecord(
23089                 NAME,
23090                 List.of(Attribute.values()),
23091                 List.of(TypeConstraint.values()),
23092                 List.of(InputParameter.values()),
23093                 List.of(OutputParameter.values())
23094         );
23095 
23096         public RoiAlign(ExternalizedOp def) {
23097             super(SCHEMA, def);
23098         }
23099 
23100         RoiAlign(RoiAlign that, CopyContext cc) {
23101             super(that, cc);
23102         }
23103 
23104         @Override
23105         public RoiAlign transform(CopyContext cc, OpTransformer ot) {
23106             return new RoiAlign(this, cc);
23107         }
23108 
23109         RoiAlign(TypeElement resultType, Value X, Value rois, Value batch_indices, java.util.Optional<String> mode, java.util.Optional<Integer> output_width, java.util.Optional<Float> spatial_scale, java.util.Optional<String> coordinate_transformation_mode, java.util.Optional<Integer> sampling_ratio, java.util.Optional<Integer> output_height) {
23110             super(SCHEMA, resultType, Set.of(), List.of(X, rois, batch_indices), List.of(mode, output_width, spatial_scale, coordinate_transformation_mode, sampling_ratio, output_height));
23111         }
23112 
23113         @Override
23114         public SequencedSet<OnnxParameter> onnxOutputs() {
23115             return onnxOutputs(SCHEMA);
23116         }
23117 
23118         @Override
23119         public SequencedMap<OnnxParameter, Object> onnxInputs() {
23120             return onnxInputs(SCHEMA, List.of(X(), rois(), batch_indices()));
23121         }
23122 
23123         public Value X() {
23124             return operands().get(0);
23125         }
23126 
23127         public Value rois() {
23128             return operands().get(1);
23129         }
23130 
23131         public Value batch_indices() {
23132             return operands().get(2);
23133         }
23134 
23135         public java.util.Optional<String> mode() {
23136             String mode = Attribute.mode.access(String.class, onnxAttributes);
23137             return java.util.Optional.ofNullable(mode);
23138         }
23139 
23140         public java.util.Optional<Integer> output_width() {
23141             Integer output_width = Attribute.output_width.access(Integer.class, onnxAttributes);
23142             return java.util.Optional.ofNullable(output_width);
23143         }
23144 
23145         public java.util.Optional<Float> spatial_scale() {
23146             Float spatial_scale = Attribute.spatial_scale.access(Float.class, onnxAttributes);
23147             return java.util.Optional.ofNullable(spatial_scale);
23148         }
23149 
23150         public java.util.Optional<String> coordinate_transformation_mode() {
23151             String coordinate_transformation_mode = Attribute.coordinate_transformation_mode.access(String.class, onnxAttributes);
23152             return java.util.Optional.ofNullable(coordinate_transformation_mode);
23153         }
23154 
23155         public java.util.Optional<Integer> sampling_ratio() {
23156             Integer sampling_ratio = Attribute.sampling_ratio.access(Integer.class, onnxAttributes);
23157             return java.util.Optional.ofNullable(sampling_ratio);
23158         }
23159 
23160         public java.util.Optional<Integer> output_height() {
23161             Integer output_height = Attribute.output_height.access(Integer.class, onnxAttributes);
23162             return java.util.Optional.ofNullable(output_height);
23163         }
23164 
23165     }
23166 
23167     public static RoiAlign RoiAlign(TypeElement resultType, Value X, Value rois, Value batch_indices, java.util.Optional<String> mode, java.util.Optional<Integer> output_width, java.util.Optional<Float> spatial_scale, java.util.Optional<String> coordinate_transformation_mode, java.util.Optional<Integer> sampling_ratio, java.util.Optional<Integer> output_height) {
23168         return new RoiAlign(resultType, X, rois, batch_indices, mode, output_width, spatial_scale, coordinate_transformation_mode, sampling_ratio, output_height);
23169     }
23170 
23171     @OpFactory.OpDeclaration(Round.NAME)
23172     public static final class Round extends OnnxOp {
23173         public static final String NAME = "Round";
23174 
23175         public enum Attribute implements OnnxAttribute.None { }
23176 
23177         public enum TypeConstraint implements OnnxTypeConstraint {
23178             T(new OnnxType.TypeVariable("T", List.of(OnnxType.tensor(OnnxType.bfloat16()), OnnxType.tensor(OnnxType.float16()), OnnxType.tensor(OnnxType.float32()), OnnxType.tensor(OnnxType.float64())))),
23179             ;
23180 
23181             final OnnxType.TypeVariable typeVariable;
23182 
23183             TypeConstraint(OnnxType.TypeVariable typeVariable) {
23184                 assert typeVariable.name().equals(name());
23185                 this.typeVariable = typeVariable;
23186             }
23187 
23188             @Override
23189             public OnnxType.TypeVariable typeVariable() {
23190                 return typeVariable;
23191             }
23192         }
23193 
23194         public enum InputParameter implements OnnxParameter {
23195             X(TypeConstraint.T.typeVariable(), Quantifier.REQUIRED),
23196             ;
23197 
23198             final OnnxType type;
23199             final Quantifier quantifier;
23200 
23201             InputParameter(OnnxType type, Quantifier quantifier) {
23202                 this.type = type;
23203                 this.quantifier = quantifier;
23204             }
23205 
23206             @Override
23207             public OnnxType type() {
23208                 return type;
23209             }
23210 
23211             @Override
23212             public Quantifier quantifier() {
23213                 return quantifier;
23214             }
23215         }
23216 
23217         public enum OutputParameter implements OnnxParameter {
23218             Y(TypeConstraint.T.typeVariable(), Quantifier.REQUIRED),
23219             ;
23220 
23221             final OnnxType type;
23222             final Quantifier quantifier;
23223 
23224             OutputParameter(OnnxType type, Quantifier quantifier) {
23225                 this.type = type;
23226                 this.quantifier = quantifier;
23227             }
23228 
23229             @Override
23230             public OnnxType type() {
23231                 return type;
23232             }
23233 
23234             @Override
23235             public Quantifier quantifier() {
23236                 return quantifier;
23237             }
23238         }
23239 
23240         public static final OnnxSchema SCHEMA = new OnnxSchemaRecord(
23241                 NAME,
23242                 List.of(Attribute.values()),
23243                 List.of(TypeConstraint.values()),
23244                 List.of(InputParameter.values()),
23245                 List.of(OutputParameter.values())
23246         );
23247 
23248         public Round(ExternalizedOp def) {
23249             super(SCHEMA, def);
23250         }
23251 
23252         Round(Round that, CopyContext cc) {
23253             super(that, cc);
23254         }
23255 
23256         @Override
23257         public Round transform(CopyContext cc, OpTransformer ot) {
23258             return new Round(this, cc);
23259         }
23260 
23261         Round(TypeElement resultType, Value X) {
23262             super(SCHEMA, resultType, Set.of(), List.of(X), List.of());
23263         }
23264 
23265         @Override
23266         public SequencedSet<OnnxParameter> onnxOutputs() {
23267             return onnxOutputs(SCHEMA);
23268         }
23269 
23270         @Override
23271         public SequencedMap<OnnxParameter, Object> onnxInputs() {
23272             return onnxInputs(SCHEMA, List.of(X()));
23273         }
23274 
23275         public Value X() {
23276             return operands().get(0);
23277         }
23278 
23279     }
23280 
23281     public static Round Round(TypeElement resultType, Value X) {
23282         return new Round(resultType, X);
23283     }
23284 
23285     @OpFactory.OpDeclaration(STFT.NAME)
23286     public static final class STFT extends OnnxOp {
23287         public static final String NAME = "STFT";
23288 
23289         public enum Attribute implements OnnxAttribute {
23290             onesided(Integer.class, true, 1),
23291             ;
23292 
23293                 final Class<?> t;
23294                 final boolean optional;
23295                 final Object defaultValue;
23296 
23297                 Attribute(Class<?> type, boolean optional, Object defaultValue) {
23298                     this.t = type;
23299                     this.optional = optional;
23300                     this.defaultValue = defaultValue;
23301                     assert optional || defaultValue == null;
23302                 }
23303 
23304                 public Class<?> type() {
23305                     return t;
23306                 }
23307 
23308                 public boolean isOptional() {
23309                     return optional;
23310                 }
23311 
23312                 public Object defaultValue() {
23313                     return defaultValue;
23314                 }
23315         }
23316 
23317         public enum TypeConstraint implements OnnxTypeConstraint {
23318             T1(new OnnxType.TypeVariable("T1", List.of(OnnxType.tensor(OnnxType.float32()), OnnxType.tensor(OnnxType.float16()), OnnxType.tensor(OnnxType.float64()), OnnxType.tensor(OnnxType.bfloat16())))),
23319             T2(new OnnxType.TypeVariable("T2", List.of(OnnxType.tensor(OnnxType.int32()), OnnxType.tensor(OnnxType.int64())))),
23320             ;
23321 
23322             final OnnxType.TypeVariable typeVariable;
23323 
23324             TypeConstraint(OnnxType.TypeVariable typeVariable) {
23325                 assert typeVariable.name().equals(name());
23326                 this.typeVariable = typeVariable;
23327             }
23328 
23329             @Override
23330             public OnnxType.TypeVariable typeVariable() {
23331                 return typeVariable;
23332             }
23333         }
23334 
23335         public enum InputParameter implements OnnxParameter {
23336             signal(TypeConstraint.T1.typeVariable(), Quantifier.REQUIRED),
23337             frame_step(TypeConstraint.T2.typeVariable(), Quantifier.REQUIRED),
23338             window(TypeConstraint.T1.typeVariable(), Quantifier.OPTIONAL),
23339             frame_length(TypeConstraint.T2.typeVariable(), Quantifier.OPTIONAL),
23340             ;
23341 
23342             final OnnxType type;
23343             final Quantifier quantifier;
23344 
23345             InputParameter(OnnxType type, Quantifier quantifier) {
23346                 this.type = type;
23347                 this.quantifier = quantifier;
23348             }
23349 
23350             @Override
23351             public OnnxType type() {
23352                 return type;
23353             }
23354 
23355             @Override
23356             public Quantifier quantifier() {
23357                 return quantifier;
23358             }
23359         }
23360 
23361         public enum OutputParameter implements OnnxParameter {
23362             output(TypeConstraint.T1.typeVariable(), Quantifier.REQUIRED),
23363             ;
23364 
23365             final OnnxType type;
23366             final Quantifier quantifier;
23367 
23368             OutputParameter(OnnxType type, Quantifier quantifier) {
23369                 this.type = type;
23370                 this.quantifier = quantifier;
23371             }
23372 
23373             @Override
23374             public OnnxType type() {
23375                 return type;
23376             }
23377 
23378             @Override
23379             public Quantifier quantifier() {
23380                 return quantifier;
23381             }
23382         }
23383 
23384         public static final OnnxSchema SCHEMA = new OnnxSchemaRecord(
23385                 NAME,
23386                 List.of(Attribute.values()),
23387                 List.of(TypeConstraint.values()),
23388                 List.of(InputParameter.values()),
23389                 List.of(OutputParameter.values())
23390         );
23391 
23392         public STFT(ExternalizedOp def) {
23393             super(SCHEMA, def);
23394         }
23395 
23396         STFT(STFT that, CopyContext cc) {
23397             super(that, cc);
23398         }
23399 
23400         @Override
23401         public STFT transform(CopyContext cc, OpTransformer ot) {
23402             return new STFT(this, cc);
23403         }
23404 
23405         STFT(TypeElement resultType, Value signal, Value frame_step, java.util.Optional<Value> window, java.util.Optional<Value> frame_length, java.util.Optional<Integer> onesided) {
23406             super(SCHEMA, resultType, Set.of(), List.of(signal, frame_step, window, frame_length), List.of(onesided));
23407         }
23408 
23409         @Override
23410         public SequencedSet<OnnxParameter> onnxOutputs() {
23411             return onnxOutputs(SCHEMA);
23412         }
23413 
23414         @Override
23415         public SequencedMap<OnnxParameter, Object> onnxInputs() {
23416             return onnxInputs(SCHEMA, List.of(signal(), frame_step(), window(), frame_length()));
23417         }
23418 
23419         public Value signal() {
23420             return operands().get(0);
23421         }
23422 
23423         public Value frame_step() {
23424             return operands().get(1);
23425         }
23426 
23427         public java.util.Optional<Value> window() {
23428             int i = optionalInputArguments.indexOf(InputParameter.window);
23429             return i != -1 ? java.util.Optional.of(operands().get(2 + i)) : java.util.Optional.empty();
23430         }
23431 
23432         public java.util.Optional<Value> frame_length() {
23433             int i = optionalInputArguments.indexOf(InputParameter.frame_length);
23434             return i != -1 ? java.util.Optional.of(operands().get(2 + i)) : java.util.Optional.empty();
23435         }
23436 
23437         public java.util.Optional<Integer> onesided() {
23438             Integer onesided = Attribute.onesided.access(Integer.class, onnxAttributes);
23439             return java.util.Optional.ofNullable(onesided);
23440         }
23441 
23442     }
23443 
23444     public static STFT STFT(TypeElement resultType, Value signal, Value frame_step, java.util.Optional<Value> window, java.util.Optional<Value> frame_length, java.util.Optional<Integer> onesided) {
23445         return new STFT(resultType, signal, frame_step, window, frame_length, onesided);
23446     }
23447 
23448     @OpFactory.OpDeclaration(SVMClassifier.NAME)
23449     public static final class SVMClassifier extends OnnxOp {
23450         public static final String NAME = "SVMClassifier";
23451 
23452         public enum Attribute implements OnnxAttribute {
23453             prob_b(float[].class, true, null),
23454             kernel_params(float[].class, true, null),
23455             kernel_type(String.class, true, "LINEAR"),
23456             classlabels_ints(int[].class, true, null),
23457             post_transform(String.class, true, "NONE"),
23458             rho(float[].class, true, null),
23459             coefficients(float[].class, true, null),
23460             support_vectors(float[].class, true, null),
23461             vectors_per_class(int[].class, true, null),
23462             prob_a(float[].class, true, null),
23463             classlabels_strings(String[].class, true, null),
23464             ;
23465 
23466                 final Class<?> t;
23467                 final boolean optional;
23468                 final Object defaultValue;
23469 
23470                 Attribute(Class<?> type, boolean optional, Object defaultValue) {
23471                     this.t = type;
23472                     this.optional = optional;
23473                     this.defaultValue = defaultValue;
23474                     assert optional || defaultValue == null;
23475                 }
23476 
23477                 public Class<?> type() {
23478                     return t;
23479                 }
23480 
23481                 public boolean isOptional() {
23482                     return optional;
23483                 }
23484 
23485                 public Object defaultValue() {
23486                     return defaultValue;
23487                 }
23488         }
23489 
23490         public enum TypeConstraint implements OnnxTypeConstraint {
23491             T1(new OnnxType.TypeVariable("T1", List.of(OnnxType.tensor(OnnxType.float32()), OnnxType.tensor(OnnxType.float64()), OnnxType.tensor(OnnxType.int64()), OnnxType.tensor(OnnxType.int32())))),
23492             T2(new OnnxType.TypeVariable("T2", List.of(OnnxType.tensor(OnnxType.string()), OnnxType.tensor(OnnxType.int64())))),
23493             ;
23494 
23495             final OnnxType.TypeVariable typeVariable;
23496 
23497             TypeConstraint(OnnxType.TypeVariable typeVariable) {
23498                 assert typeVariable.name().equals(name());
23499                 this.typeVariable = typeVariable;
23500             }
23501 
23502             @Override
23503             public OnnxType.TypeVariable typeVariable() {
23504                 return typeVariable;
23505             }
23506         }
23507 
23508         public enum InputParameter implements OnnxParameter {
23509             X(TypeConstraint.T1.typeVariable(), Quantifier.REQUIRED),
23510             ;
23511 
23512             final OnnxType type;
23513             final Quantifier quantifier;
23514 
23515             InputParameter(OnnxType type, Quantifier quantifier) {
23516                 this.type = type;
23517                 this.quantifier = quantifier;
23518             }
23519 
23520             @Override
23521             public OnnxType type() {
23522                 return type;
23523             }
23524 
23525             @Override
23526             public Quantifier quantifier() {
23527                 return quantifier;
23528             }
23529         }
23530 
23531         public enum OutputParameter implements OnnxParameter {
23532             Y(TypeConstraint.T2.typeVariable(), Quantifier.REQUIRED),
23533             Z(OnnxType.tensor(OnnxType.float32()), Quantifier.REQUIRED),
23534             ;
23535 
23536             final OnnxType type;
23537             final Quantifier quantifier;
23538 
23539             OutputParameter(OnnxType type, Quantifier quantifier) {
23540                 this.type = type;
23541                 this.quantifier = quantifier;
23542             }
23543 
23544             @Override
23545             public OnnxType type() {
23546                 return type;
23547             }
23548 
23549             @Override
23550             public Quantifier quantifier() {
23551                 return quantifier;
23552             }
23553         }
23554 
23555         public static final OnnxSchema SCHEMA = new OnnxSchemaRecord(
23556                 NAME,
23557                 List.of(Attribute.values()),
23558                 List.of(TypeConstraint.values()),
23559                 List.of(InputParameter.values()),
23560                 List.of(OutputParameter.values())
23561         );
23562 
23563         public SVMClassifier(ExternalizedOp def) {
23564             super(SCHEMA, def);
23565         }
23566 
23567         SVMClassifier(SVMClassifier that, CopyContext cc) {
23568             super(that, cc);
23569         }
23570 
23571         @Override
23572         public SVMClassifier transform(CopyContext cc, OpTransformer ot) {
23573             return new SVMClassifier(this, cc);
23574         }
23575 
23576         SVMClassifier(TypeElement resultType, Value X, java.util.Optional<float[]> prob_b, java.util.Optional<float[]> kernel_params, java.util.Optional<String> kernel_type, java.util.Optional<int[]> classlabels_ints, java.util.Optional<String> post_transform, java.util.Optional<float[]> rho, java.util.Optional<float[]> coefficients, java.util.Optional<float[]> support_vectors, java.util.Optional<int[]> vectors_per_class, java.util.Optional<float[]> prob_a, java.util.Optional<String[]> classlabels_strings) {
23577             super(SCHEMA, resultType, Set.of(), List.of(X), List.of(prob_b, kernel_params, kernel_type, classlabels_ints, post_transform, rho, coefficients, support_vectors, vectors_per_class, prob_a, classlabels_strings));
23578         }
23579 
23580         @Override
23581         public SequencedSet<OnnxParameter> onnxOutputs() {
23582             return onnxOutputs(SCHEMA);
23583         }
23584 
23585         @Override
23586         public SequencedMap<OnnxParameter, Object> onnxInputs() {
23587             return onnxInputs(SCHEMA, List.of(X()));
23588         }
23589 
23590         public Value X() {
23591             return operands().get(0);
23592         }
23593 
23594         public java.util.Optional<float[]> prob_b() {
23595             float[] prob_b = Attribute.prob_b.access(float[].class, onnxAttributes);
23596             return java.util.Optional.ofNullable(prob_b).map(float[]::clone);
23597         }
23598 
23599         public java.util.Optional<float[]> kernel_params() {
23600             float[] kernel_params = Attribute.kernel_params.access(float[].class, onnxAttributes);
23601             return java.util.Optional.ofNullable(kernel_params).map(float[]::clone);
23602         }
23603 
23604         public java.util.Optional<String> kernel_type() {
23605             String kernel_type = Attribute.kernel_type.access(String.class, onnxAttributes);
23606             return java.util.Optional.ofNullable(kernel_type);
23607         }
23608 
23609         public java.util.Optional<int[]> classlabels_ints() {
23610             int[] classlabels_ints = Attribute.classlabels_ints.access(int[].class, onnxAttributes);
23611             return java.util.Optional.ofNullable(classlabels_ints).map(int[]::clone);
23612         }
23613 
23614         public java.util.Optional<String> post_transform() {
23615             String post_transform = Attribute.post_transform.access(String.class, onnxAttributes);
23616             return java.util.Optional.ofNullable(post_transform);
23617         }
23618 
23619         public java.util.Optional<float[]> rho() {
23620             float[] rho = Attribute.rho.access(float[].class, onnxAttributes);
23621             return java.util.Optional.ofNullable(rho).map(float[]::clone);
23622         }
23623 
23624         public java.util.Optional<float[]> coefficients() {
23625             float[] coefficients = Attribute.coefficients.access(float[].class, onnxAttributes);
23626             return java.util.Optional.ofNullable(coefficients).map(float[]::clone);
23627         }
23628 
23629         public java.util.Optional<float[]> support_vectors() {
23630             float[] support_vectors = Attribute.support_vectors.access(float[].class, onnxAttributes);
23631             return java.util.Optional.ofNullable(support_vectors).map(float[]::clone);
23632         }
23633 
23634         public java.util.Optional<int[]> vectors_per_class() {
23635             int[] vectors_per_class = Attribute.vectors_per_class.access(int[].class, onnxAttributes);
23636             return java.util.Optional.ofNullable(vectors_per_class).map(int[]::clone);
23637         }
23638 
23639         public java.util.Optional<float[]> prob_a() {
23640             float[] prob_a = Attribute.prob_a.access(float[].class, onnxAttributes);
23641             return java.util.Optional.ofNullable(prob_a).map(float[]::clone);
23642         }
23643 
23644         public java.util.Optional<String[]> classlabels_strings() {
23645             String[] classlabels_strings = Attribute.classlabels_strings.access(String[].class, onnxAttributes);
23646             return java.util.Optional.ofNullable(classlabels_strings).map(String[]::clone);
23647         }
23648 
23649     }
23650 
23651     public static SVMClassifier SVMClassifier(TypeElement resultType, Value X, java.util.Optional<float[]> prob_b, java.util.Optional<float[]> kernel_params, java.util.Optional<String> kernel_type, java.util.Optional<int[]> classlabels_ints, java.util.Optional<String> post_transform, java.util.Optional<float[]> rho, java.util.Optional<float[]> coefficients, java.util.Optional<float[]> support_vectors, java.util.Optional<int[]> vectors_per_class, java.util.Optional<float[]> prob_a, java.util.Optional<String[]> classlabels_strings) {
23652         return new SVMClassifier(resultType, X, prob_b, kernel_params, kernel_type, classlabels_ints, post_transform, rho, coefficients, support_vectors, vectors_per_class, prob_a, classlabels_strings);
23653     }
23654 
23655     @OpFactory.OpDeclaration(SVMRegressor.NAME)
23656     public static final class SVMRegressor extends OnnxOp {
23657         public static final String NAME = "SVMRegressor";
23658 
23659         public enum Attribute implements OnnxAttribute {
23660             kernel_type(String.class, true, "LINEAR"),
23661             kernel_params(float[].class, true, null),
23662             n_supports(Integer.class, true, 0),
23663             rho(float[].class, true, null),
23664             post_transform(String.class, true, "NONE"),
23665             coefficients(float[].class, true, null),
23666             support_vectors(float[].class, true, null),
23667             one_class(Integer.class, true, 0),
23668             ;
23669 
23670                 final Class<?> t;
23671                 final boolean optional;
23672                 final Object defaultValue;
23673 
23674                 Attribute(Class<?> type, boolean optional, Object defaultValue) {
23675                     this.t = type;
23676                     this.optional = optional;
23677                     this.defaultValue = defaultValue;
23678                     assert optional || defaultValue == null;
23679                 }
23680 
23681                 public Class<?> type() {
23682                     return t;
23683                 }
23684 
23685                 public boolean isOptional() {
23686                     return optional;
23687                 }
23688 
23689                 public Object defaultValue() {
23690                     return defaultValue;
23691                 }
23692         }
23693 
23694         public enum TypeConstraint implements OnnxTypeConstraint {
23695             T(new OnnxType.TypeVariable("T", List.of(OnnxType.tensor(OnnxType.float32()), OnnxType.tensor(OnnxType.float64()), OnnxType.tensor(OnnxType.int64()), OnnxType.tensor(OnnxType.int32())))),
23696             ;
23697 
23698             final OnnxType.TypeVariable typeVariable;
23699 
23700             TypeConstraint(OnnxType.TypeVariable typeVariable) {
23701                 assert typeVariable.name().equals(name());
23702                 this.typeVariable = typeVariable;
23703             }
23704 
23705             @Override
23706             public OnnxType.TypeVariable typeVariable() {
23707                 return typeVariable;
23708             }
23709         }
23710 
23711         public enum InputParameter implements OnnxParameter {
23712             X(TypeConstraint.T.typeVariable(), Quantifier.REQUIRED),
23713             ;
23714 
23715             final OnnxType type;
23716             final Quantifier quantifier;
23717 
23718             InputParameter(OnnxType type, Quantifier quantifier) {
23719                 this.type = type;
23720                 this.quantifier = quantifier;
23721             }
23722 
23723             @Override
23724             public OnnxType type() {
23725                 return type;
23726             }
23727 
23728             @Override
23729             public Quantifier quantifier() {
23730                 return quantifier;
23731             }
23732         }
23733 
23734         public enum OutputParameter implements OnnxParameter {
23735             Y(OnnxType.tensor(OnnxType.float32()), Quantifier.REQUIRED),
23736             ;
23737 
23738             final OnnxType type;
23739             final Quantifier quantifier;
23740 
23741             OutputParameter(OnnxType type, Quantifier quantifier) {
23742                 this.type = type;
23743                 this.quantifier = quantifier;
23744             }
23745 
23746             @Override
23747             public OnnxType type() {
23748                 return type;
23749             }
23750 
23751             @Override
23752             public Quantifier quantifier() {
23753                 return quantifier;
23754             }
23755         }
23756 
23757         public static final OnnxSchema SCHEMA = new OnnxSchemaRecord(
23758                 NAME,
23759                 List.of(Attribute.values()),
23760                 List.of(TypeConstraint.values()),
23761                 List.of(InputParameter.values()),
23762                 List.of(OutputParameter.values())
23763         );
23764 
23765         public SVMRegressor(ExternalizedOp def) {
23766             super(SCHEMA, def);
23767         }
23768 
23769         SVMRegressor(SVMRegressor that, CopyContext cc) {
23770             super(that, cc);
23771         }
23772 
23773         @Override
23774         public SVMRegressor transform(CopyContext cc, OpTransformer ot) {
23775             return new SVMRegressor(this, cc);
23776         }
23777 
23778         SVMRegressor(TypeElement resultType, Value X, java.util.Optional<String> kernel_type, java.util.Optional<float[]> kernel_params, java.util.Optional<Integer> n_supports, java.util.Optional<float[]> rho, java.util.Optional<String> post_transform, java.util.Optional<float[]> coefficients, java.util.Optional<float[]> support_vectors, java.util.Optional<Integer> one_class) {
23779             super(SCHEMA, resultType, Set.of(), List.of(X), List.of(kernel_type, kernel_params, n_supports, rho, post_transform, coefficients, support_vectors, one_class));
23780         }
23781 
23782         @Override
23783         public SequencedSet<OnnxParameter> onnxOutputs() {
23784             return onnxOutputs(SCHEMA);
23785         }
23786 
23787         @Override
23788         public SequencedMap<OnnxParameter, Object> onnxInputs() {
23789             return onnxInputs(SCHEMA, List.of(X()));
23790         }
23791 
23792         public Value X() {
23793             return operands().get(0);
23794         }
23795 
23796         public java.util.Optional<String> kernel_type() {
23797             String kernel_type = Attribute.kernel_type.access(String.class, onnxAttributes);
23798             return java.util.Optional.ofNullable(kernel_type);
23799         }
23800 
23801         public java.util.Optional<float[]> kernel_params() {
23802             float[] kernel_params = Attribute.kernel_params.access(float[].class, onnxAttributes);
23803             return java.util.Optional.ofNullable(kernel_params).map(float[]::clone);
23804         }
23805 
23806         public java.util.Optional<Integer> n_supports() {
23807             Integer n_supports = Attribute.n_supports.access(Integer.class, onnxAttributes);
23808             return java.util.Optional.ofNullable(n_supports);
23809         }
23810 
23811         public java.util.Optional<float[]> rho() {
23812             float[] rho = Attribute.rho.access(float[].class, onnxAttributes);
23813             return java.util.Optional.ofNullable(rho).map(float[]::clone);
23814         }
23815 
23816         public java.util.Optional<String> post_transform() {
23817             String post_transform = Attribute.post_transform.access(String.class, onnxAttributes);
23818             return java.util.Optional.ofNullable(post_transform);
23819         }
23820 
23821         public java.util.Optional<float[]> coefficients() {
23822             float[] coefficients = Attribute.coefficients.access(float[].class, onnxAttributes);
23823             return java.util.Optional.ofNullable(coefficients).map(float[]::clone);
23824         }
23825 
23826         public java.util.Optional<float[]> support_vectors() {
23827             float[] support_vectors = Attribute.support_vectors.access(float[].class, onnxAttributes);
23828             return java.util.Optional.ofNullable(support_vectors).map(float[]::clone);
23829         }
23830 
23831         public java.util.Optional<Integer> one_class() {
23832             Integer one_class = Attribute.one_class.access(Integer.class, onnxAttributes);
23833             return java.util.Optional.ofNullable(one_class);
23834         }
23835 
23836     }
23837 
23838     public static SVMRegressor SVMRegressor(TypeElement resultType, Value X, java.util.Optional<String> kernel_type, java.util.Optional<float[]> kernel_params, java.util.Optional<Integer> n_supports, java.util.Optional<float[]> rho, java.util.Optional<String> post_transform, java.util.Optional<float[]> coefficients, java.util.Optional<float[]> support_vectors, java.util.Optional<Integer> one_class) {
23839         return new SVMRegressor(resultType, X, kernel_type, kernel_params, n_supports, rho, post_transform, coefficients, support_vectors, one_class);
23840     }
23841 
23842     @OpFactory.OpDeclaration(Scaler.NAME)
23843     public static final class Scaler extends OnnxOp {
23844         public static final String NAME = "Scaler";
23845 
23846         public enum Attribute implements OnnxAttribute {
23847             offset(float[].class, true, null),
23848             scale(float[].class, true, null),
23849             ;
23850 
23851                 final Class<?> t;
23852                 final boolean optional;
23853                 final Object defaultValue;
23854 
23855                 Attribute(Class<?> type, boolean optional, Object defaultValue) {
23856                     this.t = type;
23857                     this.optional = optional;
23858                     this.defaultValue = defaultValue;
23859                     assert optional || defaultValue == null;
23860                 }
23861 
23862                 public Class<?> type() {
23863                     return t;
23864                 }
23865 
23866                 public boolean isOptional() {
23867                     return optional;
23868                 }
23869 
23870                 public Object defaultValue() {
23871                     return defaultValue;
23872                 }
23873         }
23874 
23875         public enum TypeConstraint implements OnnxTypeConstraint {
23876             T(new OnnxType.TypeVariable("T", List.of(OnnxType.tensor(OnnxType.float32()), OnnxType.tensor(OnnxType.float64()), OnnxType.tensor(OnnxType.int64()), OnnxType.tensor(OnnxType.int32())))),
23877             ;
23878 
23879             final OnnxType.TypeVariable typeVariable;
23880 
23881             TypeConstraint(OnnxType.TypeVariable typeVariable) {
23882                 assert typeVariable.name().equals(name());
23883                 this.typeVariable = typeVariable;
23884             }
23885 
23886             @Override
23887             public OnnxType.TypeVariable typeVariable() {
23888                 return typeVariable;
23889             }
23890         }
23891 
23892         public enum InputParameter implements OnnxParameter {
23893             X(TypeConstraint.T.typeVariable(), Quantifier.REQUIRED),
23894             ;
23895 
23896             final OnnxType type;
23897             final Quantifier quantifier;
23898 
23899             InputParameter(OnnxType type, Quantifier quantifier) {
23900                 this.type = type;
23901                 this.quantifier = quantifier;
23902             }
23903 
23904             @Override
23905             public OnnxType type() {
23906                 return type;
23907             }
23908 
23909             @Override
23910             public Quantifier quantifier() {
23911                 return quantifier;
23912             }
23913         }
23914 
23915         public enum OutputParameter implements OnnxParameter {
23916             Y(OnnxType.tensor(OnnxType.float32()), Quantifier.REQUIRED),
23917             ;
23918 
23919             final OnnxType type;
23920             final Quantifier quantifier;
23921 
23922             OutputParameter(OnnxType type, Quantifier quantifier) {
23923                 this.type = type;
23924                 this.quantifier = quantifier;
23925             }
23926 
23927             @Override
23928             public OnnxType type() {
23929                 return type;
23930             }
23931 
23932             @Override
23933             public Quantifier quantifier() {
23934                 return quantifier;
23935             }
23936         }
23937 
23938         public static final OnnxSchema SCHEMA = new OnnxSchemaRecord(
23939                 NAME,
23940                 List.of(Attribute.values()),
23941                 List.of(TypeConstraint.values()),
23942                 List.of(InputParameter.values()),
23943                 List.of(OutputParameter.values())
23944         );
23945 
23946         public Scaler(ExternalizedOp def) {
23947             super(SCHEMA, def);
23948         }
23949 
23950         Scaler(Scaler that, CopyContext cc) {
23951             super(that, cc);
23952         }
23953 
23954         @Override
23955         public Scaler transform(CopyContext cc, OpTransformer ot) {
23956             return new Scaler(this, cc);
23957         }
23958 
23959         Scaler(TypeElement resultType, Value X, java.util.Optional<float[]> offset, java.util.Optional<float[]> scale) {
23960             super(SCHEMA, resultType, Set.of(), List.of(X), List.of(offset, scale));
23961         }
23962 
23963         @Override
23964         public SequencedSet<OnnxParameter> onnxOutputs() {
23965             return onnxOutputs(SCHEMA);
23966         }
23967 
23968         @Override
23969         public SequencedMap<OnnxParameter, Object> onnxInputs() {
23970             return onnxInputs(SCHEMA, List.of(X()));
23971         }
23972 
23973         public Value X() {
23974             return operands().get(0);
23975         }
23976 
23977         public java.util.Optional<float[]> offset() {
23978             float[] offset = Attribute.offset.access(float[].class, onnxAttributes);
23979             return java.util.Optional.ofNullable(offset).map(float[]::clone);
23980         }
23981 
23982         public java.util.Optional<float[]> scale() {
23983             float[] scale = Attribute.scale.access(float[].class, onnxAttributes);
23984             return java.util.Optional.ofNullable(scale).map(float[]::clone);
23985         }
23986 
23987     }
23988 
23989     public static Scaler Scaler(TypeElement resultType, Value X, java.util.Optional<float[]> offset, java.util.Optional<float[]> scale) {
23990         return new Scaler(resultType, X, offset, scale);
23991     }
23992 
23993     @OpFactory.OpDeclaration(Scatter.NAME)
23994     public static final class Scatter extends OnnxOp {
23995         public static final String NAME = "Scatter";
23996 
23997         public enum Attribute implements OnnxAttribute {
23998             axis(Integer.class, true, 0),
23999             ;
24000 
24001                 final Class<?> t;
24002                 final boolean optional;
24003                 final Object defaultValue;
24004 
24005                 Attribute(Class<?> type, boolean optional, Object defaultValue) {
24006                     this.t = type;
24007                     this.optional = optional;
24008                     this.defaultValue = defaultValue;
24009                     assert optional || defaultValue == null;
24010                 }
24011 
24012                 public Class<?> type() {
24013                     return t;
24014                 }
24015 
24016                 public boolean isOptional() {
24017                     return optional;
24018                 }
24019 
24020                 public Object defaultValue() {
24021                     return defaultValue;
24022                 }
24023         }
24024 
24025         public enum TypeConstraint implements OnnxTypeConstraint {
24026             T(new OnnxType.TypeVariable("T", List.of(OnnxType.tensor(OnnxType.uint8()), OnnxType.tensor(OnnxType.uint16()), OnnxType.tensor(OnnxType.uint32()), OnnxType.tensor(OnnxType.uint64()), OnnxType.tensor(OnnxType.int8()), OnnxType.tensor(OnnxType.int16()), OnnxType.tensor(OnnxType.int32()), OnnxType.tensor(OnnxType.int64()), OnnxType.tensor(OnnxType.float16()), OnnxType.tensor(OnnxType.float32()), OnnxType.tensor(OnnxType.float64()), OnnxType.tensor(OnnxType.string()), OnnxType.tensor(OnnxType.bool()), OnnxType.tensor(OnnxType.complex64()), OnnxType.tensor(OnnxType.complex128())))),
24027             Tind(new OnnxType.TypeVariable("Tind", List.of(OnnxType.tensor(OnnxType.int32()), OnnxType.tensor(OnnxType.int64())))),
24028             ;
24029 
24030             final OnnxType.TypeVariable typeVariable;
24031 
24032             TypeConstraint(OnnxType.TypeVariable typeVariable) {
24033                 assert typeVariable.name().equals(name());
24034                 this.typeVariable = typeVariable;
24035             }
24036 
24037             @Override
24038             public OnnxType.TypeVariable typeVariable() {
24039                 return typeVariable;
24040             }
24041         }
24042 
24043         public enum InputParameter implements OnnxParameter {
24044             data(TypeConstraint.T.typeVariable(), Quantifier.REQUIRED),
24045             indices(TypeConstraint.Tind.typeVariable(), Quantifier.REQUIRED),
24046             updates(TypeConstraint.T.typeVariable(), Quantifier.REQUIRED),
24047             ;
24048 
24049             final OnnxType type;
24050             final Quantifier quantifier;
24051 
24052             InputParameter(OnnxType type, Quantifier quantifier) {
24053                 this.type = type;
24054                 this.quantifier = quantifier;
24055             }
24056 
24057             @Override
24058             public OnnxType type() {
24059                 return type;
24060             }
24061 
24062             @Override
24063             public Quantifier quantifier() {
24064                 return quantifier;
24065             }
24066         }
24067 
24068         public enum OutputParameter implements OnnxParameter {
24069             output(TypeConstraint.T.typeVariable(), Quantifier.REQUIRED),
24070             ;
24071 
24072             final OnnxType type;
24073             final Quantifier quantifier;
24074 
24075             OutputParameter(OnnxType type, Quantifier quantifier) {
24076                 this.type = type;
24077                 this.quantifier = quantifier;
24078             }
24079 
24080             @Override
24081             public OnnxType type() {
24082                 return type;
24083             }
24084 
24085             @Override
24086             public Quantifier quantifier() {
24087                 return quantifier;
24088             }
24089         }
24090 
24091         public static final OnnxSchema SCHEMA = new OnnxSchemaRecord(
24092                 NAME,
24093                 List.of(Attribute.values()),
24094                 List.of(TypeConstraint.values()),
24095                 List.of(InputParameter.values()),
24096                 List.of(OutputParameter.values())
24097         );
24098 
24099         public Scatter(ExternalizedOp def) {
24100             super(SCHEMA, def);
24101         }
24102 
24103         Scatter(Scatter that, CopyContext cc) {
24104             super(that, cc);
24105         }
24106 
24107         @Override
24108         public Scatter transform(CopyContext cc, OpTransformer ot) {
24109             return new Scatter(this, cc);
24110         }
24111 
24112         Scatter(TypeElement resultType, Value data, Value indices, Value updates, java.util.Optional<Integer> axis) {
24113             super(SCHEMA, resultType, Set.of(), List.of(data, indices, updates), List.of(axis));
24114         }
24115 
24116         @Override
24117         public SequencedSet<OnnxParameter> onnxOutputs() {
24118             return onnxOutputs(SCHEMA);
24119         }
24120 
24121         @Override
24122         public SequencedMap<OnnxParameter, Object> onnxInputs() {
24123             return onnxInputs(SCHEMA, List.of(data(), indices(), updates()));
24124         }
24125 
24126         public Value data() {
24127             return operands().get(0);
24128         }
24129 
24130         public Value indices() {
24131             return operands().get(1);
24132         }
24133 
24134         public Value updates() {
24135             return operands().get(2);
24136         }
24137 
24138         public java.util.Optional<Integer> axis() {
24139             Integer axis = Attribute.axis.access(Integer.class, onnxAttributes);
24140             return java.util.Optional.ofNullable(axis);
24141         }
24142 
24143     }
24144 
24145     public static Scatter Scatter(TypeElement resultType, Value data, Value indices, Value updates, java.util.Optional<Integer> axis) {
24146         return new Scatter(resultType, data, indices, updates, axis);
24147     }
24148 
24149     @OpFactory.OpDeclaration(ScatterElements.NAME)
24150     public static final class ScatterElements extends OnnxOp {
24151         public static final String NAME = "ScatterElements";
24152 
24153         public enum Attribute implements OnnxAttribute {
24154             reduction(String.class, true, "none"),
24155             axis(Integer.class, true, 0),
24156             ;
24157 
24158                 final Class<?> t;
24159                 final boolean optional;
24160                 final Object defaultValue;
24161 
24162                 Attribute(Class<?> type, boolean optional, Object defaultValue) {
24163                     this.t = type;
24164                     this.optional = optional;
24165                     this.defaultValue = defaultValue;
24166                     assert optional || defaultValue == null;
24167                 }
24168 
24169                 public Class<?> type() {
24170                     return t;
24171                 }
24172 
24173                 public boolean isOptional() {
24174                     return optional;
24175                 }
24176 
24177                 public Object defaultValue() {
24178                     return defaultValue;
24179                 }
24180         }
24181 
24182         public enum TypeConstraint implements OnnxTypeConstraint {
24183             T(new OnnxType.TypeVariable("T", List.of(OnnxType.tensor(OnnxType.uint8()), OnnxType.tensor(OnnxType.uint16()), OnnxType.tensor(OnnxType.uint32()), OnnxType.tensor(OnnxType.uint64()), OnnxType.tensor(OnnxType.int8()), OnnxType.tensor(OnnxType.int16()), OnnxType.tensor(OnnxType.int32()), OnnxType.tensor(OnnxType.int64()), OnnxType.tensor(OnnxType.bfloat16()), OnnxType.tensor(OnnxType.float16()), OnnxType.tensor(OnnxType.float32()), OnnxType.tensor(OnnxType.float64()), OnnxType.tensor(OnnxType.string()), OnnxType.tensor(OnnxType.bool()), OnnxType.tensor(OnnxType.complex64()), OnnxType.tensor(OnnxType.complex128())))),
24184             Tind(new OnnxType.TypeVariable("Tind", List.of(OnnxType.tensor(OnnxType.int32()), OnnxType.tensor(OnnxType.int64())))),
24185             ;
24186 
24187             final OnnxType.TypeVariable typeVariable;
24188 
24189             TypeConstraint(OnnxType.TypeVariable typeVariable) {
24190                 assert typeVariable.name().equals(name());
24191                 this.typeVariable = typeVariable;
24192             }
24193 
24194             @Override
24195             public OnnxType.TypeVariable typeVariable() {
24196                 return typeVariable;
24197             }
24198         }
24199 
24200         public enum InputParameter implements OnnxParameter {
24201             data(TypeConstraint.T.typeVariable(), Quantifier.REQUIRED),
24202             indices(TypeConstraint.Tind.typeVariable(), Quantifier.REQUIRED),
24203             updates(TypeConstraint.T.typeVariable(), Quantifier.REQUIRED),
24204             ;
24205 
24206             final OnnxType type;
24207             final Quantifier quantifier;
24208 
24209             InputParameter(OnnxType type, Quantifier quantifier) {
24210                 this.type = type;
24211                 this.quantifier = quantifier;
24212             }
24213 
24214             @Override
24215             public OnnxType type() {
24216                 return type;
24217             }
24218 
24219             @Override
24220             public Quantifier quantifier() {
24221                 return quantifier;
24222             }
24223         }
24224 
24225         public enum OutputParameter implements OnnxParameter {
24226             output(TypeConstraint.T.typeVariable(), Quantifier.REQUIRED),
24227             ;
24228 
24229             final OnnxType type;
24230             final Quantifier quantifier;
24231 
24232             OutputParameter(OnnxType type, Quantifier quantifier) {
24233                 this.type = type;
24234                 this.quantifier = quantifier;
24235             }
24236 
24237             @Override
24238             public OnnxType type() {
24239                 return type;
24240             }
24241 
24242             @Override
24243             public Quantifier quantifier() {
24244                 return quantifier;
24245             }
24246         }
24247 
24248         public static final OnnxSchema SCHEMA = new OnnxSchemaRecord(
24249                 NAME,
24250                 List.of(Attribute.values()),
24251                 List.of(TypeConstraint.values()),
24252                 List.of(InputParameter.values()),
24253                 List.of(OutputParameter.values())
24254         );
24255 
24256         public ScatterElements(ExternalizedOp def) {
24257             super(SCHEMA, def);
24258         }
24259 
24260         ScatterElements(ScatterElements that, CopyContext cc) {
24261             super(that, cc);
24262         }
24263 
24264         @Override
24265         public ScatterElements transform(CopyContext cc, OpTransformer ot) {
24266             return new ScatterElements(this, cc);
24267         }
24268 
24269         ScatterElements(TypeElement resultType, Value data, Value indices, Value updates, java.util.Optional<String> reduction, java.util.Optional<Integer> axis) {
24270             super(SCHEMA, resultType, Set.of(), List.of(data, indices, updates), List.of(reduction, axis));
24271         }
24272 
24273         @Override
24274         public SequencedSet<OnnxParameter> onnxOutputs() {
24275             return onnxOutputs(SCHEMA);
24276         }
24277 
24278         @Override
24279         public SequencedMap<OnnxParameter, Object> onnxInputs() {
24280             return onnxInputs(SCHEMA, List.of(data(), indices(), updates()));
24281         }
24282 
24283         public Value data() {
24284             return operands().get(0);
24285         }
24286 
24287         public Value indices() {
24288             return operands().get(1);
24289         }
24290 
24291         public Value updates() {
24292             return operands().get(2);
24293         }
24294 
24295         public java.util.Optional<String> reduction() {
24296             String reduction = Attribute.reduction.access(String.class, onnxAttributes);
24297             return java.util.Optional.ofNullable(reduction);
24298         }
24299 
24300         public java.util.Optional<Integer> axis() {
24301             Integer axis = Attribute.axis.access(Integer.class, onnxAttributes);
24302             return java.util.Optional.ofNullable(axis);
24303         }
24304 
24305     }
24306 
24307     public static ScatterElements ScatterElements(TypeElement resultType, Value data, Value indices, Value updates, java.util.Optional<String> reduction, java.util.Optional<Integer> axis) {
24308         return new ScatterElements(resultType, data, indices, updates, reduction, axis);
24309     }
24310 
24311     @OpFactory.OpDeclaration(ScatterND.NAME)
24312     public static final class ScatterND extends OnnxOp {
24313         public static final String NAME = "ScatterND";
24314 
24315         public enum Attribute implements OnnxAttribute {
24316             reduction(String.class, true, "none"),
24317             ;
24318 
24319                 final Class<?> t;
24320                 final boolean optional;
24321                 final Object defaultValue;
24322 
24323                 Attribute(Class<?> type, boolean optional, Object defaultValue) {
24324                     this.t = type;
24325                     this.optional = optional;
24326                     this.defaultValue = defaultValue;
24327                     assert optional || defaultValue == null;
24328                 }
24329 
24330                 public Class<?> type() {
24331                     return t;
24332                 }
24333 
24334                 public boolean isOptional() {
24335                     return optional;
24336                 }
24337 
24338                 public Object defaultValue() {
24339                     return defaultValue;
24340                 }
24341         }
24342 
24343         public enum TypeConstraint implements OnnxTypeConstraint {
24344             T(new OnnxType.TypeVariable("T", List.of(OnnxType.tensor(OnnxType.uint8()), OnnxType.tensor(OnnxType.uint16()), OnnxType.tensor(OnnxType.uint32()), OnnxType.tensor(OnnxType.uint64()), OnnxType.tensor(OnnxType.int8()), OnnxType.tensor(OnnxType.int16()), OnnxType.tensor(OnnxType.int32()), OnnxType.tensor(OnnxType.int64()), OnnxType.tensor(OnnxType.bfloat16()), OnnxType.tensor(OnnxType.float16()), OnnxType.tensor(OnnxType.float32()), OnnxType.tensor(OnnxType.float64()), OnnxType.tensor(OnnxType.string()), OnnxType.tensor(OnnxType.bool()), OnnxType.tensor(OnnxType.complex64()), OnnxType.tensor(OnnxType.complex128())))),
24345             ;
24346 
24347             final OnnxType.TypeVariable typeVariable;
24348 
24349             TypeConstraint(OnnxType.TypeVariable typeVariable) {
24350                 assert typeVariable.name().equals(name());
24351                 this.typeVariable = typeVariable;
24352             }
24353 
24354             @Override
24355             public OnnxType.TypeVariable typeVariable() {
24356                 return typeVariable;
24357             }
24358         }
24359 
24360         public enum InputParameter implements OnnxParameter {
24361             data(TypeConstraint.T.typeVariable(), Quantifier.REQUIRED),
24362             indices(OnnxType.tensor(OnnxType.int64()), Quantifier.REQUIRED),
24363             updates(TypeConstraint.T.typeVariable(), Quantifier.REQUIRED),
24364             ;
24365 
24366             final OnnxType type;
24367             final Quantifier quantifier;
24368 
24369             InputParameter(OnnxType type, Quantifier quantifier) {
24370                 this.type = type;
24371                 this.quantifier = quantifier;
24372             }
24373 
24374             @Override
24375             public OnnxType type() {
24376                 return type;
24377             }
24378 
24379             @Override
24380             public Quantifier quantifier() {
24381                 return quantifier;
24382             }
24383         }
24384 
24385         public enum OutputParameter implements OnnxParameter {
24386             output(TypeConstraint.T.typeVariable(), Quantifier.REQUIRED),
24387             ;
24388 
24389             final OnnxType type;
24390             final Quantifier quantifier;
24391 
24392             OutputParameter(OnnxType type, Quantifier quantifier) {
24393                 this.type = type;
24394                 this.quantifier = quantifier;
24395             }
24396 
24397             @Override
24398             public OnnxType type() {
24399                 return type;
24400             }
24401 
24402             @Override
24403             public Quantifier quantifier() {
24404                 return quantifier;
24405             }
24406         }
24407 
24408         public static final OnnxSchema SCHEMA = new OnnxSchemaRecord(
24409                 NAME,
24410                 List.of(Attribute.values()),
24411                 List.of(TypeConstraint.values()),
24412                 List.of(InputParameter.values()),
24413                 List.of(OutputParameter.values())
24414         );
24415 
24416         public ScatterND(ExternalizedOp def) {
24417             super(SCHEMA, def);
24418         }
24419 
24420         ScatterND(ScatterND that, CopyContext cc) {
24421             super(that, cc);
24422         }
24423 
24424         @Override
24425         public ScatterND transform(CopyContext cc, OpTransformer ot) {
24426             return new ScatterND(this, cc);
24427         }
24428 
24429         ScatterND(TypeElement resultType, Value data, Value indices, Value updates, java.util.Optional<String> reduction) {
24430             super(SCHEMA, resultType, Set.of(), List.of(data, indices, updates), List.of(reduction));
24431         }
24432 
24433         @Override
24434         public SequencedSet<OnnxParameter> onnxOutputs() {
24435             return onnxOutputs(SCHEMA);
24436         }
24437 
24438         @Override
24439         public SequencedMap<OnnxParameter, Object> onnxInputs() {
24440             return onnxInputs(SCHEMA, List.of(data(), indices(), updates()));
24441         }
24442 
24443         public Value data() {
24444             return operands().get(0);
24445         }
24446 
24447         public Value indices() {
24448             return operands().get(1);
24449         }
24450 
24451         public Value updates() {
24452             return operands().get(2);
24453         }
24454 
24455         public java.util.Optional<String> reduction() {
24456             String reduction = Attribute.reduction.access(String.class, onnxAttributes);
24457             return java.util.Optional.ofNullable(reduction);
24458         }
24459 
24460     }
24461 
24462     public static ScatterND ScatterND(TypeElement resultType, Value data, Value indices, Value updates, java.util.Optional<String> reduction) {
24463         return new ScatterND(resultType, data, indices, updates, reduction);
24464     }
24465 
24466     @OpFactory.OpDeclaration(Selu.NAME)
24467     public static final class Selu extends OnnxOp {
24468         public static final String NAME = "Selu";
24469 
24470         public enum Attribute implements OnnxAttribute {
24471             alpha(Float.class, true, 1.6732632f),
24472             gamma(Float.class, true, 1.050701f),
24473             ;
24474 
24475                 final Class<?> t;
24476                 final boolean optional;
24477                 final Object defaultValue;
24478 
24479                 Attribute(Class<?> type, boolean optional, Object defaultValue) {
24480                     this.t = type;
24481                     this.optional = optional;
24482                     this.defaultValue = defaultValue;
24483                     assert optional || defaultValue == null;
24484                 }
24485 
24486                 public Class<?> type() {
24487                     return t;
24488                 }
24489 
24490                 public boolean isOptional() {
24491                     return optional;
24492                 }
24493 
24494                 public Object defaultValue() {
24495                     return defaultValue;
24496                 }
24497         }
24498 
24499         public enum TypeConstraint implements OnnxTypeConstraint {
24500             T(new OnnxType.TypeVariable("T", List.of(OnnxType.tensor(OnnxType.bfloat16()), OnnxType.tensor(OnnxType.float16()), OnnxType.tensor(OnnxType.float32()), OnnxType.tensor(OnnxType.float64())))),
24501             ;
24502 
24503             final OnnxType.TypeVariable typeVariable;
24504 
24505             TypeConstraint(OnnxType.TypeVariable typeVariable) {
24506                 assert typeVariable.name().equals(name());
24507                 this.typeVariable = typeVariable;
24508             }
24509 
24510             @Override
24511             public OnnxType.TypeVariable typeVariable() {
24512                 return typeVariable;
24513             }
24514         }
24515 
24516         public enum InputParameter implements OnnxParameter {
24517             X(TypeConstraint.T.typeVariable(), Quantifier.REQUIRED),
24518             ;
24519 
24520             final OnnxType type;
24521             final Quantifier quantifier;
24522 
24523             InputParameter(OnnxType type, Quantifier quantifier) {
24524                 this.type = type;
24525                 this.quantifier = quantifier;
24526             }
24527 
24528             @Override
24529             public OnnxType type() {
24530                 return type;
24531             }
24532 
24533             @Override
24534             public Quantifier quantifier() {
24535                 return quantifier;
24536             }
24537         }
24538 
24539         public enum OutputParameter implements OnnxParameter {
24540             Y(TypeConstraint.T.typeVariable(), Quantifier.REQUIRED),
24541             ;
24542 
24543             final OnnxType type;
24544             final Quantifier quantifier;
24545 
24546             OutputParameter(OnnxType type, Quantifier quantifier) {
24547                 this.type = type;
24548                 this.quantifier = quantifier;
24549             }
24550 
24551             @Override
24552             public OnnxType type() {
24553                 return type;
24554             }
24555 
24556             @Override
24557             public Quantifier quantifier() {
24558                 return quantifier;
24559             }
24560         }
24561 
24562         public static final OnnxSchema SCHEMA = new OnnxSchemaRecord(
24563                 NAME,
24564                 List.of(Attribute.values()),
24565                 List.of(TypeConstraint.values()),
24566                 List.of(InputParameter.values()),
24567                 List.of(OutputParameter.values())
24568         );
24569 
24570         public Selu(ExternalizedOp def) {
24571             super(SCHEMA, def);
24572         }
24573 
24574         Selu(Selu that, CopyContext cc) {
24575             super(that, cc);
24576         }
24577 
24578         @Override
24579         public Selu transform(CopyContext cc, OpTransformer ot) {
24580             return new Selu(this, cc);
24581         }
24582 
24583         Selu(TypeElement resultType, Value X, java.util.Optional<Float> alpha, java.util.Optional<Float> gamma) {
24584             super(SCHEMA, resultType, Set.of(), List.of(X), List.of(alpha, gamma));
24585         }
24586 
24587         @Override
24588         public SequencedSet<OnnxParameter> onnxOutputs() {
24589             return onnxOutputs(SCHEMA);
24590         }
24591 
24592         @Override
24593         public SequencedMap<OnnxParameter, Object> onnxInputs() {
24594             return onnxInputs(SCHEMA, List.of(X()));
24595         }
24596 
24597         public Value X() {
24598             return operands().get(0);
24599         }
24600 
24601         public java.util.Optional<Float> alpha() {
24602             Float alpha = Attribute.alpha.access(Float.class, onnxAttributes);
24603             return java.util.Optional.ofNullable(alpha);
24604         }
24605 
24606         public java.util.Optional<Float> gamma() {
24607             Float gamma = Attribute.gamma.access(Float.class, onnxAttributes);
24608             return java.util.Optional.ofNullable(gamma);
24609         }
24610 
24611     }
24612 
24613     public static Selu Selu(TypeElement resultType, Value X, java.util.Optional<Float> alpha, java.util.Optional<Float> gamma) {
24614         return new Selu(resultType, X, alpha, gamma);
24615     }
24616 
24617     @OpFactory.OpDeclaration(SequenceAt.NAME)
24618     public static final class SequenceAt extends OnnxOp {
24619         public static final String NAME = "SequenceAt";
24620 
24621         public enum Attribute implements OnnxAttribute.None { }
24622 
24623         public enum TypeConstraint implements OnnxTypeConstraint {
24624             S(new OnnxType.TypeVariable("S", List.of(OnnxType.seq(OnnxType.tensor(OnnxType.uint8())), OnnxType.seq(OnnxType.tensor(OnnxType.uint16())), OnnxType.seq(OnnxType.tensor(OnnxType.uint32())), OnnxType.seq(OnnxType.tensor(OnnxType.uint64())), OnnxType.seq(OnnxType.tensor(OnnxType.int8())), OnnxType.seq(OnnxType.tensor(OnnxType.int16())), OnnxType.seq(OnnxType.tensor(OnnxType.int32())), OnnxType.seq(OnnxType.tensor(OnnxType.int64())), OnnxType.seq(OnnxType.tensor(OnnxType.float16())), OnnxType.seq(OnnxType.tensor(OnnxType.float32())), OnnxType.seq(OnnxType.tensor(OnnxType.float64())), OnnxType.seq(OnnxType.tensor(OnnxType.string())), OnnxType.seq(OnnxType.tensor(OnnxType.bool())), OnnxType.seq(OnnxType.tensor(OnnxType.complex64())), OnnxType.seq(OnnxType.tensor(OnnxType.complex128()))))),
24625             T(new OnnxType.TypeVariable("T", List.of(OnnxType.tensor(OnnxType.uint8()), OnnxType.tensor(OnnxType.uint16()), OnnxType.tensor(OnnxType.uint32()), OnnxType.tensor(OnnxType.uint64()), OnnxType.tensor(OnnxType.int8()), OnnxType.tensor(OnnxType.int16()), OnnxType.tensor(OnnxType.int32()), OnnxType.tensor(OnnxType.int64()), OnnxType.tensor(OnnxType.float16()), OnnxType.tensor(OnnxType.float32()), OnnxType.tensor(OnnxType.float64()), OnnxType.tensor(OnnxType.string()), OnnxType.tensor(OnnxType.bool()), OnnxType.tensor(OnnxType.complex64()), OnnxType.tensor(OnnxType.complex128())))),
24626             I(new OnnxType.TypeVariable("I", List.of(OnnxType.tensor(OnnxType.int32()), OnnxType.tensor(OnnxType.int64())))),
24627             ;
24628 
24629             final OnnxType.TypeVariable typeVariable;
24630 
24631             TypeConstraint(OnnxType.TypeVariable typeVariable) {
24632                 assert typeVariable.name().equals(name());
24633                 this.typeVariable = typeVariable;
24634             }
24635 
24636             @Override
24637             public OnnxType.TypeVariable typeVariable() {
24638                 return typeVariable;
24639             }
24640         }
24641 
24642         public enum InputParameter implements OnnxParameter {
24643             input_sequence(TypeConstraint.S.typeVariable(), Quantifier.REQUIRED),
24644             position(TypeConstraint.I.typeVariable(), Quantifier.REQUIRED),
24645             ;
24646 
24647             final OnnxType type;
24648             final Quantifier quantifier;
24649 
24650             InputParameter(OnnxType type, Quantifier quantifier) {
24651                 this.type = type;
24652                 this.quantifier = quantifier;
24653             }
24654 
24655             @Override
24656             public OnnxType type() {
24657                 return type;
24658             }
24659 
24660             @Override
24661             public Quantifier quantifier() {
24662                 return quantifier;
24663             }
24664         }
24665 
24666         public enum OutputParameter implements OnnxParameter {
24667             tensor(TypeConstraint.T.typeVariable(), Quantifier.REQUIRED),
24668             ;
24669 
24670             final OnnxType type;
24671             final Quantifier quantifier;
24672 
24673             OutputParameter(OnnxType type, Quantifier quantifier) {
24674                 this.type = type;
24675                 this.quantifier = quantifier;
24676             }
24677 
24678             @Override
24679             public OnnxType type() {
24680                 return type;
24681             }
24682 
24683             @Override
24684             public Quantifier quantifier() {
24685                 return quantifier;
24686             }
24687         }
24688 
24689         public static final OnnxSchema SCHEMA = new OnnxSchemaRecord(
24690                 NAME,
24691                 List.of(Attribute.values()),
24692                 List.of(TypeConstraint.values()),
24693                 List.of(InputParameter.values()),
24694                 List.of(OutputParameter.values())
24695         );
24696 
24697         public SequenceAt(ExternalizedOp def) {
24698             super(SCHEMA, def);
24699         }
24700 
24701         SequenceAt(SequenceAt that, CopyContext cc) {
24702             super(that, cc);
24703         }
24704 
24705         @Override
24706         public SequenceAt transform(CopyContext cc, OpTransformer ot) {
24707             return new SequenceAt(this, cc);
24708         }
24709 
24710         SequenceAt(TypeElement resultType, Value input_sequence, Value position) {
24711             super(SCHEMA, resultType, Set.of(), List.of(input_sequence, position), List.of());
24712         }
24713 
24714         @Override
24715         public SequencedSet<OnnxParameter> onnxOutputs() {
24716             return onnxOutputs(SCHEMA);
24717         }
24718 
24719         @Override
24720         public SequencedMap<OnnxParameter, Object> onnxInputs() {
24721             return onnxInputs(SCHEMA, List.of(input_sequence(), position()));
24722         }
24723 
24724         public Value input_sequence() {
24725             return operands().get(0);
24726         }
24727 
24728         public Value position() {
24729             return operands().get(1);
24730         }
24731 
24732     }
24733 
24734     public static SequenceAt SequenceAt(TypeElement resultType, Value input_sequence, Value position) {
24735         return new SequenceAt(resultType, input_sequence, position);
24736     }
24737 
24738     @OpFactory.OpDeclaration(SequenceConstruct.NAME)
24739     public static final class SequenceConstruct extends OnnxOp {
24740         public static final String NAME = "SequenceConstruct";
24741 
24742         public enum Attribute implements OnnxAttribute.None { }
24743 
24744         public enum TypeConstraint implements OnnxTypeConstraint {
24745             T(new OnnxType.TypeVariable("T", List.of(OnnxType.tensor(OnnxType.uint8()), OnnxType.tensor(OnnxType.uint16()), OnnxType.tensor(OnnxType.uint32()), OnnxType.tensor(OnnxType.uint64()), OnnxType.tensor(OnnxType.int8()), OnnxType.tensor(OnnxType.int16()), OnnxType.tensor(OnnxType.int32()), OnnxType.tensor(OnnxType.int64()), OnnxType.tensor(OnnxType.float16()), OnnxType.tensor(OnnxType.float32()), OnnxType.tensor(OnnxType.float64()), OnnxType.tensor(OnnxType.string()), OnnxType.tensor(OnnxType.bool()), OnnxType.tensor(OnnxType.complex64()), OnnxType.tensor(OnnxType.complex128())))),
24746             S(new OnnxType.TypeVariable("S", List.of(OnnxType.seq(OnnxType.tensor(OnnxType.uint8())), OnnxType.seq(OnnxType.tensor(OnnxType.uint16())), OnnxType.seq(OnnxType.tensor(OnnxType.uint32())), OnnxType.seq(OnnxType.tensor(OnnxType.uint64())), OnnxType.seq(OnnxType.tensor(OnnxType.int8())), OnnxType.seq(OnnxType.tensor(OnnxType.int16())), OnnxType.seq(OnnxType.tensor(OnnxType.int32())), OnnxType.seq(OnnxType.tensor(OnnxType.int64())), OnnxType.seq(OnnxType.tensor(OnnxType.float16())), OnnxType.seq(OnnxType.tensor(OnnxType.float32())), OnnxType.seq(OnnxType.tensor(OnnxType.float64())), OnnxType.seq(OnnxType.tensor(OnnxType.string())), OnnxType.seq(OnnxType.tensor(OnnxType.bool())), OnnxType.seq(OnnxType.tensor(OnnxType.complex64())), OnnxType.seq(OnnxType.tensor(OnnxType.complex128()))))),
24747             ;
24748 
24749             final OnnxType.TypeVariable typeVariable;
24750 
24751             TypeConstraint(OnnxType.TypeVariable typeVariable) {
24752                 assert typeVariable.name().equals(name());
24753                 this.typeVariable = typeVariable;
24754             }
24755 
24756             @Override
24757             public OnnxType.TypeVariable typeVariable() {
24758                 return typeVariable;
24759             }
24760         }
24761 
24762         public enum InputParameter implements OnnxParameter {
24763             inputs(TypeConstraint.T.typeVariable(), Quantifier.VARIADIC),
24764             ;
24765 
24766             final OnnxType type;
24767             final Quantifier quantifier;
24768 
24769             InputParameter(OnnxType type, Quantifier quantifier) {
24770                 this.type = type;
24771                 this.quantifier = quantifier;
24772             }
24773 
24774             @Override
24775             public OnnxType type() {
24776                 return type;
24777             }
24778 
24779             @Override
24780             public Quantifier quantifier() {
24781                 return quantifier;
24782             }
24783         }
24784 
24785         public enum OutputParameter implements OnnxParameter {
24786             output_sequence(TypeConstraint.S.typeVariable(), Quantifier.REQUIRED),
24787             ;
24788 
24789             final OnnxType type;
24790             final Quantifier quantifier;
24791 
24792             OutputParameter(OnnxType type, Quantifier quantifier) {
24793                 this.type = type;
24794                 this.quantifier = quantifier;
24795             }
24796 
24797             @Override
24798             public OnnxType type() {
24799                 return type;
24800             }
24801 
24802             @Override
24803             public Quantifier quantifier() {
24804                 return quantifier;
24805             }
24806         }
24807 
24808         public static final OnnxSchema SCHEMA = new OnnxSchemaRecord(
24809                 NAME,
24810                 List.of(Attribute.values()),
24811                 List.of(TypeConstraint.values()),
24812                 List.of(InputParameter.values()),
24813                 List.of(OutputParameter.values())
24814         );
24815 
24816         public SequenceConstruct(ExternalizedOp def) {
24817             super(SCHEMA, def);
24818         }
24819 
24820         SequenceConstruct(SequenceConstruct that, CopyContext cc) {
24821             super(that, cc);
24822         }
24823 
24824         @Override
24825         public SequenceConstruct transform(CopyContext cc, OpTransformer ot) {
24826             return new SequenceConstruct(this, cc);
24827         }
24828 
24829         SequenceConstruct(TypeElement resultType, List<Value> inputs) {
24830             super(SCHEMA, resultType, Set.of(), List.of(inputs), List.of());
24831         }
24832 
24833         @Override
24834         public SequencedSet<OnnxParameter> onnxOutputs() {
24835             return onnxOutputs(SCHEMA);
24836         }
24837 
24838         @Override
24839         public SequencedMap<OnnxParameter, Object> onnxInputs() {
24840             return onnxInputs(SCHEMA, List.of(inputs()));
24841         }
24842 
24843         public List<Value> inputs() {
24844             return operands();
24845         }
24846 
24847     }
24848 
24849     public static SequenceConstruct SequenceConstruct(TypeElement resultType, List<Value> inputs) {
24850         return new SequenceConstruct(resultType, inputs);
24851     }
24852 
24853     @OpFactory.OpDeclaration(SequenceEmpty.NAME)
24854     public static final class SequenceEmpty extends OnnxOp {
24855         public static final String NAME = "SequenceEmpty";
24856 
24857         public enum Attribute implements OnnxAttribute {
24858             dtype(Integer.class, true, null),
24859             ;
24860 
24861                 final Class<?> t;
24862                 final boolean optional;
24863                 final Object defaultValue;
24864 
24865                 Attribute(Class<?> type, boolean optional, Object defaultValue) {
24866                     this.t = type;
24867                     this.optional = optional;
24868                     this.defaultValue = defaultValue;
24869                     assert optional || defaultValue == null;
24870                 }
24871 
24872                 public Class<?> type() {
24873                     return t;
24874                 }
24875 
24876                 public boolean isOptional() {
24877                     return optional;
24878                 }
24879 
24880                 public Object defaultValue() {
24881                     return defaultValue;
24882                 }
24883         }
24884 
24885         public enum TypeConstraint implements OnnxTypeConstraint {
24886             S(new OnnxType.TypeVariable("S", List.of(OnnxType.seq(OnnxType.tensor(OnnxType.uint8())), OnnxType.seq(OnnxType.tensor(OnnxType.uint16())), OnnxType.seq(OnnxType.tensor(OnnxType.uint32())), OnnxType.seq(OnnxType.tensor(OnnxType.uint64())), OnnxType.seq(OnnxType.tensor(OnnxType.int8())), OnnxType.seq(OnnxType.tensor(OnnxType.int16())), OnnxType.seq(OnnxType.tensor(OnnxType.int32())), OnnxType.seq(OnnxType.tensor(OnnxType.int64())), OnnxType.seq(OnnxType.tensor(OnnxType.float16())), OnnxType.seq(OnnxType.tensor(OnnxType.float32())), OnnxType.seq(OnnxType.tensor(OnnxType.float64())), OnnxType.seq(OnnxType.tensor(OnnxType.string())), OnnxType.seq(OnnxType.tensor(OnnxType.bool())), OnnxType.seq(OnnxType.tensor(OnnxType.complex64())), OnnxType.seq(OnnxType.tensor(OnnxType.complex128()))))),
24887             ;
24888 
24889             final OnnxType.TypeVariable typeVariable;
24890 
24891             TypeConstraint(OnnxType.TypeVariable typeVariable) {
24892                 assert typeVariable.name().equals(name());
24893                 this.typeVariable = typeVariable;
24894             }
24895 
24896             @Override
24897             public OnnxType.TypeVariable typeVariable() {
24898                 return typeVariable;
24899             }
24900         }
24901 
24902         public enum InputParameter implements OnnxParameter.None { }
24903 
24904         public enum OutputParameter implements OnnxParameter {
24905             output(TypeConstraint.S.typeVariable(), Quantifier.REQUIRED),
24906             ;
24907 
24908             final OnnxType type;
24909             final Quantifier quantifier;
24910 
24911             OutputParameter(OnnxType type, Quantifier quantifier) {
24912                 this.type = type;
24913                 this.quantifier = quantifier;
24914             }
24915 
24916             @Override
24917             public OnnxType type() {
24918                 return type;
24919             }
24920 
24921             @Override
24922             public Quantifier quantifier() {
24923                 return quantifier;
24924             }
24925         }
24926 
24927         public static final OnnxSchema SCHEMA = new OnnxSchemaRecord(
24928                 NAME,
24929                 List.of(Attribute.values()),
24930                 List.of(TypeConstraint.values()),
24931                 List.of(InputParameter.values()),
24932                 List.of(OutputParameter.values())
24933         );
24934 
24935         public SequenceEmpty(ExternalizedOp def) {
24936             super(SCHEMA, def);
24937         }
24938 
24939         SequenceEmpty(SequenceEmpty that, CopyContext cc) {
24940             super(that, cc);
24941         }
24942 
24943         @Override
24944         public SequenceEmpty transform(CopyContext cc, OpTransformer ot) {
24945             return new SequenceEmpty(this, cc);
24946         }
24947 
24948         SequenceEmpty(TypeElement resultType, java.util.Optional<Integer> dtype) {
24949             super(SCHEMA, resultType, Set.of(), List.of(), List.of(dtype));
24950         }
24951 
24952         @Override
24953         public SequencedSet<OnnxParameter> onnxOutputs() {
24954             return onnxOutputs(SCHEMA);
24955         }
24956 
24957         @Override
24958         public SequencedMap<OnnxParameter, Object> onnxInputs() {
24959             return onnxInputs(SCHEMA, List.of());
24960         }
24961 
24962         public java.util.Optional<Integer> dtype() {
24963             Integer dtype = Attribute.dtype.access(Integer.class, onnxAttributes);
24964             return java.util.Optional.ofNullable(dtype);
24965         }
24966 
24967     }
24968 
24969     public static SequenceEmpty SequenceEmpty(TypeElement resultType, java.util.Optional<Integer> dtype) {
24970         return new SequenceEmpty(resultType, dtype);
24971     }
24972 
24973     @OpFactory.OpDeclaration(SequenceErase.NAME)
24974     public static final class SequenceErase extends OnnxOp {
24975         public static final String NAME = "SequenceErase";
24976 
24977         public enum Attribute implements OnnxAttribute.None { }
24978 
24979         public enum TypeConstraint implements OnnxTypeConstraint {
24980             S(new OnnxType.TypeVariable("S", List.of(OnnxType.seq(OnnxType.tensor(OnnxType.uint8())), OnnxType.seq(OnnxType.tensor(OnnxType.uint16())), OnnxType.seq(OnnxType.tensor(OnnxType.uint32())), OnnxType.seq(OnnxType.tensor(OnnxType.uint64())), OnnxType.seq(OnnxType.tensor(OnnxType.int8())), OnnxType.seq(OnnxType.tensor(OnnxType.int16())), OnnxType.seq(OnnxType.tensor(OnnxType.int32())), OnnxType.seq(OnnxType.tensor(OnnxType.int64())), OnnxType.seq(OnnxType.tensor(OnnxType.float16())), OnnxType.seq(OnnxType.tensor(OnnxType.float32())), OnnxType.seq(OnnxType.tensor(OnnxType.float64())), OnnxType.seq(OnnxType.tensor(OnnxType.string())), OnnxType.seq(OnnxType.tensor(OnnxType.bool())), OnnxType.seq(OnnxType.tensor(OnnxType.complex64())), OnnxType.seq(OnnxType.tensor(OnnxType.complex128()))))),
24981             I(new OnnxType.TypeVariable("I", List.of(OnnxType.tensor(OnnxType.int32()), OnnxType.tensor(OnnxType.int64())))),
24982             ;
24983 
24984             final OnnxType.TypeVariable typeVariable;
24985 
24986             TypeConstraint(OnnxType.TypeVariable typeVariable) {
24987                 assert typeVariable.name().equals(name());
24988                 this.typeVariable = typeVariable;
24989             }
24990 
24991             @Override
24992             public OnnxType.TypeVariable typeVariable() {
24993                 return typeVariable;
24994             }
24995         }
24996 
24997         public enum InputParameter implements OnnxParameter {
24998             input_sequence(TypeConstraint.S.typeVariable(), Quantifier.REQUIRED),
24999             position(TypeConstraint.I.typeVariable(), Quantifier.OPTIONAL),
25000             ;
25001 
25002             final OnnxType type;
25003             final Quantifier quantifier;
25004 
25005             InputParameter(OnnxType type, Quantifier quantifier) {
25006                 this.type = type;
25007                 this.quantifier = quantifier;
25008             }
25009 
25010             @Override
25011             public OnnxType type() {
25012                 return type;
25013             }
25014 
25015             @Override
25016             public Quantifier quantifier() {
25017                 return quantifier;
25018             }
25019         }
25020 
25021         public enum OutputParameter implements OnnxParameter {
25022             output_sequence(TypeConstraint.S.typeVariable(), Quantifier.REQUIRED),
25023             ;
25024 
25025             final OnnxType type;
25026             final Quantifier quantifier;
25027 
25028             OutputParameter(OnnxType type, Quantifier quantifier) {
25029                 this.type = type;
25030                 this.quantifier = quantifier;
25031             }
25032 
25033             @Override
25034             public OnnxType type() {
25035                 return type;
25036             }
25037 
25038             @Override
25039             public Quantifier quantifier() {
25040                 return quantifier;
25041             }
25042         }
25043 
25044         public static final OnnxSchema SCHEMA = new OnnxSchemaRecord(
25045                 NAME,
25046                 List.of(Attribute.values()),
25047                 List.of(TypeConstraint.values()),
25048                 List.of(InputParameter.values()),
25049                 List.of(OutputParameter.values())
25050         );
25051 
25052         public SequenceErase(ExternalizedOp def) {
25053             super(SCHEMA, def);
25054         }
25055 
25056         SequenceErase(SequenceErase that, CopyContext cc) {
25057             super(that, cc);
25058         }
25059 
25060         @Override
25061         public SequenceErase transform(CopyContext cc, OpTransformer ot) {
25062             return new SequenceErase(this, cc);
25063         }
25064 
25065         SequenceErase(TypeElement resultType, Value input_sequence, java.util.Optional<Value> position) {
25066             super(SCHEMA, resultType, Set.of(), List.of(input_sequence, position), List.of());
25067         }
25068 
25069         @Override
25070         public SequencedSet<OnnxParameter> onnxOutputs() {
25071             return onnxOutputs(SCHEMA);
25072         }
25073 
25074         @Override
25075         public SequencedMap<OnnxParameter, Object> onnxInputs() {
25076             return onnxInputs(SCHEMA, List.of(input_sequence(), position()));
25077         }
25078 
25079         public Value input_sequence() {
25080             return operands().get(0);
25081         }
25082 
25083         public java.util.Optional<Value> position() {
25084             int i = optionalInputArguments.indexOf(InputParameter.position);
25085             return i != -1 ? java.util.Optional.of(operands().get(1 + i)) : java.util.Optional.empty();
25086         }
25087 
25088     }
25089 
25090     public static SequenceErase SequenceErase(TypeElement resultType, Value input_sequence, java.util.Optional<Value> position) {
25091         return new SequenceErase(resultType, input_sequence, position);
25092     }
25093 
25094     @OpFactory.OpDeclaration(SequenceInsert.NAME)
25095     public static final class SequenceInsert extends OnnxOp {
25096         public static final String NAME = "SequenceInsert";
25097 
25098         public enum Attribute implements OnnxAttribute.None { }
25099 
25100         public enum TypeConstraint implements OnnxTypeConstraint {
25101             T(new OnnxType.TypeVariable("T", List.of(OnnxType.tensor(OnnxType.uint8()), OnnxType.tensor(OnnxType.uint16()), OnnxType.tensor(OnnxType.uint32()), OnnxType.tensor(OnnxType.uint64()), OnnxType.tensor(OnnxType.int8()), OnnxType.tensor(OnnxType.int16()), OnnxType.tensor(OnnxType.int32()), OnnxType.tensor(OnnxType.int64()), OnnxType.tensor(OnnxType.float16()), OnnxType.tensor(OnnxType.float32()), OnnxType.tensor(OnnxType.float64()), OnnxType.tensor(OnnxType.string()), OnnxType.tensor(OnnxType.bool()), OnnxType.tensor(OnnxType.complex64()), OnnxType.tensor(OnnxType.complex128())))),
25102             S(new OnnxType.TypeVariable("S", List.of(OnnxType.seq(OnnxType.tensor(OnnxType.uint8())), OnnxType.seq(OnnxType.tensor(OnnxType.uint16())), OnnxType.seq(OnnxType.tensor(OnnxType.uint32())), OnnxType.seq(OnnxType.tensor(OnnxType.uint64())), OnnxType.seq(OnnxType.tensor(OnnxType.int8())), OnnxType.seq(OnnxType.tensor(OnnxType.int16())), OnnxType.seq(OnnxType.tensor(OnnxType.int32())), OnnxType.seq(OnnxType.tensor(OnnxType.int64())), OnnxType.seq(OnnxType.tensor(OnnxType.float16())), OnnxType.seq(OnnxType.tensor(OnnxType.float32())), OnnxType.seq(OnnxType.tensor(OnnxType.float64())), OnnxType.seq(OnnxType.tensor(OnnxType.string())), OnnxType.seq(OnnxType.tensor(OnnxType.bool())), OnnxType.seq(OnnxType.tensor(OnnxType.complex64())), OnnxType.seq(OnnxType.tensor(OnnxType.complex128()))))),
25103             I(new OnnxType.TypeVariable("I", List.of(OnnxType.tensor(OnnxType.int32()), OnnxType.tensor(OnnxType.int64())))),
25104             ;
25105 
25106             final OnnxType.TypeVariable typeVariable;
25107 
25108             TypeConstraint(OnnxType.TypeVariable typeVariable) {
25109                 assert typeVariable.name().equals(name());
25110                 this.typeVariable = typeVariable;
25111             }
25112 
25113             @Override
25114             public OnnxType.TypeVariable typeVariable() {
25115                 return typeVariable;
25116             }
25117         }
25118 
25119         public enum InputParameter implements OnnxParameter {
25120             input_sequence(TypeConstraint.S.typeVariable(), Quantifier.REQUIRED),
25121             tensor(TypeConstraint.T.typeVariable(), Quantifier.REQUIRED),
25122             position(TypeConstraint.I.typeVariable(), Quantifier.OPTIONAL),
25123             ;
25124 
25125             final OnnxType type;
25126             final Quantifier quantifier;
25127 
25128             InputParameter(OnnxType type, Quantifier quantifier) {
25129                 this.type = type;
25130                 this.quantifier = quantifier;
25131             }
25132 
25133             @Override
25134             public OnnxType type() {
25135                 return type;
25136             }
25137 
25138             @Override
25139             public Quantifier quantifier() {
25140                 return quantifier;
25141             }
25142         }
25143 
25144         public enum OutputParameter implements OnnxParameter {
25145             output_sequence(TypeConstraint.S.typeVariable(), Quantifier.REQUIRED),
25146             ;
25147 
25148             final OnnxType type;
25149             final Quantifier quantifier;
25150 
25151             OutputParameter(OnnxType type, Quantifier quantifier) {
25152                 this.type = type;
25153                 this.quantifier = quantifier;
25154             }
25155 
25156             @Override
25157             public OnnxType type() {
25158                 return type;
25159             }
25160 
25161             @Override
25162             public Quantifier quantifier() {
25163                 return quantifier;
25164             }
25165         }
25166 
25167         public static final OnnxSchema SCHEMA = new OnnxSchemaRecord(
25168                 NAME,
25169                 List.of(Attribute.values()),
25170                 List.of(TypeConstraint.values()),
25171                 List.of(InputParameter.values()),
25172                 List.of(OutputParameter.values())
25173         );
25174 
25175         public SequenceInsert(ExternalizedOp def) {
25176             super(SCHEMA, def);
25177         }
25178 
25179         SequenceInsert(SequenceInsert that, CopyContext cc) {
25180             super(that, cc);
25181         }
25182 
25183         @Override
25184         public SequenceInsert transform(CopyContext cc, OpTransformer ot) {
25185             return new SequenceInsert(this, cc);
25186         }
25187 
25188         SequenceInsert(TypeElement resultType, Value input_sequence, Value tensor, java.util.Optional<Value> position) {
25189             super(SCHEMA, resultType, Set.of(), List.of(input_sequence, tensor, position), List.of());
25190         }
25191 
25192         @Override
25193         public SequencedSet<OnnxParameter> onnxOutputs() {
25194             return onnxOutputs(SCHEMA);
25195         }
25196 
25197         @Override
25198         public SequencedMap<OnnxParameter, Object> onnxInputs() {
25199             return onnxInputs(SCHEMA, List.of(input_sequence(), tensor(), position()));
25200         }
25201 
25202         public Value input_sequence() {
25203             return operands().get(0);
25204         }
25205 
25206         public Value tensor() {
25207             return operands().get(1);
25208         }
25209 
25210         public java.util.Optional<Value> position() {
25211             int i = optionalInputArguments.indexOf(InputParameter.position);
25212             return i != -1 ? java.util.Optional.of(operands().get(2 + i)) : java.util.Optional.empty();
25213         }
25214 
25215     }
25216 
25217     public static SequenceInsert SequenceInsert(TypeElement resultType, Value input_sequence, Value tensor, java.util.Optional<Value> position) {
25218         return new SequenceInsert(resultType, input_sequence, tensor, position);
25219     }
25220 
25221     @OpFactory.OpDeclaration(SequenceLength.NAME)
25222     public static final class SequenceLength extends OnnxOp {
25223         public static final String NAME = "SequenceLength";
25224 
25225         public enum Attribute implements OnnxAttribute.None { }
25226 
25227         public enum TypeConstraint implements OnnxTypeConstraint {
25228             S(new OnnxType.TypeVariable("S", List.of(OnnxType.seq(OnnxType.tensor(OnnxType.uint8())), OnnxType.seq(OnnxType.tensor(OnnxType.uint16())), OnnxType.seq(OnnxType.tensor(OnnxType.uint32())), OnnxType.seq(OnnxType.tensor(OnnxType.uint64())), OnnxType.seq(OnnxType.tensor(OnnxType.int8())), OnnxType.seq(OnnxType.tensor(OnnxType.int16())), OnnxType.seq(OnnxType.tensor(OnnxType.int32())), OnnxType.seq(OnnxType.tensor(OnnxType.int64())), OnnxType.seq(OnnxType.tensor(OnnxType.float16())), OnnxType.seq(OnnxType.tensor(OnnxType.float32())), OnnxType.seq(OnnxType.tensor(OnnxType.float64())), OnnxType.seq(OnnxType.tensor(OnnxType.string())), OnnxType.seq(OnnxType.tensor(OnnxType.bool())), OnnxType.seq(OnnxType.tensor(OnnxType.complex64())), OnnxType.seq(OnnxType.tensor(OnnxType.complex128()))))),
25229             I(new OnnxType.TypeVariable("I", List.of(OnnxType.tensor(OnnxType.int64())))),
25230             ;
25231 
25232             final OnnxType.TypeVariable typeVariable;
25233 
25234             TypeConstraint(OnnxType.TypeVariable typeVariable) {
25235                 assert typeVariable.name().equals(name());
25236                 this.typeVariable = typeVariable;
25237             }
25238 
25239             @Override
25240             public OnnxType.TypeVariable typeVariable() {
25241                 return typeVariable;
25242             }
25243         }
25244 
25245         public enum InputParameter implements OnnxParameter {
25246             input_sequence(TypeConstraint.S.typeVariable(), Quantifier.REQUIRED),
25247             ;
25248 
25249             final OnnxType type;
25250             final Quantifier quantifier;
25251 
25252             InputParameter(OnnxType type, Quantifier quantifier) {
25253                 this.type = type;
25254                 this.quantifier = quantifier;
25255             }
25256 
25257             @Override
25258             public OnnxType type() {
25259                 return type;
25260             }
25261 
25262             @Override
25263             public Quantifier quantifier() {
25264                 return quantifier;
25265             }
25266         }
25267 
25268         public enum OutputParameter implements OnnxParameter {
25269             length(TypeConstraint.I.typeVariable(), Quantifier.REQUIRED),
25270             ;
25271 
25272             final OnnxType type;
25273             final Quantifier quantifier;
25274 
25275             OutputParameter(OnnxType type, Quantifier quantifier) {
25276                 this.type = type;
25277                 this.quantifier = quantifier;
25278             }
25279 
25280             @Override
25281             public OnnxType type() {
25282                 return type;
25283             }
25284 
25285             @Override
25286             public Quantifier quantifier() {
25287                 return quantifier;
25288             }
25289         }
25290 
25291         public static final OnnxSchema SCHEMA = new OnnxSchemaRecord(
25292                 NAME,
25293                 List.of(Attribute.values()),
25294                 List.of(TypeConstraint.values()),
25295                 List.of(InputParameter.values()),
25296                 List.of(OutputParameter.values())
25297         );
25298 
25299         public SequenceLength(ExternalizedOp def) {
25300             super(SCHEMA, def);
25301         }
25302 
25303         SequenceLength(SequenceLength that, CopyContext cc) {
25304             super(that, cc);
25305         }
25306 
25307         @Override
25308         public SequenceLength transform(CopyContext cc, OpTransformer ot) {
25309             return new SequenceLength(this, cc);
25310         }
25311 
25312         SequenceLength(TypeElement resultType, Value input_sequence) {
25313             super(SCHEMA, resultType, Set.of(), List.of(input_sequence), List.of());
25314         }
25315 
25316         @Override
25317         public SequencedSet<OnnxParameter> onnxOutputs() {
25318             return onnxOutputs(SCHEMA);
25319         }
25320 
25321         @Override
25322         public SequencedMap<OnnxParameter, Object> onnxInputs() {
25323             return onnxInputs(SCHEMA, List.of(input_sequence()));
25324         }
25325 
25326         public Value input_sequence() {
25327             return operands().get(0);
25328         }
25329 
25330     }
25331 
25332     public static SequenceLength SequenceLength(TypeElement resultType, Value input_sequence) {
25333         return new SequenceLength(resultType, input_sequence);
25334     }
25335 
25336     @OpFactory.OpDeclaration(Shape.NAME)
25337     public static final class Shape extends OnnxOp {
25338         public static final String NAME = "Shape";
25339 
25340         public enum Attribute implements OnnxAttribute {
25341             start(Integer.class, true, 0),
25342             end(Integer.class, true, null),
25343             ;
25344 
25345                 final Class<?> t;
25346                 final boolean optional;
25347                 final Object defaultValue;
25348 
25349                 Attribute(Class<?> type, boolean optional, Object defaultValue) {
25350                     this.t = type;
25351                     this.optional = optional;
25352                     this.defaultValue = defaultValue;
25353                     assert optional || defaultValue == null;
25354                 }
25355 
25356                 public Class<?> type() {
25357                     return t;
25358                 }
25359 
25360                 public boolean isOptional() {
25361                     return optional;
25362                 }
25363 
25364                 public Object defaultValue() {
25365                     return defaultValue;
25366                 }
25367         }
25368 
25369         public enum TypeConstraint implements OnnxTypeConstraint {
25370             T(new OnnxType.TypeVariable("T", List.of(OnnxType.tensor(OnnxType.uint8()), OnnxType.tensor(OnnxType.uint16()), OnnxType.tensor(OnnxType.uint32()), OnnxType.tensor(OnnxType.uint64()), OnnxType.tensor(OnnxType.int8()), OnnxType.tensor(OnnxType.int16()), OnnxType.tensor(OnnxType.int32()), OnnxType.tensor(OnnxType.int64()), OnnxType.tensor(OnnxType.bfloat16()), OnnxType.tensor(OnnxType.float16()), OnnxType.tensor(OnnxType.float32()), OnnxType.tensor(OnnxType.float64()), OnnxType.tensor(OnnxType.string()), OnnxType.tensor(OnnxType.bool()), OnnxType.tensor(OnnxType.complex64()), OnnxType.tensor(OnnxType.complex128()), OnnxType.tensor(OnnxType.float8e4m3fn()), OnnxType.tensor(OnnxType.float8e4m3fnuz()), OnnxType.tensor(OnnxType.float8e5m2()), OnnxType.tensor(OnnxType.float8e5m2fnuz()), OnnxType.tensor(OnnxType.uint4()), OnnxType.tensor(OnnxType.int4()), OnnxType.tensor(OnnxType.float4e2m1())))),
25371             T1(new OnnxType.TypeVariable("T1", List.of(OnnxType.tensor(OnnxType.int64())))),
25372             ;
25373 
25374             final OnnxType.TypeVariable typeVariable;
25375 
25376             TypeConstraint(OnnxType.TypeVariable typeVariable) {
25377                 assert typeVariable.name().equals(name());
25378                 this.typeVariable = typeVariable;
25379             }
25380 
25381             @Override
25382             public OnnxType.TypeVariable typeVariable() {
25383                 return typeVariable;
25384             }
25385         }
25386 
25387         public enum InputParameter implements OnnxParameter {
25388             data(TypeConstraint.T.typeVariable(), Quantifier.REQUIRED),
25389             ;
25390 
25391             final OnnxType type;
25392             final Quantifier quantifier;
25393 
25394             InputParameter(OnnxType type, Quantifier quantifier) {
25395                 this.type = type;
25396                 this.quantifier = quantifier;
25397             }
25398 
25399             @Override
25400             public OnnxType type() {
25401                 return type;
25402             }
25403 
25404             @Override
25405             public Quantifier quantifier() {
25406                 return quantifier;
25407             }
25408         }
25409 
25410         public enum OutputParameter implements OnnxParameter {
25411             shape(TypeConstraint.T1.typeVariable(), Quantifier.REQUIRED),
25412             ;
25413 
25414             final OnnxType type;
25415             final Quantifier quantifier;
25416 
25417             OutputParameter(OnnxType type, Quantifier quantifier) {
25418                 this.type = type;
25419                 this.quantifier = quantifier;
25420             }
25421 
25422             @Override
25423             public OnnxType type() {
25424                 return type;
25425             }
25426 
25427             @Override
25428             public Quantifier quantifier() {
25429                 return quantifier;
25430             }
25431         }
25432 
25433         public static final OnnxSchema SCHEMA = new OnnxSchemaRecord(
25434                 NAME,
25435                 List.of(Attribute.values()),
25436                 List.of(TypeConstraint.values()),
25437                 List.of(InputParameter.values()),
25438                 List.of(OutputParameter.values())
25439         );
25440 
25441         public Shape(ExternalizedOp def) {
25442             super(SCHEMA, def);
25443         }
25444 
25445         Shape(Shape that, CopyContext cc) {
25446             super(that, cc);
25447         }
25448 
25449         @Override
25450         public Shape transform(CopyContext cc, OpTransformer ot) {
25451             return new Shape(this, cc);
25452         }
25453 
25454         Shape(TypeElement resultType, Value data, java.util.Optional<Integer> start, java.util.Optional<Integer> end) {
25455             super(SCHEMA, resultType, Set.of(), List.of(data), List.of(start, end));
25456         }
25457 
25458         @Override
25459         public SequencedSet<OnnxParameter> onnxOutputs() {
25460             return onnxOutputs(SCHEMA);
25461         }
25462 
25463         @Override
25464         public SequencedMap<OnnxParameter, Object> onnxInputs() {
25465             return onnxInputs(SCHEMA, List.of(data()));
25466         }
25467 
25468         public Value data() {
25469             return operands().get(0);
25470         }
25471 
25472         public java.util.Optional<Integer> start() {
25473             Integer start = Attribute.start.access(Integer.class, onnxAttributes);
25474             return java.util.Optional.ofNullable(start);
25475         }
25476 
25477         public java.util.Optional<Integer> end() {
25478             Integer end = Attribute.end.access(Integer.class, onnxAttributes);
25479             return java.util.Optional.ofNullable(end);
25480         }
25481 
25482     }
25483 
25484     public static Shape Shape(TypeElement resultType, Value data, java.util.Optional<Integer> start, java.util.Optional<Integer> end) {
25485         return new Shape(resultType, data, start, end);
25486     }
25487 
25488     @OpFactory.OpDeclaration(Shrink.NAME)
25489     public static final class Shrink extends OnnxOp {
25490         public static final String NAME = "Shrink";
25491 
25492         public enum Attribute implements OnnxAttribute {
25493             lambd(Float.class, true, 0.5f),
25494             bias(Float.class, true, 0.0f),
25495             ;
25496 
25497                 final Class<?> t;
25498                 final boolean optional;
25499                 final Object defaultValue;
25500 
25501                 Attribute(Class<?> type, boolean optional, Object defaultValue) {
25502                     this.t = type;
25503                     this.optional = optional;
25504                     this.defaultValue = defaultValue;
25505                     assert optional || defaultValue == null;
25506                 }
25507 
25508                 public Class<?> type() {
25509                     return t;
25510                 }
25511 
25512                 public boolean isOptional() {
25513                     return optional;
25514                 }
25515 
25516                 public Object defaultValue() {
25517                     return defaultValue;
25518                 }
25519         }
25520 
25521         public enum TypeConstraint implements OnnxTypeConstraint {
25522             T(new OnnxType.TypeVariable("T", List.of(OnnxType.tensor(OnnxType.uint8()), OnnxType.tensor(OnnxType.uint16()), OnnxType.tensor(OnnxType.uint32()), OnnxType.tensor(OnnxType.uint64()), OnnxType.tensor(OnnxType.int8()), OnnxType.tensor(OnnxType.int16()), OnnxType.tensor(OnnxType.int32()), OnnxType.tensor(OnnxType.int64()), OnnxType.tensor(OnnxType.float16()), OnnxType.tensor(OnnxType.float32()), OnnxType.tensor(OnnxType.float64())))),
25523             ;
25524 
25525             final OnnxType.TypeVariable typeVariable;
25526 
25527             TypeConstraint(OnnxType.TypeVariable typeVariable) {
25528                 assert typeVariable.name().equals(name());
25529                 this.typeVariable = typeVariable;
25530             }
25531 
25532             @Override
25533             public OnnxType.TypeVariable typeVariable() {
25534                 return typeVariable;
25535             }
25536         }
25537 
25538         public enum InputParameter implements OnnxParameter {
25539             input(TypeConstraint.T.typeVariable(), Quantifier.REQUIRED),
25540             ;
25541 
25542             final OnnxType type;
25543             final Quantifier quantifier;
25544 
25545             InputParameter(OnnxType type, Quantifier quantifier) {
25546                 this.type = type;
25547                 this.quantifier = quantifier;
25548             }
25549 
25550             @Override
25551             public OnnxType type() {
25552                 return type;
25553             }
25554 
25555             @Override
25556             public Quantifier quantifier() {
25557                 return quantifier;
25558             }
25559         }
25560 
25561         public enum OutputParameter implements OnnxParameter {
25562             output(TypeConstraint.T.typeVariable(), Quantifier.REQUIRED),
25563             ;
25564 
25565             final OnnxType type;
25566             final Quantifier quantifier;
25567 
25568             OutputParameter(OnnxType type, Quantifier quantifier) {
25569                 this.type = type;
25570                 this.quantifier = quantifier;
25571             }
25572 
25573             @Override
25574             public OnnxType type() {
25575                 return type;
25576             }
25577 
25578             @Override
25579             public Quantifier quantifier() {
25580                 return quantifier;
25581             }
25582         }
25583 
25584         public static final OnnxSchema SCHEMA = new OnnxSchemaRecord(
25585                 NAME,
25586                 List.of(Attribute.values()),
25587                 List.of(TypeConstraint.values()),
25588                 List.of(InputParameter.values()),
25589                 List.of(OutputParameter.values())
25590         );
25591 
25592         public Shrink(ExternalizedOp def) {
25593             super(SCHEMA, def);
25594         }
25595 
25596         Shrink(Shrink that, CopyContext cc) {
25597             super(that, cc);
25598         }
25599 
25600         @Override
25601         public Shrink transform(CopyContext cc, OpTransformer ot) {
25602             return new Shrink(this, cc);
25603         }
25604 
25605         Shrink(TypeElement resultType, Value input, java.util.Optional<Float> lambd, java.util.Optional<Float> bias) {
25606             super(SCHEMA, resultType, Set.of(), List.of(input), List.of(lambd, bias));
25607         }
25608 
25609         @Override
25610         public SequencedSet<OnnxParameter> onnxOutputs() {
25611             return onnxOutputs(SCHEMA);
25612         }
25613 
25614         @Override
25615         public SequencedMap<OnnxParameter, Object> onnxInputs() {
25616             return onnxInputs(SCHEMA, List.of(input()));
25617         }
25618 
25619         public Value input() {
25620             return operands().get(0);
25621         }
25622 
25623         public java.util.Optional<Float> lambd() {
25624             Float lambd = Attribute.lambd.access(Float.class, onnxAttributes);
25625             return java.util.Optional.ofNullable(lambd);
25626         }
25627 
25628         public java.util.Optional<Float> bias() {
25629             Float bias = Attribute.bias.access(Float.class, onnxAttributes);
25630             return java.util.Optional.ofNullable(bias);
25631         }
25632 
25633     }
25634 
25635     public static Shrink Shrink(TypeElement resultType, Value input, java.util.Optional<Float> lambd, java.util.Optional<Float> bias) {
25636         return new Shrink(resultType, input, lambd, bias);
25637     }
25638 
25639     @OpFactory.OpDeclaration(Sigmoid.NAME)
25640     public static final class Sigmoid extends OnnxOp {
25641         public static final String NAME = "Sigmoid";
25642 
25643         public enum Attribute implements OnnxAttribute.None { }
25644 
25645         public enum TypeConstraint implements OnnxTypeConstraint {
25646             T(new OnnxType.TypeVariable("T", List.of(OnnxType.tensor(OnnxType.float16()), OnnxType.tensor(OnnxType.float32()), OnnxType.tensor(OnnxType.float64()), OnnxType.tensor(OnnxType.bfloat16())))),
25647             ;
25648 
25649             final OnnxType.TypeVariable typeVariable;
25650 
25651             TypeConstraint(OnnxType.TypeVariable typeVariable) {
25652                 assert typeVariable.name().equals(name());
25653                 this.typeVariable = typeVariable;
25654             }
25655 
25656             @Override
25657             public OnnxType.TypeVariable typeVariable() {
25658                 return typeVariable;
25659             }
25660         }
25661 
25662         public enum InputParameter implements OnnxParameter {
25663             X(TypeConstraint.T.typeVariable(), Quantifier.REQUIRED),
25664             ;
25665 
25666             final OnnxType type;
25667             final Quantifier quantifier;
25668 
25669             InputParameter(OnnxType type, Quantifier quantifier) {
25670                 this.type = type;
25671                 this.quantifier = quantifier;
25672             }
25673 
25674             @Override
25675             public OnnxType type() {
25676                 return type;
25677             }
25678 
25679             @Override
25680             public Quantifier quantifier() {
25681                 return quantifier;
25682             }
25683         }
25684 
25685         public enum OutputParameter implements OnnxParameter {
25686             Y(TypeConstraint.T.typeVariable(), Quantifier.REQUIRED),
25687             ;
25688 
25689             final OnnxType type;
25690             final Quantifier quantifier;
25691 
25692             OutputParameter(OnnxType type, Quantifier quantifier) {
25693                 this.type = type;
25694                 this.quantifier = quantifier;
25695             }
25696 
25697             @Override
25698             public OnnxType type() {
25699                 return type;
25700             }
25701 
25702             @Override
25703             public Quantifier quantifier() {
25704                 return quantifier;
25705             }
25706         }
25707 
25708         public static final OnnxSchema SCHEMA = new OnnxSchemaRecord(
25709                 NAME,
25710                 List.of(Attribute.values()),
25711                 List.of(TypeConstraint.values()),
25712                 List.of(InputParameter.values()),
25713                 List.of(OutputParameter.values())
25714         );
25715 
25716         public Sigmoid(ExternalizedOp def) {
25717             super(SCHEMA, def);
25718         }
25719 
25720         Sigmoid(Sigmoid that, CopyContext cc) {
25721             super(that, cc);
25722         }
25723 
25724         @Override
25725         public Sigmoid transform(CopyContext cc, OpTransformer ot) {
25726             return new Sigmoid(this, cc);
25727         }
25728 
25729         Sigmoid(TypeElement resultType, Value X) {
25730             super(SCHEMA, resultType, Set.of(), List.of(X), List.of());
25731         }
25732 
25733         @Override
25734         public SequencedSet<OnnxParameter> onnxOutputs() {
25735             return onnxOutputs(SCHEMA);
25736         }
25737 
25738         @Override
25739         public SequencedMap<OnnxParameter, Object> onnxInputs() {
25740             return onnxInputs(SCHEMA, List.of(X()));
25741         }
25742 
25743         public Value X() {
25744             return operands().get(0);
25745         }
25746 
25747     }
25748 
25749     public static Sigmoid Sigmoid(TypeElement resultType, Value X) {
25750         return new Sigmoid(resultType, X);
25751     }
25752 
25753     @OpFactory.OpDeclaration(Sign.NAME)
25754     public static final class Sign extends OnnxOp {
25755         public static final String NAME = "Sign";
25756 
25757         public enum Attribute implements OnnxAttribute.None { }
25758 
25759         public enum TypeConstraint implements OnnxTypeConstraint {
25760             T(new OnnxType.TypeVariable("T", List.of(OnnxType.tensor(OnnxType.uint8()), OnnxType.tensor(OnnxType.uint16()), OnnxType.tensor(OnnxType.uint32()), OnnxType.tensor(OnnxType.uint64()), OnnxType.tensor(OnnxType.int8()), OnnxType.tensor(OnnxType.int16()), OnnxType.tensor(OnnxType.int32()), OnnxType.tensor(OnnxType.int64()), OnnxType.tensor(OnnxType.float16()), OnnxType.tensor(OnnxType.float32()), OnnxType.tensor(OnnxType.float64()), OnnxType.tensor(OnnxType.bfloat16())))),
25761             ;
25762 
25763             final OnnxType.TypeVariable typeVariable;
25764 
25765             TypeConstraint(OnnxType.TypeVariable typeVariable) {
25766                 assert typeVariable.name().equals(name());
25767                 this.typeVariable = typeVariable;
25768             }
25769 
25770             @Override
25771             public OnnxType.TypeVariable typeVariable() {
25772                 return typeVariable;
25773             }
25774         }
25775 
25776         public enum InputParameter implements OnnxParameter {
25777             input(TypeConstraint.T.typeVariable(), Quantifier.REQUIRED),
25778             ;
25779 
25780             final OnnxType type;
25781             final Quantifier quantifier;
25782 
25783             InputParameter(OnnxType type, Quantifier quantifier) {
25784                 this.type = type;
25785                 this.quantifier = quantifier;
25786             }
25787 
25788             @Override
25789             public OnnxType type() {
25790                 return type;
25791             }
25792 
25793             @Override
25794             public Quantifier quantifier() {
25795                 return quantifier;
25796             }
25797         }
25798 
25799         public enum OutputParameter implements OnnxParameter {
25800             output(TypeConstraint.T.typeVariable(), Quantifier.REQUIRED),
25801             ;
25802 
25803             final OnnxType type;
25804             final Quantifier quantifier;
25805 
25806             OutputParameter(OnnxType type, Quantifier quantifier) {
25807                 this.type = type;
25808                 this.quantifier = quantifier;
25809             }
25810 
25811             @Override
25812             public OnnxType type() {
25813                 return type;
25814             }
25815 
25816             @Override
25817             public Quantifier quantifier() {
25818                 return quantifier;
25819             }
25820         }
25821 
25822         public static final OnnxSchema SCHEMA = new OnnxSchemaRecord(
25823                 NAME,
25824                 List.of(Attribute.values()),
25825                 List.of(TypeConstraint.values()),
25826                 List.of(InputParameter.values()),
25827                 List.of(OutputParameter.values())
25828         );
25829 
25830         public Sign(ExternalizedOp def) {
25831             super(SCHEMA, def);
25832         }
25833 
25834         Sign(Sign that, CopyContext cc) {
25835             super(that, cc);
25836         }
25837 
25838         @Override
25839         public Sign transform(CopyContext cc, OpTransformer ot) {
25840             return new Sign(this, cc);
25841         }
25842 
25843         Sign(TypeElement resultType, Value input) {
25844             super(SCHEMA, resultType, Set.of(), List.of(input), List.of());
25845         }
25846 
25847         @Override
25848         public SequencedSet<OnnxParameter> onnxOutputs() {
25849             return onnxOutputs(SCHEMA);
25850         }
25851 
25852         @Override
25853         public SequencedMap<OnnxParameter, Object> onnxInputs() {
25854             return onnxInputs(SCHEMA, List.of(input()));
25855         }
25856 
25857         public Value input() {
25858             return operands().get(0);
25859         }
25860 
25861     }
25862 
25863     public static Sign Sign(TypeElement resultType, Value input) {
25864         return new Sign(resultType, input);
25865     }
25866 
25867     @OpFactory.OpDeclaration(Sin.NAME)
25868     public static final class Sin extends OnnxOp {
25869         public static final String NAME = "Sin";
25870 
25871         public enum Attribute implements OnnxAttribute.None { }
25872 
25873         public enum TypeConstraint implements OnnxTypeConstraint {
25874             T(new OnnxType.TypeVariable("T", List.of(OnnxType.tensor(OnnxType.bfloat16()), OnnxType.tensor(OnnxType.float16()), OnnxType.tensor(OnnxType.float32()), OnnxType.tensor(OnnxType.float64())))),
25875             ;
25876 
25877             final OnnxType.TypeVariable typeVariable;
25878 
25879             TypeConstraint(OnnxType.TypeVariable typeVariable) {
25880                 assert typeVariable.name().equals(name());
25881                 this.typeVariable = typeVariable;
25882             }
25883 
25884             @Override
25885             public OnnxType.TypeVariable typeVariable() {
25886                 return typeVariable;
25887             }
25888         }
25889 
25890         public enum InputParameter implements OnnxParameter {
25891             input(TypeConstraint.T.typeVariable(), Quantifier.REQUIRED),
25892             ;
25893 
25894             final OnnxType type;
25895             final Quantifier quantifier;
25896 
25897             InputParameter(OnnxType type, Quantifier quantifier) {
25898                 this.type = type;
25899                 this.quantifier = quantifier;
25900             }
25901 
25902             @Override
25903             public OnnxType type() {
25904                 return type;
25905             }
25906 
25907             @Override
25908             public Quantifier quantifier() {
25909                 return quantifier;
25910             }
25911         }
25912 
25913         public enum OutputParameter implements OnnxParameter {
25914             output(TypeConstraint.T.typeVariable(), Quantifier.REQUIRED),
25915             ;
25916 
25917             final OnnxType type;
25918             final Quantifier quantifier;
25919 
25920             OutputParameter(OnnxType type, Quantifier quantifier) {
25921                 this.type = type;
25922                 this.quantifier = quantifier;
25923             }
25924 
25925             @Override
25926             public OnnxType type() {
25927                 return type;
25928             }
25929 
25930             @Override
25931             public Quantifier quantifier() {
25932                 return quantifier;
25933             }
25934         }
25935 
25936         public static final OnnxSchema SCHEMA = new OnnxSchemaRecord(
25937                 NAME,
25938                 List.of(Attribute.values()),
25939                 List.of(TypeConstraint.values()),
25940                 List.of(InputParameter.values()),
25941                 List.of(OutputParameter.values())
25942         );
25943 
25944         public Sin(ExternalizedOp def) {
25945             super(SCHEMA, def);
25946         }
25947 
25948         Sin(Sin that, CopyContext cc) {
25949             super(that, cc);
25950         }
25951 
25952         @Override
25953         public Sin transform(CopyContext cc, OpTransformer ot) {
25954             return new Sin(this, cc);
25955         }
25956 
25957         Sin(TypeElement resultType, Value input) {
25958             super(SCHEMA, resultType, Set.of(), List.of(input), List.of());
25959         }
25960 
25961         @Override
25962         public SequencedSet<OnnxParameter> onnxOutputs() {
25963             return onnxOutputs(SCHEMA);
25964         }
25965 
25966         @Override
25967         public SequencedMap<OnnxParameter, Object> onnxInputs() {
25968             return onnxInputs(SCHEMA, List.of(input()));
25969         }
25970 
25971         public Value input() {
25972             return operands().get(0);
25973         }
25974 
25975     }
25976 
25977     public static Sin Sin(TypeElement resultType, Value input) {
25978         return new Sin(resultType, input);
25979     }
25980 
25981     @OpFactory.OpDeclaration(Sinh.NAME)
25982     public static final class Sinh extends OnnxOp {
25983         public static final String NAME = "Sinh";
25984 
25985         public enum Attribute implements OnnxAttribute.None { }
25986 
25987         public enum TypeConstraint implements OnnxTypeConstraint {
25988             T(new OnnxType.TypeVariable("T", List.of(OnnxType.tensor(OnnxType.bfloat16()), OnnxType.tensor(OnnxType.float16()), OnnxType.tensor(OnnxType.float32()), OnnxType.tensor(OnnxType.float64())))),
25989             ;
25990 
25991             final OnnxType.TypeVariable typeVariable;
25992 
25993             TypeConstraint(OnnxType.TypeVariable typeVariable) {
25994                 assert typeVariable.name().equals(name());
25995                 this.typeVariable = typeVariable;
25996             }
25997 
25998             @Override
25999             public OnnxType.TypeVariable typeVariable() {
26000                 return typeVariable;
26001             }
26002         }
26003 
26004         public enum InputParameter implements OnnxParameter {
26005             input(TypeConstraint.T.typeVariable(), Quantifier.REQUIRED),
26006             ;
26007 
26008             final OnnxType type;
26009             final Quantifier quantifier;
26010 
26011             InputParameter(OnnxType type, Quantifier quantifier) {
26012                 this.type = type;
26013                 this.quantifier = quantifier;
26014             }
26015 
26016             @Override
26017             public OnnxType type() {
26018                 return type;
26019             }
26020 
26021             @Override
26022             public Quantifier quantifier() {
26023                 return quantifier;
26024             }
26025         }
26026 
26027         public enum OutputParameter implements OnnxParameter {
26028             output(TypeConstraint.T.typeVariable(), Quantifier.REQUIRED),
26029             ;
26030 
26031             final OnnxType type;
26032             final Quantifier quantifier;
26033 
26034             OutputParameter(OnnxType type, Quantifier quantifier) {
26035                 this.type = type;
26036                 this.quantifier = quantifier;
26037             }
26038 
26039             @Override
26040             public OnnxType type() {
26041                 return type;
26042             }
26043 
26044             @Override
26045             public Quantifier quantifier() {
26046                 return quantifier;
26047             }
26048         }
26049 
26050         public static final OnnxSchema SCHEMA = new OnnxSchemaRecord(
26051                 NAME,
26052                 List.of(Attribute.values()),
26053                 List.of(TypeConstraint.values()),
26054                 List.of(InputParameter.values()),
26055                 List.of(OutputParameter.values())
26056         );
26057 
26058         public Sinh(ExternalizedOp def) {
26059             super(SCHEMA, def);
26060         }
26061 
26062         Sinh(Sinh that, CopyContext cc) {
26063             super(that, cc);
26064         }
26065 
26066         @Override
26067         public Sinh transform(CopyContext cc, OpTransformer ot) {
26068             return new Sinh(this, cc);
26069         }
26070 
26071         Sinh(TypeElement resultType, Value input) {
26072             super(SCHEMA, resultType, Set.of(), List.of(input), List.of());
26073         }
26074 
26075         @Override
26076         public SequencedSet<OnnxParameter> onnxOutputs() {
26077             return onnxOutputs(SCHEMA);
26078         }
26079 
26080         @Override
26081         public SequencedMap<OnnxParameter, Object> onnxInputs() {
26082             return onnxInputs(SCHEMA, List.of(input()));
26083         }
26084 
26085         public Value input() {
26086             return operands().get(0);
26087         }
26088 
26089     }
26090 
26091     public static Sinh Sinh(TypeElement resultType, Value input) {
26092         return new Sinh(resultType, input);
26093     }
26094 
26095     @OpFactory.OpDeclaration(Size.NAME)
26096     public static final class Size extends OnnxOp {
26097         public static final String NAME = "Size";
26098 
26099         public enum Attribute implements OnnxAttribute.None { }
26100 
26101         public enum TypeConstraint implements OnnxTypeConstraint {
26102             T(new OnnxType.TypeVariable("T", List.of(OnnxType.tensor(OnnxType.uint8()), OnnxType.tensor(OnnxType.uint16()), OnnxType.tensor(OnnxType.uint32()), OnnxType.tensor(OnnxType.uint64()), OnnxType.tensor(OnnxType.int8()), OnnxType.tensor(OnnxType.int16()), OnnxType.tensor(OnnxType.int32()), OnnxType.tensor(OnnxType.int64()), OnnxType.tensor(OnnxType.bfloat16()), OnnxType.tensor(OnnxType.float16()), OnnxType.tensor(OnnxType.float32()), OnnxType.tensor(OnnxType.float64()), OnnxType.tensor(OnnxType.string()), OnnxType.tensor(OnnxType.bool()), OnnxType.tensor(OnnxType.complex64()), OnnxType.tensor(OnnxType.complex128()), OnnxType.tensor(OnnxType.float8e4m3fn()), OnnxType.tensor(OnnxType.float8e4m3fnuz()), OnnxType.tensor(OnnxType.float8e5m2()), OnnxType.tensor(OnnxType.float8e5m2fnuz()), OnnxType.tensor(OnnxType.uint4()), OnnxType.tensor(OnnxType.int4()), OnnxType.tensor(OnnxType.float4e2m1())))),
26103             T1(new OnnxType.TypeVariable("T1", List.of(OnnxType.tensor(OnnxType.int64())))),
26104             ;
26105 
26106             final OnnxType.TypeVariable typeVariable;
26107 
26108             TypeConstraint(OnnxType.TypeVariable typeVariable) {
26109                 assert typeVariable.name().equals(name());
26110                 this.typeVariable = typeVariable;
26111             }
26112 
26113             @Override
26114             public OnnxType.TypeVariable typeVariable() {
26115                 return typeVariable;
26116             }
26117         }
26118 
26119         public enum InputParameter implements OnnxParameter {
26120             data(TypeConstraint.T.typeVariable(), Quantifier.REQUIRED),
26121             ;
26122 
26123             final OnnxType type;
26124             final Quantifier quantifier;
26125 
26126             InputParameter(OnnxType type, Quantifier quantifier) {
26127                 this.type = type;
26128                 this.quantifier = quantifier;
26129             }
26130 
26131             @Override
26132             public OnnxType type() {
26133                 return type;
26134             }
26135 
26136             @Override
26137             public Quantifier quantifier() {
26138                 return quantifier;
26139             }
26140         }
26141 
26142         public enum OutputParameter implements OnnxParameter {
26143             size(TypeConstraint.T1.typeVariable(), Quantifier.REQUIRED),
26144             ;
26145 
26146             final OnnxType type;
26147             final Quantifier quantifier;
26148 
26149             OutputParameter(OnnxType type, Quantifier quantifier) {
26150                 this.type = type;
26151                 this.quantifier = quantifier;
26152             }
26153 
26154             @Override
26155             public OnnxType type() {
26156                 return type;
26157             }
26158 
26159             @Override
26160             public Quantifier quantifier() {
26161                 return quantifier;
26162             }
26163         }
26164 
26165         public static final OnnxSchema SCHEMA = new OnnxSchemaRecord(
26166                 NAME,
26167                 List.of(Attribute.values()),
26168                 List.of(TypeConstraint.values()),
26169                 List.of(InputParameter.values()),
26170                 List.of(OutputParameter.values())
26171         );
26172 
26173         public Size(ExternalizedOp def) {
26174             super(SCHEMA, def);
26175         }
26176 
26177         Size(Size that, CopyContext cc) {
26178             super(that, cc);
26179         }
26180 
26181         @Override
26182         public Size transform(CopyContext cc, OpTransformer ot) {
26183             return new Size(this, cc);
26184         }
26185 
26186         Size(TypeElement resultType, Value data) {
26187             super(SCHEMA, resultType, Set.of(), List.of(data), List.of());
26188         }
26189 
26190         @Override
26191         public SequencedSet<OnnxParameter> onnxOutputs() {
26192             return onnxOutputs(SCHEMA);
26193         }
26194 
26195         @Override
26196         public SequencedMap<OnnxParameter, Object> onnxInputs() {
26197             return onnxInputs(SCHEMA, List.of(data()));
26198         }
26199 
26200         public Value data() {
26201             return operands().get(0);
26202         }
26203 
26204     }
26205 
26206     public static Size Size(TypeElement resultType, Value data) {
26207         return new Size(resultType, data);
26208     }
26209 
26210     @OpFactory.OpDeclaration(Slice.NAME)
26211     public static final class Slice extends OnnxOp {
26212         public static final String NAME = "Slice";
26213 
26214         public enum Attribute implements OnnxAttribute.None { }
26215 
26216         public enum TypeConstraint implements OnnxTypeConstraint {
26217             T(new OnnxType.TypeVariable("T", List.of(OnnxType.tensor(OnnxType.uint8()), OnnxType.tensor(OnnxType.uint16()), OnnxType.tensor(OnnxType.uint32()), OnnxType.tensor(OnnxType.uint64()), OnnxType.tensor(OnnxType.int8()), OnnxType.tensor(OnnxType.int16()), OnnxType.tensor(OnnxType.int32()), OnnxType.tensor(OnnxType.int64()), OnnxType.tensor(OnnxType.bfloat16()), OnnxType.tensor(OnnxType.float16()), OnnxType.tensor(OnnxType.float32()), OnnxType.tensor(OnnxType.float64()), OnnxType.tensor(OnnxType.string()), OnnxType.tensor(OnnxType.bool()), OnnxType.tensor(OnnxType.complex64()), OnnxType.tensor(OnnxType.complex128())))),
26218             Tind(new OnnxType.TypeVariable("Tind", List.of(OnnxType.tensor(OnnxType.int32()), OnnxType.tensor(OnnxType.int64())))),
26219             ;
26220 
26221             final OnnxType.TypeVariable typeVariable;
26222 
26223             TypeConstraint(OnnxType.TypeVariable typeVariable) {
26224                 assert typeVariable.name().equals(name());
26225                 this.typeVariable = typeVariable;
26226             }
26227 
26228             @Override
26229             public OnnxType.TypeVariable typeVariable() {
26230                 return typeVariable;
26231             }
26232         }
26233 
26234         public enum InputParameter implements OnnxParameter {
26235             data(TypeConstraint.T.typeVariable(), Quantifier.REQUIRED),
26236             starts(TypeConstraint.Tind.typeVariable(), Quantifier.REQUIRED),
26237             ends(TypeConstraint.Tind.typeVariable(), Quantifier.REQUIRED),
26238             axes(TypeConstraint.Tind.typeVariable(), Quantifier.OPTIONAL),
26239             steps(TypeConstraint.Tind.typeVariable(), Quantifier.OPTIONAL),
26240             ;
26241 
26242             final OnnxType type;
26243             final Quantifier quantifier;
26244 
26245             InputParameter(OnnxType type, Quantifier quantifier) {
26246                 this.type = type;
26247                 this.quantifier = quantifier;
26248             }
26249 
26250             @Override
26251             public OnnxType type() {
26252                 return type;
26253             }
26254 
26255             @Override
26256             public Quantifier quantifier() {
26257                 return quantifier;
26258             }
26259         }
26260 
26261         public enum OutputParameter implements OnnxParameter {
26262             output(TypeConstraint.T.typeVariable(), Quantifier.REQUIRED),
26263             ;
26264 
26265             final OnnxType type;
26266             final Quantifier quantifier;
26267 
26268             OutputParameter(OnnxType type, Quantifier quantifier) {
26269                 this.type = type;
26270                 this.quantifier = quantifier;
26271             }
26272 
26273             @Override
26274             public OnnxType type() {
26275                 return type;
26276             }
26277 
26278             @Override
26279             public Quantifier quantifier() {
26280                 return quantifier;
26281             }
26282         }
26283 
26284         public static final OnnxSchema SCHEMA = new OnnxSchemaRecord(
26285                 NAME,
26286                 List.of(Attribute.values()),
26287                 List.of(TypeConstraint.values()),
26288                 List.of(InputParameter.values()),
26289                 List.of(OutputParameter.values())
26290         );
26291 
26292         public Slice(ExternalizedOp def) {
26293             super(SCHEMA, def);
26294         }
26295 
26296         Slice(Slice that, CopyContext cc) {
26297             super(that, cc);
26298         }
26299 
26300         @Override
26301         public Slice transform(CopyContext cc, OpTransformer ot) {
26302             return new Slice(this, cc);
26303         }
26304 
26305         Slice(TypeElement resultType, Value data, Value starts, Value ends, java.util.Optional<Value> axes, java.util.Optional<Value> steps) {
26306             super(SCHEMA, resultType, Set.of(), List.of(data, starts, ends, axes, steps), List.of());
26307         }
26308 
26309         @Override
26310         public SequencedSet<OnnxParameter> onnxOutputs() {
26311             return onnxOutputs(SCHEMA);
26312         }
26313 
26314         @Override
26315         public SequencedMap<OnnxParameter, Object> onnxInputs() {
26316             return onnxInputs(SCHEMA, List.of(data(), starts(), ends(), axes(), steps()));
26317         }
26318 
26319         public Value data() {
26320             return operands().get(0);
26321         }
26322 
26323         public Value starts() {
26324             return operands().get(1);
26325         }
26326 
26327         public Value ends() {
26328             return operands().get(2);
26329         }
26330 
26331         public java.util.Optional<Value> axes() {
26332             int i = optionalInputArguments.indexOf(InputParameter.axes);
26333             return i != -1 ? java.util.Optional.of(operands().get(3 + i)) : java.util.Optional.empty();
26334         }
26335 
26336         public java.util.Optional<Value> steps() {
26337             int i = optionalInputArguments.indexOf(InputParameter.steps);
26338             return i != -1 ? java.util.Optional.of(operands().get(3 + i)) : java.util.Optional.empty();
26339         }
26340 
26341     }
26342 
26343     public static Slice Slice(TypeElement resultType, Value data, Value starts, Value ends, java.util.Optional<Value> axes, java.util.Optional<Value> steps) {
26344         return new Slice(resultType, data, starts, ends, axes, steps);
26345     }
26346 
26347     @OpFactory.OpDeclaration(Softmax.NAME)
26348     public static final class Softmax extends OnnxOp {
26349         public static final String NAME = "Softmax";
26350 
26351         public enum Attribute implements OnnxAttribute {
26352             axis(Integer.class, true, -1),
26353             ;
26354 
26355                 final Class<?> t;
26356                 final boolean optional;
26357                 final Object defaultValue;
26358 
26359                 Attribute(Class<?> type, boolean optional, Object defaultValue) {
26360                     this.t = type;
26361                     this.optional = optional;
26362                     this.defaultValue = defaultValue;
26363                     assert optional || defaultValue == null;
26364                 }
26365 
26366                 public Class<?> type() {
26367                     return t;
26368                 }
26369 
26370                 public boolean isOptional() {
26371                     return optional;
26372                 }
26373 
26374                 public Object defaultValue() {
26375                     return defaultValue;
26376                 }
26377         }
26378 
26379         public enum TypeConstraint implements OnnxTypeConstraint {
26380             T(new OnnxType.TypeVariable("T", List.of(OnnxType.tensor(OnnxType.float16()), OnnxType.tensor(OnnxType.float32()), OnnxType.tensor(OnnxType.float64()), OnnxType.tensor(OnnxType.bfloat16())))),
26381             ;
26382 
26383             final OnnxType.TypeVariable typeVariable;
26384 
26385             TypeConstraint(OnnxType.TypeVariable typeVariable) {
26386                 assert typeVariable.name().equals(name());
26387                 this.typeVariable = typeVariable;
26388             }
26389 
26390             @Override
26391             public OnnxType.TypeVariable typeVariable() {
26392                 return typeVariable;
26393             }
26394         }
26395 
26396         public enum InputParameter implements OnnxParameter {
26397             input(TypeConstraint.T.typeVariable(), Quantifier.REQUIRED),
26398             ;
26399 
26400             final OnnxType type;
26401             final Quantifier quantifier;
26402 
26403             InputParameter(OnnxType type, Quantifier quantifier) {
26404                 this.type = type;
26405                 this.quantifier = quantifier;
26406             }
26407 
26408             @Override
26409             public OnnxType type() {
26410                 return type;
26411             }
26412 
26413             @Override
26414             public Quantifier quantifier() {
26415                 return quantifier;
26416             }
26417         }
26418 
26419         public enum OutputParameter implements OnnxParameter {
26420             output(TypeConstraint.T.typeVariable(), Quantifier.REQUIRED),
26421             ;
26422 
26423             final OnnxType type;
26424             final Quantifier quantifier;
26425 
26426             OutputParameter(OnnxType type, Quantifier quantifier) {
26427                 this.type = type;
26428                 this.quantifier = quantifier;
26429             }
26430 
26431             @Override
26432             public OnnxType type() {
26433                 return type;
26434             }
26435 
26436             @Override
26437             public Quantifier quantifier() {
26438                 return quantifier;
26439             }
26440         }
26441 
26442         public static final OnnxSchema SCHEMA = new OnnxSchemaRecord(
26443                 NAME,
26444                 List.of(Attribute.values()),
26445                 List.of(TypeConstraint.values()),
26446                 List.of(InputParameter.values()),
26447                 List.of(OutputParameter.values())
26448         );
26449 
26450         public Softmax(ExternalizedOp def) {
26451             super(SCHEMA, def);
26452         }
26453 
26454         Softmax(Softmax that, CopyContext cc) {
26455             super(that, cc);
26456         }
26457 
26458         @Override
26459         public Softmax transform(CopyContext cc, OpTransformer ot) {
26460             return new Softmax(this, cc);
26461         }
26462 
26463         Softmax(TypeElement resultType, Value input, java.util.Optional<Integer> axis) {
26464             super(SCHEMA, resultType, Set.of(), List.of(input), List.of(axis));
26465         }
26466 
26467         @Override
26468         public SequencedSet<OnnxParameter> onnxOutputs() {
26469             return onnxOutputs(SCHEMA);
26470         }
26471 
26472         @Override
26473         public SequencedMap<OnnxParameter, Object> onnxInputs() {
26474             return onnxInputs(SCHEMA, List.of(input()));
26475         }
26476 
26477         public Value input() {
26478             return operands().get(0);
26479         }
26480 
26481         public java.util.Optional<Integer> axis() {
26482             Integer axis = Attribute.axis.access(Integer.class, onnxAttributes);
26483             return java.util.Optional.ofNullable(axis);
26484         }
26485 
26486     }
26487 
26488     public static Softmax Softmax(TypeElement resultType, Value input, java.util.Optional<Integer> axis) {
26489         return new Softmax(resultType, input, axis);
26490     }
26491 
26492     @OpFactory.OpDeclaration(SoftmaxCrossEntropyLoss.NAME)
26493     public static final class SoftmaxCrossEntropyLoss extends OnnxOp {
26494         public static final String NAME = "SoftmaxCrossEntropyLoss";
26495 
26496         public enum Attribute implements OnnxAttribute {
26497             ignore_index(Integer.class, true, null),
26498             reduction(String.class, true, "mean"),
26499             ;
26500 
26501                 final Class<?> t;
26502                 final boolean optional;
26503                 final Object defaultValue;
26504 
26505                 Attribute(Class<?> type, boolean optional, Object defaultValue) {
26506                     this.t = type;
26507                     this.optional = optional;
26508                     this.defaultValue = defaultValue;
26509                     assert optional || defaultValue == null;
26510                 }
26511 
26512                 public Class<?> type() {
26513                     return t;
26514                 }
26515 
26516                 public boolean isOptional() {
26517                     return optional;
26518                 }
26519 
26520                 public Object defaultValue() {
26521                     return defaultValue;
26522                 }
26523         }
26524 
26525         public enum TypeConstraint implements OnnxTypeConstraint {
26526             T(new OnnxType.TypeVariable("T", List.of(OnnxType.tensor(OnnxType.float16()), OnnxType.tensor(OnnxType.float32()), OnnxType.tensor(OnnxType.float64()), OnnxType.tensor(OnnxType.bfloat16())))),
26527             Tind(new OnnxType.TypeVariable("Tind", List.of(OnnxType.tensor(OnnxType.int32()), OnnxType.tensor(OnnxType.int64())))),
26528             ;
26529 
26530             final OnnxType.TypeVariable typeVariable;
26531 
26532             TypeConstraint(OnnxType.TypeVariable typeVariable) {
26533                 assert typeVariable.name().equals(name());
26534                 this.typeVariable = typeVariable;
26535             }
26536 
26537             @Override
26538             public OnnxType.TypeVariable typeVariable() {
26539                 return typeVariable;
26540             }
26541         }
26542 
26543         public enum InputParameter implements OnnxParameter {
26544             scores(TypeConstraint.T.typeVariable(), Quantifier.REQUIRED),
26545             labels(TypeConstraint.Tind.typeVariable(), Quantifier.REQUIRED),
26546             weights(TypeConstraint.T.typeVariable(), Quantifier.OPTIONAL),
26547             ;
26548 
26549             final OnnxType type;
26550             final Quantifier quantifier;
26551 
26552             InputParameter(OnnxType type, Quantifier quantifier) {
26553                 this.type = type;
26554                 this.quantifier = quantifier;
26555             }
26556 
26557             @Override
26558             public OnnxType type() {
26559                 return type;
26560             }
26561 
26562             @Override
26563             public Quantifier quantifier() {
26564                 return quantifier;
26565             }
26566         }
26567 
26568         public enum OutputParameter implements OnnxParameter {
26569             output(TypeConstraint.T.typeVariable(), Quantifier.REQUIRED),
26570             log_prob(TypeConstraint.T.typeVariable(), Quantifier.OPTIONAL),
26571             ;
26572 
26573             final OnnxType type;
26574             final Quantifier quantifier;
26575 
26576             OutputParameter(OnnxType type, Quantifier quantifier) {
26577                 this.type = type;
26578                 this.quantifier = quantifier;
26579             }
26580 
26581             @Override
26582             public OnnxType type() {
26583                 return type;
26584             }
26585 
26586             @Override
26587             public Quantifier quantifier() {
26588                 return quantifier;
26589             }
26590         }
26591 
26592         public static final OnnxSchema SCHEMA = new OnnxSchemaRecord(
26593                 NAME,
26594                 List.of(Attribute.values()),
26595                 List.of(TypeConstraint.values()),
26596                 List.of(InputParameter.values()),
26597                 List.of(OutputParameter.values())
26598         );
26599 
26600         public SoftmaxCrossEntropyLoss(ExternalizedOp def) {
26601             super(SCHEMA, def);
26602         }
26603 
26604         SoftmaxCrossEntropyLoss(SoftmaxCrossEntropyLoss that, CopyContext cc) {
26605             super(that, cc);
26606         }
26607 
26608         @Override
26609         public SoftmaxCrossEntropyLoss transform(CopyContext cc, OpTransformer ot) {
26610             return new SoftmaxCrossEntropyLoss(this, cc);
26611         }
26612 
26613         SoftmaxCrossEntropyLoss(TypeElement resultType, Set<OutputParameter> optionalOutputs, Value scores, Value labels, java.util.Optional<Value> weights, java.util.Optional<Integer> ignore_index, java.util.Optional<String> reduction) {
26614             super(SCHEMA, resultType, optionalOutputs, List.of(scores, labels, weights), List.of(ignore_index, reduction));
26615         }
26616 
26617         @Override
26618         public SequencedSet<OnnxParameter> onnxOutputs() {
26619             return onnxOutputs(SCHEMA);
26620         }
26621 
26622         @Override
26623         public SequencedMap<OnnxParameter, Object> onnxInputs() {
26624             return onnxInputs(SCHEMA, List.of(scores(), labels(), weights()));
26625         }
26626 
26627         public Value scores() {
26628             return operands().get(0);
26629         }
26630 
26631         public Value labels() {
26632             return operands().get(1);
26633         }
26634 
26635         public java.util.Optional<Value> weights() {
26636             int i = optionalInputArguments.indexOf(InputParameter.weights);
26637             return i != -1 ? java.util.Optional.of(operands().get(2 + i)) : java.util.Optional.empty();
26638         }
26639 
26640         public java.util.Optional<Integer> ignore_index() {
26641             Integer ignore_index = Attribute.ignore_index.access(Integer.class, onnxAttributes);
26642             return java.util.Optional.ofNullable(ignore_index);
26643         }
26644 
26645         public java.util.Optional<String> reduction() {
26646             String reduction = Attribute.reduction.access(String.class, onnxAttributes);
26647             return java.util.Optional.ofNullable(reduction);
26648         }
26649 
26650     }
26651 
26652     public static SoftmaxCrossEntropyLoss SoftmaxCrossEntropyLoss(TypeElement resultType, Set<SoftmaxCrossEntropyLoss.OutputParameter> optionalOutputs, Value scores, Value labels, java.util.Optional<Value> weights, java.util.Optional<Integer> ignore_index, java.util.Optional<String> reduction) {
26653         return new SoftmaxCrossEntropyLoss(resultType, optionalOutputs, scores, labels, weights, ignore_index, reduction);
26654     }
26655 
26656     @OpFactory.OpDeclaration(Softplus.NAME)
26657     public static final class Softplus extends OnnxOp {
26658         public static final String NAME = "Softplus";
26659 
26660         public enum Attribute implements OnnxAttribute.None { }
26661 
26662         public enum TypeConstraint implements OnnxTypeConstraint {
26663             T(new OnnxType.TypeVariable("T", List.of(OnnxType.tensor(OnnxType.bfloat16()), OnnxType.tensor(OnnxType.float16()), OnnxType.tensor(OnnxType.float32()), OnnxType.tensor(OnnxType.float64())))),
26664             ;
26665 
26666             final OnnxType.TypeVariable typeVariable;
26667 
26668             TypeConstraint(OnnxType.TypeVariable typeVariable) {
26669                 assert typeVariable.name().equals(name());
26670                 this.typeVariable = typeVariable;
26671             }
26672 
26673             @Override
26674             public OnnxType.TypeVariable typeVariable() {
26675                 return typeVariable;
26676             }
26677         }
26678 
26679         public enum InputParameter implements OnnxParameter {
26680             X(TypeConstraint.T.typeVariable(), Quantifier.REQUIRED),
26681             ;
26682 
26683             final OnnxType type;
26684             final Quantifier quantifier;
26685 
26686             InputParameter(OnnxType type, Quantifier quantifier) {
26687                 this.type = type;
26688                 this.quantifier = quantifier;
26689             }
26690 
26691             @Override
26692             public OnnxType type() {
26693                 return type;
26694             }
26695 
26696             @Override
26697             public Quantifier quantifier() {
26698                 return quantifier;
26699             }
26700         }
26701 
26702         public enum OutputParameter implements OnnxParameter {
26703             Y(TypeConstraint.T.typeVariable(), Quantifier.REQUIRED),
26704             ;
26705 
26706             final OnnxType type;
26707             final Quantifier quantifier;
26708 
26709             OutputParameter(OnnxType type, Quantifier quantifier) {
26710                 this.type = type;
26711                 this.quantifier = quantifier;
26712             }
26713 
26714             @Override
26715             public OnnxType type() {
26716                 return type;
26717             }
26718 
26719             @Override
26720             public Quantifier quantifier() {
26721                 return quantifier;
26722             }
26723         }
26724 
26725         public static final OnnxSchema SCHEMA = new OnnxSchemaRecord(
26726                 NAME,
26727                 List.of(Attribute.values()),
26728                 List.of(TypeConstraint.values()),
26729                 List.of(InputParameter.values()),
26730                 List.of(OutputParameter.values())
26731         );
26732 
26733         public Softplus(ExternalizedOp def) {
26734             super(SCHEMA, def);
26735         }
26736 
26737         Softplus(Softplus that, CopyContext cc) {
26738             super(that, cc);
26739         }
26740 
26741         @Override
26742         public Softplus transform(CopyContext cc, OpTransformer ot) {
26743             return new Softplus(this, cc);
26744         }
26745 
26746         Softplus(TypeElement resultType, Value X) {
26747             super(SCHEMA, resultType, Set.of(), List.of(X), List.of());
26748         }
26749 
26750         @Override
26751         public SequencedSet<OnnxParameter> onnxOutputs() {
26752             return onnxOutputs(SCHEMA);
26753         }
26754 
26755         @Override
26756         public SequencedMap<OnnxParameter, Object> onnxInputs() {
26757             return onnxInputs(SCHEMA, List.of(X()));
26758         }
26759 
26760         public Value X() {
26761             return operands().get(0);
26762         }
26763 
26764     }
26765 
26766     public static Softplus Softplus(TypeElement resultType, Value X) {
26767         return new Softplus(resultType, X);
26768     }
26769 
26770     @OpFactory.OpDeclaration(Softsign.NAME)
26771     public static final class Softsign extends OnnxOp {
26772         public static final String NAME = "Softsign";
26773 
26774         public enum Attribute implements OnnxAttribute.None { }
26775 
26776         public enum TypeConstraint implements OnnxTypeConstraint {
26777             T(new OnnxType.TypeVariable("T", List.of(OnnxType.tensor(OnnxType.bfloat16()), OnnxType.tensor(OnnxType.float16()), OnnxType.tensor(OnnxType.float32()), OnnxType.tensor(OnnxType.float64())))),
26778             ;
26779 
26780             final OnnxType.TypeVariable typeVariable;
26781 
26782             TypeConstraint(OnnxType.TypeVariable typeVariable) {
26783                 assert typeVariable.name().equals(name());
26784                 this.typeVariable = typeVariable;
26785             }
26786 
26787             @Override
26788             public OnnxType.TypeVariable typeVariable() {
26789                 return typeVariable;
26790             }
26791         }
26792 
26793         public enum InputParameter implements OnnxParameter {
26794             input(TypeConstraint.T.typeVariable(), Quantifier.REQUIRED),
26795             ;
26796 
26797             final OnnxType type;
26798             final Quantifier quantifier;
26799 
26800             InputParameter(OnnxType type, Quantifier quantifier) {
26801                 this.type = type;
26802                 this.quantifier = quantifier;
26803             }
26804 
26805             @Override
26806             public OnnxType type() {
26807                 return type;
26808             }
26809 
26810             @Override
26811             public Quantifier quantifier() {
26812                 return quantifier;
26813             }
26814         }
26815 
26816         public enum OutputParameter implements OnnxParameter {
26817             output(TypeConstraint.T.typeVariable(), Quantifier.REQUIRED),
26818             ;
26819 
26820             final OnnxType type;
26821             final Quantifier quantifier;
26822 
26823             OutputParameter(OnnxType type, Quantifier quantifier) {
26824                 this.type = type;
26825                 this.quantifier = quantifier;
26826             }
26827 
26828             @Override
26829             public OnnxType type() {
26830                 return type;
26831             }
26832 
26833             @Override
26834             public Quantifier quantifier() {
26835                 return quantifier;
26836             }
26837         }
26838 
26839         public static final OnnxSchema SCHEMA = new OnnxSchemaRecord(
26840                 NAME,
26841                 List.of(Attribute.values()),
26842                 List.of(TypeConstraint.values()),
26843                 List.of(InputParameter.values()),
26844                 List.of(OutputParameter.values())
26845         );
26846 
26847         public Softsign(ExternalizedOp def) {
26848             super(SCHEMA, def);
26849         }
26850 
26851         Softsign(Softsign that, CopyContext cc) {
26852             super(that, cc);
26853         }
26854 
26855         @Override
26856         public Softsign transform(CopyContext cc, OpTransformer ot) {
26857             return new Softsign(this, cc);
26858         }
26859 
26860         Softsign(TypeElement resultType, Value input) {
26861             super(SCHEMA, resultType, Set.of(), List.of(input), List.of());
26862         }
26863 
26864         @Override
26865         public SequencedSet<OnnxParameter> onnxOutputs() {
26866             return onnxOutputs(SCHEMA);
26867         }
26868 
26869         @Override
26870         public SequencedMap<OnnxParameter, Object> onnxInputs() {
26871             return onnxInputs(SCHEMA, List.of(input()));
26872         }
26873 
26874         public Value input() {
26875             return operands().get(0);
26876         }
26877 
26878     }
26879 
26880     public static Softsign Softsign(TypeElement resultType, Value input) {
26881         return new Softsign(resultType, input);
26882     }
26883 
26884     @OpFactory.OpDeclaration(SpaceToDepth.NAME)
26885     public static final class SpaceToDepth extends OnnxOp {
26886         public static final String NAME = "SpaceToDepth";
26887 
26888         public enum Attribute implements OnnxAttribute {
26889             blocksize(Integer.class, false, null),
26890             ;
26891 
26892                 final Class<?> t;
26893                 final boolean optional;
26894                 final Object defaultValue;
26895 
26896                 Attribute(Class<?> type, boolean optional, Object defaultValue) {
26897                     this.t = type;
26898                     this.optional = optional;
26899                     this.defaultValue = defaultValue;
26900                     assert optional || defaultValue == null;
26901                 }
26902 
26903                 public Class<?> type() {
26904                     return t;
26905                 }
26906 
26907                 public boolean isOptional() {
26908                     return optional;
26909                 }
26910 
26911                 public Object defaultValue() {
26912                     return defaultValue;
26913                 }
26914         }
26915 
26916         public enum TypeConstraint implements OnnxTypeConstraint {
26917             T(new OnnxType.TypeVariable("T", List.of(OnnxType.tensor(OnnxType.uint8()), OnnxType.tensor(OnnxType.uint16()), OnnxType.tensor(OnnxType.uint32()), OnnxType.tensor(OnnxType.uint64()), OnnxType.tensor(OnnxType.int8()), OnnxType.tensor(OnnxType.int16()), OnnxType.tensor(OnnxType.int32()), OnnxType.tensor(OnnxType.int64()), OnnxType.tensor(OnnxType.bfloat16()), OnnxType.tensor(OnnxType.float16()), OnnxType.tensor(OnnxType.float32()), OnnxType.tensor(OnnxType.float64()), OnnxType.tensor(OnnxType.string()), OnnxType.tensor(OnnxType.bool()), OnnxType.tensor(OnnxType.complex64()), OnnxType.tensor(OnnxType.complex128())))),
26918             ;
26919 
26920             final OnnxType.TypeVariable typeVariable;
26921 
26922             TypeConstraint(OnnxType.TypeVariable typeVariable) {
26923                 assert typeVariable.name().equals(name());
26924                 this.typeVariable = typeVariable;
26925             }
26926 
26927             @Override
26928             public OnnxType.TypeVariable typeVariable() {
26929                 return typeVariable;
26930             }
26931         }
26932 
26933         public enum InputParameter implements OnnxParameter {
26934             input(TypeConstraint.T.typeVariable(), Quantifier.REQUIRED),
26935             ;
26936 
26937             final OnnxType type;
26938             final Quantifier quantifier;
26939 
26940             InputParameter(OnnxType type, Quantifier quantifier) {
26941                 this.type = type;
26942                 this.quantifier = quantifier;
26943             }
26944 
26945             @Override
26946             public OnnxType type() {
26947                 return type;
26948             }
26949 
26950             @Override
26951             public Quantifier quantifier() {
26952                 return quantifier;
26953             }
26954         }
26955 
26956         public enum OutputParameter implements OnnxParameter {
26957             output(TypeConstraint.T.typeVariable(), Quantifier.REQUIRED),
26958             ;
26959 
26960             final OnnxType type;
26961             final Quantifier quantifier;
26962 
26963             OutputParameter(OnnxType type, Quantifier quantifier) {
26964                 this.type = type;
26965                 this.quantifier = quantifier;
26966             }
26967 
26968             @Override
26969             public OnnxType type() {
26970                 return type;
26971             }
26972 
26973             @Override
26974             public Quantifier quantifier() {
26975                 return quantifier;
26976             }
26977         }
26978 
26979         public static final OnnxSchema SCHEMA = new OnnxSchemaRecord(
26980                 NAME,
26981                 List.of(Attribute.values()),
26982                 List.of(TypeConstraint.values()),
26983                 List.of(InputParameter.values()),
26984                 List.of(OutputParameter.values())
26985         );
26986 
26987         public SpaceToDepth(ExternalizedOp def) {
26988             super(SCHEMA, def);
26989         }
26990 
26991         SpaceToDepth(SpaceToDepth that, CopyContext cc) {
26992             super(that, cc);
26993         }
26994 
26995         @Override
26996         public SpaceToDepth transform(CopyContext cc, OpTransformer ot) {
26997             return new SpaceToDepth(this, cc);
26998         }
26999 
27000         SpaceToDepth(TypeElement resultType, Value input, int blocksize) {
27001             super(SCHEMA, resultType, Set.of(), List.of(input), List.of(blocksize));
27002         }
27003 
27004         @Override
27005         public SequencedSet<OnnxParameter> onnxOutputs() {
27006             return onnxOutputs(SCHEMA);
27007         }
27008 
27009         @Override
27010         public SequencedMap<OnnxParameter, Object> onnxInputs() {
27011             return onnxInputs(SCHEMA, List.of(input()));
27012         }
27013 
27014         public Value input() {
27015             return operands().get(0);
27016         }
27017 
27018         public int blocksize() {
27019             int blocksize = Attribute.blocksize.access(int.class, onnxAttributes);
27020             return blocksize;
27021         }
27022 
27023     }
27024 
27025     public static SpaceToDepth SpaceToDepth(TypeElement resultType, Value input, int blocksize) {
27026         return new SpaceToDepth(resultType, input, blocksize);
27027     }
27028 
27029     @OpFactory.OpDeclaration(Split.NAME)
27030     public static final class Split extends OnnxOp {
27031         public static final String NAME = "Split";
27032 
27033         public enum Attribute implements OnnxAttribute {
27034             num_outputs(Integer.class, true, null),
27035             axis(Integer.class, true, 0),
27036             ;
27037 
27038                 final Class<?> t;
27039                 final boolean optional;
27040                 final Object defaultValue;
27041 
27042                 Attribute(Class<?> type, boolean optional, Object defaultValue) {
27043                     this.t = type;
27044                     this.optional = optional;
27045                     this.defaultValue = defaultValue;
27046                     assert optional || defaultValue == null;
27047                 }
27048 
27049                 public Class<?> type() {
27050                     return t;
27051                 }
27052 
27053                 public boolean isOptional() {
27054                     return optional;
27055                 }
27056 
27057                 public Object defaultValue() {
27058                     return defaultValue;
27059                 }
27060         }
27061 
27062         public enum TypeConstraint implements OnnxTypeConstraint {
27063             T(new OnnxType.TypeVariable("T", List.of(OnnxType.tensor(OnnxType.uint8()), OnnxType.tensor(OnnxType.uint16()), OnnxType.tensor(OnnxType.uint32()), OnnxType.tensor(OnnxType.uint64()), OnnxType.tensor(OnnxType.int8()), OnnxType.tensor(OnnxType.int16()), OnnxType.tensor(OnnxType.int32()), OnnxType.tensor(OnnxType.int64()), OnnxType.tensor(OnnxType.bfloat16()), OnnxType.tensor(OnnxType.float16()), OnnxType.tensor(OnnxType.float32()), OnnxType.tensor(OnnxType.float64()), OnnxType.tensor(OnnxType.string()), OnnxType.tensor(OnnxType.bool()), OnnxType.tensor(OnnxType.complex64()), OnnxType.tensor(OnnxType.complex128())))),
27064             ;
27065 
27066             final OnnxType.TypeVariable typeVariable;
27067 
27068             TypeConstraint(OnnxType.TypeVariable typeVariable) {
27069                 assert typeVariable.name().equals(name());
27070                 this.typeVariable = typeVariable;
27071             }
27072 
27073             @Override
27074             public OnnxType.TypeVariable typeVariable() {
27075                 return typeVariable;
27076             }
27077         }
27078 
27079         public enum InputParameter implements OnnxParameter {
27080             input(TypeConstraint.T.typeVariable(), Quantifier.REQUIRED),
27081             split(OnnxType.tensor(OnnxType.int64()), Quantifier.OPTIONAL),
27082             ;
27083 
27084             final OnnxType type;
27085             final Quantifier quantifier;
27086 
27087             InputParameter(OnnxType type, Quantifier quantifier) {
27088                 this.type = type;
27089                 this.quantifier = quantifier;
27090             }
27091 
27092             @Override
27093             public OnnxType type() {
27094                 return type;
27095             }
27096 
27097             @Override
27098             public Quantifier quantifier() {
27099                 return quantifier;
27100             }
27101         }
27102 
27103         public enum OutputParameter implements OnnxParameter {
27104             outputs(TypeConstraint.T.typeVariable(), Quantifier.VARIADIC),
27105             ;
27106 
27107             final OnnxType type;
27108             final Quantifier quantifier;
27109 
27110             OutputParameter(OnnxType type, Quantifier quantifier) {
27111                 this.type = type;
27112                 this.quantifier = quantifier;
27113             }
27114 
27115             @Override
27116             public OnnxType type() {
27117                 return type;
27118             }
27119 
27120             @Override
27121             public Quantifier quantifier() {
27122                 return quantifier;
27123             }
27124         }
27125 
27126         public static final OnnxSchema SCHEMA = new OnnxSchemaRecord(
27127                 NAME,
27128                 List.of(Attribute.values()),
27129                 List.of(TypeConstraint.values()),
27130                 List.of(InputParameter.values()),
27131                 List.of(OutputParameter.values())
27132         );
27133 
27134         public Split(ExternalizedOp def) {
27135             super(SCHEMA, def);
27136         }
27137 
27138         Split(Split that, CopyContext cc) {
27139             super(that, cc);
27140         }
27141 
27142         @Override
27143         public Split transform(CopyContext cc, OpTransformer ot) {
27144             return new Split(this, cc);
27145         }
27146 
27147         Split(TypeElement resultType, Value input, java.util.Optional<Value> split, java.util.Optional<Integer> num_outputs, java.util.Optional<Integer> axis) {
27148             super(SCHEMA, resultType, Set.of(), List.of(input, split), List.of(num_outputs, axis));
27149         }
27150 
27151         @Override
27152         public SequencedSet<OnnxParameter> onnxOutputs() {
27153             return onnxOutputs(SCHEMA);
27154         }
27155 
27156         @Override
27157         public SequencedMap<OnnxParameter, Object> onnxInputs() {
27158             return onnxInputs(SCHEMA, List.of(input(), split()));
27159         }
27160 
27161         public Value input() {
27162             return operands().get(0);
27163         }
27164 
27165         public java.util.Optional<Value> split() {
27166             int i = optionalInputArguments.indexOf(InputParameter.split);
27167             return i != -1 ? java.util.Optional.of(operands().get(1 + i)) : java.util.Optional.empty();
27168         }
27169 
27170         public java.util.Optional<Integer> num_outputs() {
27171             Integer num_outputs = Attribute.num_outputs.access(Integer.class, onnxAttributes);
27172             return java.util.Optional.ofNullable(num_outputs);
27173         }
27174 
27175         public java.util.Optional<Integer> axis() {
27176             Integer axis = Attribute.axis.access(Integer.class, onnxAttributes);
27177             return java.util.Optional.ofNullable(axis);
27178         }
27179 
27180     }
27181 
27182     public static Split Split(TypeElement resultType, Value input, java.util.Optional<Value> split, java.util.Optional<Integer> num_outputs, java.util.Optional<Integer> axis) {
27183         return new Split(resultType, input, split, num_outputs, axis);
27184     }
27185 
27186     @OpFactory.OpDeclaration(SplitToSequence.NAME)
27187     public static final class SplitToSequence extends OnnxOp {
27188         public static final String NAME = "SplitToSequence";
27189 
27190         public enum Attribute implements OnnxAttribute {
27191             keepdims(Integer.class, true, 1),
27192             axis(Integer.class, true, 0),
27193             ;
27194 
27195                 final Class<?> t;
27196                 final boolean optional;
27197                 final Object defaultValue;
27198 
27199                 Attribute(Class<?> type, boolean optional, Object defaultValue) {
27200                     this.t = type;
27201                     this.optional = optional;
27202                     this.defaultValue = defaultValue;
27203                     assert optional || defaultValue == null;
27204                 }
27205 
27206                 public Class<?> type() {
27207                     return t;
27208                 }
27209 
27210                 public boolean isOptional() {
27211                     return optional;
27212                 }
27213 
27214                 public Object defaultValue() {
27215                     return defaultValue;
27216                 }
27217         }
27218 
27219         public enum TypeConstraint implements OnnxTypeConstraint {
27220             T(new OnnxType.TypeVariable("T", List.of(OnnxType.tensor(OnnxType.uint8()), OnnxType.tensor(OnnxType.uint16()), OnnxType.tensor(OnnxType.uint32()), OnnxType.tensor(OnnxType.uint64()), OnnxType.tensor(OnnxType.int8()), OnnxType.tensor(OnnxType.int16()), OnnxType.tensor(OnnxType.int32()), OnnxType.tensor(OnnxType.int64()), OnnxType.tensor(OnnxType.float16()), OnnxType.tensor(OnnxType.float32()), OnnxType.tensor(OnnxType.float64()), OnnxType.tensor(OnnxType.string()), OnnxType.tensor(OnnxType.bool()), OnnxType.tensor(OnnxType.complex64()), OnnxType.tensor(OnnxType.complex128())))),
27221             I(new OnnxType.TypeVariable("I", List.of(OnnxType.tensor(OnnxType.int32()), OnnxType.tensor(OnnxType.int64())))),
27222             S(new OnnxType.TypeVariable("S", List.of(OnnxType.seq(OnnxType.tensor(OnnxType.uint8())), OnnxType.seq(OnnxType.tensor(OnnxType.uint16())), OnnxType.seq(OnnxType.tensor(OnnxType.uint32())), OnnxType.seq(OnnxType.tensor(OnnxType.uint64())), OnnxType.seq(OnnxType.tensor(OnnxType.int8())), OnnxType.seq(OnnxType.tensor(OnnxType.int16())), OnnxType.seq(OnnxType.tensor(OnnxType.int32())), OnnxType.seq(OnnxType.tensor(OnnxType.int64())), OnnxType.seq(OnnxType.tensor(OnnxType.float16())), OnnxType.seq(OnnxType.tensor(OnnxType.float32())), OnnxType.seq(OnnxType.tensor(OnnxType.float64())), OnnxType.seq(OnnxType.tensor(OnnxType.string())), OnnxType.seq(OnnxType.tensor(OnnxType.bool())), OnnxType.seq(OnnxType.tensor(OnnxType.complex64())), OnnxType.seq(OnnxType.tensor(OnnxType.complex128()))))),
27223             ;
27224 
27225             final OnnxType.TypeVariable typeVariable;
27226 
27227             TypeConstraint(OnnxType.TypeVariable typeVariable) {
27228                 assert typeVariable.name().equals(name());
27229                 this.typeVariable = typeVariable;
27230             }
27231 
27232             @Override
27233             public OnnxType.TypeVariable typeVariable() {
27234                 return typeVariable;
27235             }
27236         }
27237 
27238         public enum InputParameter implements OnnxParameter {
27239             input(TypeConstraint.T.typeVariable(), Quantifier.REQUIRED),
27240             split(TypeConstraint.I.typeVariable(), Quantifier.OPTIONAL),
27241             ;
27242 
27243             final OnnxType type;
27244             final Quantifier quantifier;
27245 
27246             InputParameter(OnnxType type, Quantifier quantifier) {
27247                 this.type = type;
27248                 this.quantifier = quantifier;
27249             }
27250 
27251             @Override
27252             public OnnxType type() {
27253                 return type;
27254             }
27255 
27256             @Override
27257             public Quantifier quantifier() {
27258                 return quantifier;
27259             }
27260         }
27261 
27262         public enum OutputParameter implements OnnxParameter {
27263             output_sequence(TypeConstraint.S.typeVariable(), Quantifier.REQUIRED),
27264             ;
27265 
27266             final OnnxType type;
27267             final Quantifier quantifier;
27268 
27269             OutputParameter(OnnxType type, Quantifier quantifier) {
27270                 this.type = type;
27271                 this.quantifier = quantifier;
27272             }
27273 
27274             @Override
27275             public OnnxType type() {
27276                 return type;
27277             }
27278 
27279             @Override
27280             public Quantifier quantifier() {
27281                 return quantifier;
27282             }
27283         }
27284 
27285         public static final OnnxSchema SCHEMA = new OnnxSchemaRecord(
27286                 NAME,
27287                 List.of(Attribute.values()),
27288                 List.of(TypeConstraint.values()),
27289                 List.of(InputParameter.values()),
27290                 List.of(OutputParameter.values())
27291         );
27292 
27293         public SplitToSequence(ExternalizedOp def) {
27294             super(SCHEMA, def);
27295         }
27296 
27297         SplitToSequence(SplitToSequence that, CopyContext cc) {
27298             super(that, cc);
27299         }
27300 
27301         @Override
27302         public SplitToSequence transform(CopyContext cc, OpTransformer ot) {
27303             return new SplitToSequence(this, cc);
27304         }
27305 
27306         SplitToSequence(TypeElement resultType, Value input, java.util.Optional<Value> split, java.util.Optional<Integer> keepdims, java.util.Optional<Integer> axis) {
27307             super(SCHEMA, resultType, Set.of(), List.of(input, split), List.of(keepdims, axis));
27308         }
27309 
27310         @Override
27311         public SequencedSet<OnnxParameter> onnxOutputs() {
27312             return onnxOutputs(SCHEMA);
27313         }
27314 
27315         @Override
27316         public SequencedMap<OnnxParameter, Object> onnxInputs() {
27317             return onnxInputs(SCHEMA, List.of(input(), split()));
27318         }
27319 
27320         public Value input() {
27321             return operands().get(0);
27322         }
27323 
27324         public java.util.Optional<Value> split() {
27325             int i = optionalInputArguments.indexOf(InputParameter.split);
27326             return i != -1 ? java.util.Optional.of(operands().get(1 + i)) : java.util.Optional.empty();
27327         }
27328 
27329         public java.util.Optional<Integer> keepdims() {
27330             Integer keepdims = Attribute.keepdims.access(Integer.class, onnxAttributes);
27331             return java.util.Optional.ofNullable(keepdims);
27332         }
27333 
27334         public java.util.Optional<Integer> axis() {
27335             Integer axis = Attribute.axis.access(Integer.class, onnxAttributes);
27336             return java.util.Optional.ofNullable(axis);
27337         }
27338 
27339     }
27340 
27341     public static SplitToSequence SplitToSequence(TypeElement resultType, Value input, java.util.Optional<Value> split, java.util.Optional<Integer> keepdims, java.util.Optional<Integer> axis) {
27342         return new SplitToSequence(resultType, input, split, keepdims, axis);
27343     }
27344 
27345     @OpFactory.OpDeclaration(Sqrt.NAME)
27346     public static final class Sqrt extends OnnxOp {
27347         public static final String NAME = "Sqrt";
27348 
27349         public enum Attribute implements OnnxAttribute.None { }
27350 
27351         public enum TypeConstraint implements OnnxTypeConstraint {
27352             T(new OnnxType.TypeVariable("T", List.of(OnnxType.tensor(OnnxType.float16()), OnnxType.tensor(OnnxType.float32()), OnnxType.tensor(OnnxType.float64()), OnnxType.tensor(OnnxType.bfloat16())))),
27353             ;
27354 
27355             final OnnxType.TypeVariable typeVariable;
27356 
27357             TypeConstraint(OnnxType.TypeVariable typeVariable) {
27358                 assert typeVariable.name().equals(name());
27359                 this.typeVariable = typeVariable;
27360             }
27361 
27362             @Override
27363             public OnnxType.TypeVariable typeVariable() {
27364                 return typeVariable;
27365             }
27366         }
27367 
27368         public enum InputParameter implements OnnxParameter {
27369             X(TypeConstraint.T.typeVariable(), Quantifier.REQUIRED),
27370             ;
27371 
27372             final OnnxType type;
27373             final Quantifier quantifier;
27374 
27375             InputParameter(OnnxType type, Quantifier quantifier) {
27376                 this.type = type;
27377                 this.quantifier = quantifier;
27378             }
27379 
27380             @Override
27381             public OnnxType type() {
27382                 return type;
27383             }
27384 
27385             @Override
27386             public Quantifier quantifier() {
27387                 return quantifier;
27388             }
27389         }
27390 
27391         public enum OutputParameter implements OnnxParameter {
27392             Y(TypeConstraint.T.typeVariable(), Quantifier.REQUIRED),
27393             ;
27394 
27395             final OnnxType type;
27396             final Quantifier quantifier;
27397 
27398             OutputParameter(OnnxType type, Quantifier quantifier) {
27399                 this.type = type;
27400                 this.quantifier = quantifier;
27401             }
27402 
27403             @Override
27404             public OnnxType type() {
27405                 return type;
27406             }
27407 
27408             @Override
27409             public Quantifier quantifier() {
27410                 return quantifier;
27411             }
27412         }
27413 
27414         public static final OnnxSchema SCHEMA = new OnnxSchemaRecord(
27415                 NAME,
27416                 List.of(Attribute.values()),
27417                 List.of(TypeConstraint.values()),
27418                 List.of(InputParameter.values()),
27419                 List.of(OutputParameter.values())
27420         );
27421 
27422         public Sqrt(ExternalizedOp def) {
27423             super(SCHEMA, def);
27424         }
27425 
27426         Sqrt(Sqrt that, CopyContext cc) {
27427             super(that, cc);
27428         }
27429 
27430         @Override
27431         public Sqrt transform(CopyContext cc, OpTransformer ot) {
27432             return new Sqrt(this, cc);
27433         }
27434 
27435         Sqrt(TypeElement resultType, Value X) {
27436             super(SCHEMA, resultType, Set.of(), List.of(X), List.of());
27437         }
27438 
27439         @Override
27440         public SequencedSet<OnnxParameter> onnxOutputs() {
27441             return onnxOutputs(SCHEMA);
27442         }
27443 
27444         @Override
27445         public SequencedMap<OnnxParameter, Object> onnxInputs() {
27446             return onnxInputs(SCHEMA, List.of(X()));
27447         }
27448 
27449         public Value X() {
27450             return operands().get(0);
27451         }
27452 
27453     }
27454 
27455     public static Sqrt Sqrt(TypeElement resultType, Value X) {
27456         return new Sqrt(resultType, X);
27457     }
27458 
27459     @OpFactory.OpDeclaration(Squeeze.NAME)
27460     public static final class Squeeze extends OnnxOp {
27461         public static final String NAME = "Squeeze";
27462 
27463         public enum Attribute implements OnnxAttribute.None { }
27464 
27465         public enum TypeConstraint implements OnnxTypeConstraint {
27466             T(new OnnxType.TypeVariable("T", List.of(OnnxType.tensor(OnnxType.uint8()), OnnxType.tensor(OnnxType.uint16()), OnnxType.tensor(OnnxType.uint32()), OnnxType.tensor(OnnxType.uint64()), OnnxType.tensor(OnnxType.int8()), OnnxType.tensor(OnnxType.int16()), OnnxType.tensor(OnnxType.int32()), OnnxType.tensor(OnnxType.int64()), OnnxType.tensor(OnnxType.bfloat16()), OnnxType.tensor(OnnxType.float16()), OnnxType.tensor(OnnxType.float32()), OnnxType.tensor(OnnxType.float64()), OnnxType.tensor(OnnxType.string()), OnnxType.tensor(OnnxType.bool()), OnnxType.tensor(OnnxType.complex64()), OnnxType.tensor(OnnxType.complex128()), OnnxType.tensor(OnnxType.float8e4m3fn()), OnnxType.tensor(OnnxType.float8e4m3fnuz()), OnnxType.tensor(OnnxType.float8e5m2()), OnnxType.tensor(OnnxType.float8e5m2fnuz()), OnnxType.tensor(OnnxType.uint4()), OnnxType.tensor(OnnxType.int4()), OnnxType.tensor(OnnxType.float4e2m1())))),
27467             ;
27468 
27469             final OnnxType.TypeVariable typeVariable;
27470 
27471             TypeConstraint(OnnxType.TypeVariable typeVariable) {
27472                 assert typeVariable.name().equals(name());
27473                 this.typeVariable = typeVariable;
27474             }
27475 
27476             @Override
27477             public OnnxType.TypeVariable typeVariable() {
27478                 return typeVariable;
27479             }
27480         }
27481 
27482         public enum InputParameter implements OnnxParameter {
27483             data(TypeConstraint.T.typeVariable(), Quantifier.REQUIRED),
27484             axes(OnnxType.tensor(OnnxType.int64()), Quantifier.OPTIONAL),
27485             ;
27486 
27487             final OnnxType type;
27488             final Quantifier quantifier;
27489 
27490             InputParameter(OnnxType type, Quantifier quantifier) {
27491                 this.type = type;
27492                 this.quantifier = quantifier;
27493             }
27494 
27495             @Override
27496             public OnnxType type() {
27497                 return type;
27498             }
27499 
27500             @Override
27501             public Quantifier quantifier() {
27502                 return quantifier;
27503             }
27504         }
27505 
27506         public enum OutputParameter implements OnnxParameter {
27507             squeezed(TypeConstraint.T.typeVariable(), Quantifier.REQUIRED),
27508             ;
27509 
27510             final OnnxType type;
27511             final Quantifier quantifier;
27512 
27513             OutputParameter(OnnxType type, Quantifier quantifier) {
27514                 this.type = type;
27515                 this.quantifier = quantifier;
27516             }
27517 
27518             @Override
27519             public OnnxType type() {
27520                 return type;
27521             }
27522 
27523             @Override
27524             public Quantifier quantifier() {
27525                 return quantifier;
27526             }
27527         }
27528 
27529         public static final OnnxSchema SCHEMA = new OnnxSchemaRecord(
27530                 NAME,
27531                 List.of(Attribute.values()),
27532                 List.of(TypeConstraint.values()),
27533                 List.of(InputParameter.values()),
27534                 List.of(OutputParameter.values())
27535         );
27536 
27537         public Squeeze(ExternalizedOp def) {
27538             super(SCHEMA, def);
27539         }
27540 
27541         Squeeze(Squeeze that, CopyContext cc) {
27542             super(that, cc);
27543         }
27544 
27545         @Override
27546         public Squeeze transform(CopyContext cc, OpTransformer ot) {
27547             return new Squeeze(this, cc);
27548         }
27549 
27550         Squeeze(TypeElement resultType, Value data, java.util.Optional<Value> axes) {
27551             super(SCHEMA, resultType, Set.of(), List.of(data, axes), List.of());
27552         }
27553 
27554         @Override
27555         public SequencedSet<OnnxParameter> onnxOutputs() {
27556             return onnxOutputs(SCHEMA);
27557         }
27558 
27559         @Override
27560         public SequencedMap<OnnxParameter, Object> onnxInputs() {
27561             return onnxInputs(SCHEMA, List.of(data(), axes()));
27562         }
27563 
27564         public Value data() {
27565             return operands().get(0);
27566         }
27567 
27568         public java.util.Optional<Value> axes() {
27569             int i = optionalInputArguments.indexOf(InputParameter.axes);
27570             return i != -1 ? java.util.Optional.of(operands().get(1 + i)) : java.util.Optional.empty();
27571         }
27572 
27573     }
27574 
27575     public static Squeeze Squeeze(TypeElement resultType, Value data, java.util.Optional<Value> axes) {
27576         return new Squeeze(resultType, data, axes);
27577     }
27578 
27579     @OpFactory.OpDeclaration(StringConcat.NAME)
27580     public static final class StringConcat extends OnnxOp {
27581         public static final String NAME = "StringConcat";
27582 
27583         public enum Attribute implements OnnxAttribute.None { }
27584 
27585         public enum TypeConstraint implements OnnxTypeConstraint {
27586             T(new OnnxType.TypeVariable("T", List.of(OnnxType.tensor(OnnxType.string())))),
27587             ;
27588 
27589             final OnnxType.TypeVariable typeVariable;
27590 
27591             TypeConstraint(OnnxType.TypeVariable typeVariable) {
27592                 assert typeVariable.name().equals(name());
27593                 this.typeVariable = typeVariable;
27594             }
27595 
27596             @Override
27597             public OnnxType.TypeVariable typeVariable() {
27598                 return typeVariable;
27599             }
27600         }
27601 
27602         public enum InputParameter implements OnnxParameter {
27603             X(TypeConstraint.T.typeVariable(), Quantifier.REQUIRED),
27604             Y(TypeConstraint.T.typeVariable(), Quantifier.REQUIRED),
27605             ;
27606 
27607             final OnnxType type;
27608             final Quantifier quantifier;
27609 
27610             InputParameter(OnnxType type, Quantifier quantifier) {
27611                 this.type = type;
27612                 this.quantifier = quantifier;
27613             }
27614 
27615             @Override
27616             public OnnxType type() {
27617                 return type;
27618             }
27619 
27620             @Override
27621             public Quantifier quantifier() {
27622                 return quantifier;
27623             }
27624         }
27625 
27626         public enum OutputParameter implements OnnxParameter {
27627             Z(TypeConstraint.T.typeVariable(), Quantifier.REQUIRED),
27628             ;
27629 
27630             final OnnxType type;
27631             final Quantifier quantifier;
27632 
27633             OutputParameter(OnnxType type, Quantifier quantifier) {
27634                 this.type = type;
27635                 this.quantifier = quantifier;
27636             }
27637 
27638             @Override
27639             public OnnxType type() {
27640                 return type;
27641             }
27642 
27643             @Override
27644             public Quantifier quantifier() {
27645                 return quantifier;
27646             }
27647         }
27648 
27649         public static final OnnxSchema SCHEMA = new OnnxSchemaRecord(
27650                 NAME,
27651                 List.of(Attribute.values()),
27652                 List.of(TypeConstraint.values()),
27653                 List.of(InputParameter.values()),
27654                 List.of(OutputParameter.values())
27655         );
27656 
27657         public StringConcat(ExternalizedOp def) {
27658             super(SCHEMA, def);
27659         }
27660 
27661         StringConcat(StringConcat that, CopyContext cc) {
27662             super(that, cc);
27663         }
27664 
27665         @Override
27666         public StringConcat transform(CopyContext cc, OpTransformer ot) {
27667             return new StringConcat(this, cc);
27668         }
27669 
27670         StringConcat(TypeElement resultType, Value X, Value Y) {
27671             super(SCHEMA, resultType, Set.of(), List.of(X, Y), List.of());
27672         }
27673 
27674         @Override
27675         public SequencedSet<OnnxParameter> onnxOutputs() {
27676             return onnxOutputs(SCHEMA);
27677         }
27678 
27679         @Override
27680         public SequencedMap<OnnxParameter, Object> onnxInputs() {
27681             return onnxInputs(SCHEMA, List.of(X(), Y()));
27682         }
27683 
27684         public Value X() {
27685             return operands().get(0);
27686         }
27687 
27688         public Value Y() {
27689             return operands().get(1);
27690         }
27691 
27692     }
27693 
27694     public static StringConcat StringConcat(TypeElement resultType, Value X, Value Y) {
27695         return new StringConcat(resultType, X, Y);
27696     }
27697 
27698     @OpFactory.OpDeclaration(StringNormalizer.NAME)
27699     public static final class StringNormalizer extends OnnxOp {
27700         public static final String NAME = "StringNormalizer";
27701 
27702         public enum Attribute implements OnnxAttribute {
27703             is_case_sensitive(Integer.class, true, 0),
27704             locale(String.class, true, null),
27705             stopwords(String[].class, true, null),
27706             case_change_action(String.class, true, "NONE"),
27707             ;
27708 
27709                 final Class<?> t;
27710                 final boolean optional;
27711                 final Object defaultValue;
27712 
27713                 Attribute(Class<?> type, boolean optional, Object defaultValue) {
27714                     this.t = type;
27715                     this.optional = optional;
27716                     this.defaultValue = defaultValue;
27717                     assert optional || defaultValue == null;
27718                 }
27719 
27720                 public Class<?> type() {
27721                     return t;
27722                 }
27723 
27724                 public boolean isOptional() {
27725                     return optional;
27726                 }
27727 
27728                 public Object defaultValue() {
27729                     return defaultValue;
27730                 }
27731         }
27732 
27733         public enum TypeConstraint implements OnnxTypeConstraint.None { }
27734 
27735         public enum InputParameter implements OnnxParameter {
27736             X(OnnxType.tensor(OnnxType.string()), Quantifier.REQUIRED),
27737             ;
27738 
27739             final OnnxType type;
27740             final Quantifier quantifier;
27741 
27742             InputParameter(OnnxType type, Quantifier quantifier) {
27743                 this.type = type;
27744                 this.quantifier = quantifier;
27745             }
27746 
27747             @Override
27748             public OnnxType type() {
27749                 return type;
27750             }
27751 
27752             @Override
27753             public Quantifier quantifier() {
27754                 return quantifier;
27755             }
27756         }
27757 
27758         public enum OutputParameter implements OnnxParameter {
27759             Y(OnnxType.tensor(OnnxType.string()), Quantifier.REQUIRED),
27760             ;
27761 
27762             final OnnxType type;
27763             final Quantifier quantifier;
27764 
27765             OutputParameter(OnnxType type, Quantifier quantifier) {
27766                 this.type = type;
27767                 this.quantifier = quantifier;
27768             }
27769 
27770             @Override
27771             public OnnxType type() {
27772                 return type;
27773             }
27774 
27775             @Override
27776             public Quantifier quantifier() {
27777                 return quantifier;
27778             }
27779         }
27780 
27781         public static final OnnxSchema SCHEMA = new OnnxSchemaRecord(
27782                 NAME,
27783                 List.of(Attribute.values()),
27784                 List.of(TypeConstraint.values()),
27785                 List.of(InputParameter.values()),
27786                 List.of(OutputParameter.values())
27787         );
27788 
27789         public StringNormalizer(ExternalizedOp def) {
27790             super(SCHEMA, def);
27791         }
27792 
27793         StringNormalizer(StringNormalizer that, CopyContext cc) {
27794             super(that, cc);
27795         }
27796 
27797         @Override
27798         public StringNormalizer transform(CopyContext cc, OpTransformer ot) {
27799             return new StringNormalizer(this, cc);
27800         }
27801 
27802         StringNormalizer(TypeElement resultType, Value X, java.util.Optional<Integer> is_case_sensitive, java.util.Optional<String> locale, java.util.Optional<String[]> stopwords, java.util.Optional<String> case_change_action) {
27803             super(SCHEMA, resultType, Set.of(), List.of(X), List.of(is_case_sensitive, locale, stopwords, case_change_action));
27804         }
27805 
27806         @Override
27807         public SequencedSet<OnnxParameter> onnxOutputs() {
27808             return onnxOutputs(SCHEMA);
27809         }
27810 
27811         @Override
27812         public SequencedMap<OnnxParameter, Object> onnxInputs() {
27813             return onnxInputs(SCHEMA, List.of(X()));
27814         }
27815 
27816         public Value X() {
27817             return operands().get(0);
27818         }
27819 
27820         public java.util.Optional<Integer> is_case_sensitive() {
27821             Integer is_case_sensitive = Attribute.is_case_sensitive.access(Integer.class, onnxAttributes);
27822             return java.util.Optional.ofNullable(is_case_sensitive);
27823         }
27824 
27825         public java.util.Optional<String> locale() {
27826             String locale = Attribute.locale.access(String.class, onnxAttributes);
27827             return java.util.Optional.ofNullable(locale);
27828         }
27829 
27830         public java.util.Optional<String[]> stopwords() {
27831             String[] stopwords = Attribute.stopwords.access(String[].class, onnxAttributes);
27832             return java.util.Optional.ofNullable(stopwords).map(String[]::clone);
27833         }
27834 
27835         public java.util.Optional<String> case_change_action() {
27836             String case_change_action = Attribute.case_change_action.access(String.class, onnxAttributes);
27837             return java.util.Optional.ofNullable(case_change_action);
27838         }
27839 
27840     }
27841 
27842     public static StringNormalizer StringNormalizer(TypeElement resultType, Value X, java.util.Optional<Integer> is_case_sensitive, java.util.Optional<String> locale, java.util.Optional<String[]> stopwords, java.util.Optional<String> case_change_action) {
27843         return new StringNormalizer(resultType, X, is_case_sensitive, locale, stopwords, case_change_action);
27844     }
27845 
27846     @OpFactory.OpDeclaration(StringSplit.NAME)
27847     public static final class StringSplit extends OnnxOp {
27848         public static final String NAME = "StringSplit";
27849 
27850         public enum Attribute implements OnnxAttribute {
27851             delimiter(String.class, true, null),
27852             maxsplit(Integer.class, true, null),
27853             ;
27854 
27855                 final Class<?> t;
27856                 final boolean optional;
27857                 final Object defaultValue;
27858 
27859                 Attribute(Class<?> type, boolean optional, Object defaultValue) {
27860                     this.t = type;
27861                     this.optional = optional;
27862                     this.defaultValue = defaultValue;
27863                     assert optional || defaultValue == null;
27864                 }
27865 
27866                 public Class<?> type() {
27867                     return t;
27868                 }
27869 
27870                 public boolean isOptional() {
27871                     return optional;
27872                 }
27873 
27874                 public Object defaultValue() {
27875                     return defaultValue;
27876                 }
27877         }
27878 
27879         public enum TypeConstraint implements OnnxTypeConstraint {
27880             T1(new OnnxType.TypeVariable("T1", List.of(OnnxType.tensor(OnnxType.string())))),
27881             T2(new OnnxType.TypeVariable("T2", List.of(OnnxType.tensor(OnnxType.string())))),
27882             T3(new OnnxType.TypeVariable("T3", List.of(OnnxType.tensor(OnnxType.int64())))),
27883             ;
27884 
27885             final OnnxType.TypeVariable typeVariable;
27886 
27887             TypeConstraint(OnnxType.TypeVariable typeVariable) {
27888                 assert typeVariable.name().equals(name());
27889                 this.typeVariable = typeVariable;
27890             }
27891 
27892             @Override
27893             public OnnxType.TypeVariable typeVariable() {
27894                 return typeVariable;
27895             }
27896         }
27897 
27898         public enum InputParameter implements OnnxParameter {
27899             X(TypeConstraint.T1.typeVariable(), Quantifier.REQUIRED),
27900             ;
27901 
27902             final OnnxType type;
27903             final Quantifier quantifier;
27904 
27905             InputParameter(OnnxType type, Quantifier quantifier) {
27906                 this.type = type;
27907                 this.quantifier = quantifier;
27908             }
27909 
27910             @Override
27911             public OnnxType type() {
27912                 return type;
27913             }
27914 
27915             @Override
27916             public Quantifier quantifier() {
27917                 return quantifier;
27918             }
27919         }
27920 
27921         public enum OutputParameter implements OnnxParameter {
27922             Y(TypeConstraint.T2.typeVariable(), Quantifier.REQUIRED),
27923             Z(TypeConstraint.T3.typeVariable(), Quantifier.REQUIRED),
27924             ;
27925 
27926             final OnnxType type;
27927             final Quantifier quantifier;
27928 
27929             OutputParameter(OnnxType type, Quantifier quantifier) {
27930                 this.type = type;
27931                 this.quantifier = quantifier;
27932             }
27933 
27934             @Override
27935             public OnnxType type() {
27936                 return type;
27937             }
27938 
27939             @Override
27940             public Quantifier quantifier() {
27941                 return quantifier;
27942             }
27943         }
27944 
27945         public static final OnnxSchema SCHEMA = new OnnxSchemaRecord(
27946                 NAME,
27947                 List.of(Attribute.values()),
27948                 List.of(TypeConstraint.values()),
27949                 List.of(InputParameter.values()),
27950                 List.of(OutputParameter.values())
27951         );
27952 
27953         public StringSplit(ExternalizedOp def) {
27954             super(SCHEMA, def);
27955         }
27956 
27957         StringSplit(StringSplit that, CopyContext cc) {
27958             super(that, cc);
27959         }
27960 
27961         @Override
27962         public StringSplit transform(CopyContext cc, OpTransformer ot) {
27963             return new StringSplit(this, cc);
27964         }
27965 
27966         StringSplit(TypeElement resultType, Value X, java.util.Optional<String> delimiter, java.util.Optional<Integer> maxsplit) {
27967             super(SCHEMA, resultType, Set.of(), List.of(X), List.of(delimiter, maxsplit));
27968         }
27969 
27970         @Override
27971         public SequencedSet<OnnxParameter> onnxOutputs() {
27972             return onnxOutputs(SCHEMA);
27973         }
27974 
27975         @Override
27976         public SequencedMap<OnnxParameter, Object> onnxInputs() {
27977             return onnxInputs(SCHEMA, List.of(X()));
27978         }
27979 
27980         public Value X() {
27981             return operands().get(0);
27982         }
27983 
27984         public java.util.Optional<String> delimiter() {
27985             String delimiter = Attribute.delimiter.access(String.class, onnxAttributes);
27986             return java.util.Optional.ofNullable(delimiter);
27987         }
27988 
27989         public java.util.Optional<Integer> maxsplit() {
27990             Integer maxsplit = Attribute.maxsplit.access(Integer.class, onnxAttributes);
27991             return java.util.Optional.ofNullable(maxsplit);
27992         }
27993 
27994     }
27995 
27996     public static StringSplit StringSplit(TypeElement resultType, Value X, java.util.Optional<String> delimiter, java.util.Optional<Integer> maxsplit) {
27997         return new StringSplit(resultType, X, delimiter, maxsplit);
27998     }
27999 
28000     @OpFactory.OpDeclaration(Sub.NAME)
28001     public static final class Sub extends OnnxOp {
28002         public static final String NAME = "Sub";
28003 
28004         public enum Attribute implements OnnxAttribute.None { }
28005 
28006         public enum TypeConstraint implements OnnxTypeConstraint {
28007             T(new OnnxType.TypeVariable("T", List.of(OnnxType.tensor(OnnxType.uint8()), OnnxType.tensor(OnnxType.uint16()), OnnxType.tensor(OnnxType.uint32()), OnnxType.tensor(OnnxType.uint64()), OnnxType.tensor(OnnxType.int8()), OnnxType.tensor(OnnxType.int16()), OnnxType.tensor(OnnxType.int32()), OnnxType.tensor(OnnxType.int64()), OnnxType.tensor(OnnxType.float16()), OnnxType.tensor(OnnxType.float32()), OnnxType.tensor(OnnxType.float64()), OnnxType.tensor(OnnxType.bfloat16())))),
28008             ;
28009 
28010             final OnnxType.TypeVariable typeVariable;
28011 
28012             TypeConstraint(OnnxType.TypeVariable typeVariable) {
28013                 assert typeVariable.name().equals(name());
28014                 this.typeVariable = typeVariable;
28015             }
28016 
28017             @Override
28018             public OnnxType.TypeVariable typeVariable() {
28019                 return typeVariable;
28020             }
28021         }
28022 
28023         public enum InputParameter implements OnnxParameter {
28024             A(TypeConstraint.T.typeVariable(), Quantifier.REQUIRED),
28025             B(TypeConstraint.T.typeVariable(), Quantifier.REQUIRED),
28026             ;
28027 
28028             final OnnxType type;
28029             final Quantifier quantifier;
28030 
28031             InputParameter(OnnxType type, Quantifier quantifier) {
28032                 this.type = type;
28033                 this.quantifier = quantifier;
28034             }
28035 
28036             @Override
28037             public OnnxType type() {
28038                 return type;
28039             }
28040 
28041             @Override
28042             public Quantifier quantifier() {
28043                 return quantifier;
28044             }
28045         }
28046 
28047         public enum OutputParameter implements OnnxParameter {
28048             C(TypeConstraint.T.typeVariable(), Quantifier.REQUIRED),
28049             ;
28050 
28051             final OnnxType type;
28052             final Quantifier quantifier;
28053 
28054             OutputParameter(OnnxType type, Quantifier quantifier) {
28055                 this.type = type;
28056                 this.quantifier = quantifier;
28057             }
28058 
28059             @Override
28060             public OnnxType type() {
28061                 return type;
28062             }
28063 
28064             @Override
28065             public Quantifier quantifier() {
28066                 return quantifier;
28067             }
28068         }
28069 
28070         public static final OnnxSchema SCHEMA = new OnnxSchemaRecord(
28071                 NAME,
28072                 List.of(Attribute.values()),
28073                 List.of(TypeConstraint.values()),
28074                 List.of(InputParameter.values()),
28075                 List.of(OutputParameter.values())
28076         );
28077 
28078         public Sub(ExternalizedOp def) {
28079             super(SCHEMA, def);
28080         }
28081 
28082         Sub(Sub that, CopyContext cc) {
28083             super(that, cc);
28084         }
28085 
28086         @Override
28087         public Sub transform(CopyContext cc, OpTransformer ot) {
28088             return new Sub(this, cc);
28089         }
28090 
28091         Sub(TypeElement resultType, Value A, Value B) {
28092             super(SCHEMA, resultType, Set.of(), List.of(A, B), List.of());
28093         }
28094 
28095         @Override
28096         public SequencedSet<OnnxParameter> onnxOutputs() {
28097             return onnxOutputs(SCHEMA);
28098         }
28099 
28100         @Override
28101         public SequencedMap<OnnxParameter, Object> onnxInputs() {
28102             return onnxInputs(SCHEMA, List.of(A(), B()));
28103         }
28104 
28105         public Value A() {
28106             return operands().get(0);
28107         }
28108 
28109         public Value B() {
28110             return operands().get(1);
28111         }
28112 
28113     }
28114 
28115     public static Sub Sub(TypeElement resultType, Value A, Value B) {
28116         return new Sub(resultType, A, B);
28117     }
28118 
28119     @OpFactory.OpDeclaration(Sum.NAME)
28120     public static final class Sum extends OnnxOp {
28121         public static final String NAME = "Sum";
28122 
28123         public enum Attribute implements OnnxAttribute.None { }
28124 
28125         public enum TypeConstraint implements OnnxTypeConstraint {
28126             T(new OnnxType.TypeVariable("T", List.of(OnnxType.tensor(OnnxType.float16()), OnnxType.tensor(OnnxType.float32()), OnnxType.tensor(OnnxType.float64()), OnnxType.tensor(OnnxType.bfloat16())))),
28127             ;
28128 
28129             final OnnxType.TypeVariable typeVariable;
28130 
28131             TypeConstraint(OnnxType.TypeVariable typeVariable) {
28132                 assert typeVariable.name().equals(name());
28133                 this.typeVariable = typeVariable;
28134             }
28135 
28136             @Override
28137             public OnnxType.TypeVariable typeVariable() {
28138                 return typeVariable;
28139             }
28140         }
28141 
28142         public enum InputParameter implements OnnxParameter {
28143             data_0(TypeConstraint.T.typeVariable(), Quantifier.VARIADIC),
28144             ;
28145 
28146             final OnnxType type;
28147             final Quantifier quantifier;
28148 
28149             InputParameter(OnnxType type, Quantifier quantifier) {
28150                 this.type = type;
28151                 this.quantifier = quantifier;
28152             }
28153 
28154             @Override
28155             public OnnxType type() {
28156                 return type;
28157             }
28158 
28159             @Override
28160             public Quantifier quantifier() {
28161                 return quantifier;
28162             }
28163         }
28164 
28165         public enum OutputParameter implements OnnxParameter {
28166             sum(TypeConstraint.T.typeVariable(), Quantifier.REQUIRED),
28167             ;
28168 
28169             final OnnxType type;
28170             final Quantifier quantifier;
28171 
28172             OutputParameter(OnnxType type, Quantifier quantifier) {
28173                 this.type = type;
28174                 this.quantifier = quantifier;
28175             }
28176 
28177             @Override
28178             public OnnxType type() {
28179                 return type;
28180             }
28181 
28182             @Override
28183             public Quantifier quantifier() {
28184                 return quantifier;
28185             }
28186         }
28187 
28188         public static final OnnxSchema SCHEMA = new OnnxSchemaRecord(
28189                 NAME,
28190                 List.of(Attribute.values()),
28191                 List.of(TypeConstraint.values()),
28192                 List.of(InputParameter.values()),
28193                 List.of(OutputParameter.values())
28194         );
28195 
28196         public Sum(ExternalizedOp def) {
28197             super(SCHEMA, def);
28198         }
28199 
28200         Sum(Sum that, CopyContext cc) {
28201             super(that, cc);
28202         }
28203 
28204         @Override
28205         public Sum transform(CopyContext cc, OpTransformer ot) {
28206             return new Sum(this, cc);
28207         }
28208 
28209         Sum(TypeElement resultType, List<Value> data_0) {
28210             super(SCHEMA, resultType, Set.of(), List.of(data_0), List.of());
28211         }
28212 
28213         @Override
28214         public SequencedSet<OnnxParameter> onnxOutputs() {
28215             return onnxOutputs(SCHEMA);
28216         }
28217 
28218         @Override
28219         public SequencedMap<OnnxParameter, Object> onnxInputs() {
28220             return onnxInputs(SCHEMA, List.of(data_0()));
28221         }
28222 
28223         public List<Value> data_0() {
28224             return operands();
28225         }
28226 
28227     }
28228 
28229     public static Sum Sum(TypeElement resultType, List<Value> data_0) {
28230         return new Sum(resultType, data_0);
28231     }
28232 
28233     @OpFactory.OpDeclaration(Tan.NAME)
28234     public static final class Tan extends OnnxOp {
28235         public static final String NAME = "Tan";
28236 
28237         public enum Attribute implements OnnxAttribute.None { }
28238 
28239         public enum TypeConstraint implements OnnxTypeConstraint {
28240             T(new OnnxType.TypeVariable("T", List.of(OnnxType.tensor(OnnxType.bfloat16()), OnnxType.tensor(OnnxType.float16()), OnnxType.tensor(OnnxType.float32()), OnnxType.tensor(OnnxType.float64())))),
28241             ;
28242 
28243             final OnnxType.TypeVariable typeVariable;
28244 
28245             TypeConstraint(OnnxType.TypeVariable typeVariable) {
28246                 assert typeVariable.name().equals(name());
28247                 this.typeVariable = typeVariable;
28248             }
28249 
28250             @Override
28251             public OnnxType.TypeVariable typeVariable() {
28252                 return typeVariable;
28253             }
28254         }
28255 
28256         public enum InputParameter implements OnnxParameter {
28257             input(TypeConstraint.T.typeVariable(), Quantifier.REQUIRED),
28258             ;
28259 
28260             final OnnxType type;
28261             final Quantifier quantifier;
28262 
28263             InputParameter(OnnxType type, Quantifier quantifier) {
28264                 this.type = type;
28265                 this.quantifier = quantifier;
28266             }
28267 
28268             @Override
28269             public OnnxType type() {
28270                 return type;
28271             }
28272 
28273             @Override
28274             public Quantifier quantifier() {
28275                 return quantifier;
28276             }
28277         }
28278 
28279         public enum OutputParameter implements OnnxParameter {
28280             output(TypeConstraint.T.typeVariable(), Quantifier.REQUIRED),
28281             ;
28282 
28283             final OnnxType type;
28284             final Quantifier quantifier;
28285 
28286             OutputParameter(OnnxType type, Quantifier quantifier) {
28287                 this.type = type;
28288                 this.quantifier = quantifier;
28289             }
28290 
28291             @Override
28292             public OnnxType type() {
28293                 return type;
28294             }
28295 
28296             @Override
28297             public Quantifier quantifier() {
28298                 return quantifier;
28299             }
28300         }
28301 
28302         public static final OnnxSchema SCHEMA = new OnnxSchemaRecord(
28303                 NAME,
28304                 List.of(Attribute.values()),
28305                 List.of(TypeConstraint.values()),
28306                 List.of(InputParameter.values()),
28307                 List.of(OutputParameter.values())
28308         );
28309 
28310         public Tan(ExternalizedOp def) {
28311             super(SCHEMA, def);
28312         }
28313 
28314         Tan(Tan that, CopyContext cc) {
28315             super(that, cc);
28316         }
28317 
28318         @Override
28319         public Tan transform(CopyContext cc, OpTransformer ot) {
28320             return new Tan(this, cc);
28321         }
28322 
28323         Tan(TypeElement resultType, Value input) {
28324             super(SCHEMA, resultType, Set.of(), List.of(input), List.of());
28325         }
28326 
28327         @Override
28328         public SequencedSet<OnnxParameter> onnxOutputs() {
28329             return onnxOutputs(SCHEMA);
28330         }
28331 
28332         @Override
28333         public SequencedMap<OnnxParameter, Object> onnxInputs() {
28334             return onnxInputs(SCHEMA, List.of(input()));
28335         }
28336 
28337         public Value input() {
28338             return operands().get(0);
28339         }
28340 
28341     }
28342 
28343     public static Tan Tan(TypeElement resultType, Value input) {
28344         return new Tan(resultType, input);
28345     }
28346 
28347     @OpFactory.OpDeclaration(Tanh.NAME)
28348     public static final class Tanh extends OnnxOp {
28349         public static final String NAME = "Tanh";
28350 
28351         public enum Attribute implements OnnxAttribute.None { }
28352 
28353         public enum TypeConstraint implements OnnxTypeConstraint {
28354             T(new OnnxType.TypeVariable("T", List.of(OnnxType.tensor(OnnxType.bfloat16()), OnnxType.tensor(OnnxType.float16()), OnnxType.tensor(OnnxType.float32()), OnnxType.tensor(OnnxType.float64())))),
28355             ;
28356 
28357             final OnnxType.TypeVariable typeVariable;
28358 
28359             TypeConstraint(OnnxType.TypeVariable typeVariable) {
28360                 assert typeVariable.name().equals(name());
28361                 this.typeVariable = typeVariable;
28362             }
28363 
28364             @Override
28365             public OnnxType.TypeVariable typeVariable() {
28366                 return typeVariable;
28367             }
28368         }
28369 
28370         public enum InputParameter implements OnnxParameter {
28371             input(TypeConstraint.T.typeVariable(), Quantifier.REQUIRED),
28372             ;
28373 
28374             final OnnxType type;
28375             final Quantifier quantifier;
28376 
28377             InputParameter(OnnxType type, Quantifier quantifier) {
28378                 this.type = type;
28379                 this.quantifier = quantifier;
28380             }
28381 
28382             @Override
28383             public OnnxType type() {
28384                 return type;
28385             }
28386 
28387             @Override
28388             public Quantifier quantifier() {
28389                 return quantifier;
28390             }
28391         }
28392 
28393         public enum OutputParameter implements OnnxParameter {
28394             output(TypeConstraint.T.typeVariable(), Quantifier.REQUIRED),
28395             ;
28396 
28397             final OnnxType type;
28398             final Quantifier quantifier;
28399 
28400             OutputParameter(OnnxType type, Quantifier quantifier) {
28401                 this.type = type;
28402                 this.quantifier = quantifier;
28403             }
28404 
28405             @Override
28406             public OnnxType type() {
28407                 return type;
28408             }
28409 
28410             @Override
28411             public Quantifier quantifier() {
28412                 return quantifier;
28413             }
28414         }
28415 
28416         public static final OnnxSchema SCHEMA = new OnnxSchemaRecord(
28417                 NAME,
28418                 List.of(Attribute.values()),
28419                 List.of(TypeConstraint.values()),
28420                 List.of(InputParameter.values()),
28421                 List.of(OutputParameter.values())
28422         );
28423 
28424         public Tanh(ExternalizedOp def) {
28425             super(SCHEMA, def);
28426         }
28427 
28428         Tanh(Tanh that, CopyContext cc) {
28429             super(that, cc);
28430         }
28431 
28432         @Override
28433         public Tanh transform(CopyContext cc, OpTransformer ot) {
28434             return new Tanh(this, cc);
28435         }
28436 
28437         Tanh(TypeElement resultType, Value input) {
28438             super(SCHEMA, resultType, Set.of(), List.of(input), List.of());
28439         }
28440 
28441         @Override
28442         public SequencedSet<OnnxParameter> onnxOutputs() {
28443             return onnxOutputs(SCHEMA);
28444         }
28445 
28446         @Override
28447         public SequencedMap<OnnxParameter, Object> onnxInputs() {
28448             return onnxInputs(SCHEMA, List.of(input()));
28449         }
28450 
28451         public Value input() {
28452             return operands().get(0);
28453         }
28454 
28455     }
28456 
28457     public static Tanh Tanh(TypeElement resultType, Value input) {
28458         return new Tanh(resultType, input);
28459     }
28460 
28461     @OpFactory.OpDeclaration(TfIdfVectorizer.NAME)
28462     public static final class TfIdfVectorizer extends OnnxOp {
28463         public static final String NAME = "TfIdfVectorizer";
28464 
28465         public enum Attribute implements OnnxAttribute {
28466             ngram_counts(int[].class, false, null),
28467             min_gram_length(Integer.class, false, null),
28468             pool_strings(String[].class, true, null),
28469             mode(String.class, false, null),
28470             max_gram_length(Integer.class, false, null),
28471             max_skip_count(Integer.class, false, null),
28472             pool_int64s(int[].class, true, null),
28473             weights(float[].class, true, null),
28474             ngram_indexes(int[].class, false, null),
28475             ;
28476 
28477                 final Class<?> t;
28478                 final boolean optional;
28479                 final Object defaultValue;
28480 
28481                 Attribute(Class<?> type, boolean optional, Object defaultValue) {
28482                     this.t = type;
28483                     this.optional = optional;
28484                     this.defaultValue = defaultValue;
28485                     assert optional || defaultValue == null;
28486                 }
28487 
28488                 public Class<?> type() {
28489                     return t;
28490                 }
28491 
28492                 public boolean isOptional() {
28493                     return optional;
28494                 }
28495 
28496                 public Object defaultValue() {
28497                     return defaultValue;
28498                 }
28499         }
28500 
28501         public enum TypeConstraint implements OnnxTypeConstraint {
28502             T(new OnnxType.TypeVariable("T", List.of(OnnxType.tensor(OnnxType.string()), OnnxType.tensor(OnnxType.int32()), OnnxType.tensor(OnnxType.int64())))),
28503             T1(new OnnxType.TypeVariable("T1", List.of(OnnxType.tensor(OnnxType.float32())))),
28504             ;
28505 
28506             final OnnxType.TypeVariable typeVariable;
28507 
28508             TypeConstraint(OnnxType.TypeVariable typeVariable) {
28509                 assert typeVariable.name().equals(name());
28510                 this.typeVariable = typeVariable;
28511             }
28512 
28513             @Override
28514             public OnnxType.TypeVariable typeVariable() {
28515                 return typeVariable;
28516             }
28517         }
28518 
28519         public enum InputParameter implements OnnxParameter {
28520             X(TypeConstraint.T.typeVariable(), Quantifier.REQUIRED),
28521             ;
28522 
28523             final OnnxType type;
28524             final Quantifier quantifier;
28525 
28526             InputParameter(OnnxType type, Quantifier quantifier) {
28527                 this.type = type;
28528                 this.quantifier = quantifier;
28529             }
28530 
28531             @Override
28532             public OnnxType type() {
28533                 return type;
28534             }
28535 
28536             @Override
28537             public Quantifier quantifier() {
28538                 return quantifier;
28539             }
28540         }
28541 
28542         public enum OutputParameter implements OnnxParameter {
28543             Y(TypeConstraint.T1.typeVariable(), Quantifier.REQUIRED),
28544             ;
28545 
28546             final OnnxType type;
28547             final Quantifier quantifier;
28548 
28549             OutputParameter(OnnxType type, Quantifier quantifier) {
28550                 this.type = type;
28551                 this.quantifier = quantifier;
28552             }
28553 
28554             @Override
28555             public OnnxType type() {
28556                 return type;
28557             }
28558 
28559             @Override
28560             public Quantifier quantifier() {
28561                 return quantifier;
28562             }
28563         }
28564 
28565         public static final OnnxSchema SCHEMA = new OnnxSchemaRecord(
28566                 NAME,
28567                 List.of(Attribute.values()),
28568                 List.of(TypeConstraint.values()),
28569                 List.of(InputParameter.values()),
28570                 List.of(OutputParameter.values())
28571         );
28572 
28573         public TfIdfVectorizer(ExternalizedOp def) {
28574             super(SCHEMA, def);
28575         }
28576 
28577         TfIdfVectorizer(TfIdfVectorizer that, CopyContext cc) {
28578             super(that, cc);
28579         }
28580 
28581         @Override
28582         public TfIdfVectorizer transform(CopyContext cc, OpTransformer ot) {
28583             return new TfIdfVectorizer(this, cc);
28584         }
28585 
28586         TfIdfVectorizer(TypeElement resultType, Value X, int[] ngram_counts, int min_gram_length, java.util.Optional<String[]> pool_strings, String mode, int max_gram_length, int max_skip_count, java.util.Optional<int[]> pool_int64s, java.util.Optional<float[]> weights, int[] ngram_indexes) {
28587             super(SCHEMA, resultType, Set.of(), List.of(X), List.of(ngram_counts, min_gram_length, pool_strings, mode, max_gram_length, max_skip_count, pool_int64s, weights, ngram_indexes));
28588         }
28589 
28590         @Override
28591         public SequencedSet<OnnxParameter> onnxOutputs() {
28592             return onnxOutputs(SCHEMA);
28593         }
28594 
28595         @Override
28596         public SequencedMap<OnnxParameter, Object> onnxInputs() {
28597             return onnxInputs(SCHEMA, List.of(X()));
28598         }
28599 
28600         public Value X() {
28601             return operands().get(0);
28602         }
28603 
28604         public int[] ngram_counts() {
28605             int[] ngram_counts = Attribute.ngram_counts.access(int[].class, onnxAttributes);
28606             return ngram_counts.clone();
28607         }
28608 
28609         public int min_gram_length() {
28610             int min_gram_length = Attribute.min_gram_length.access(int.class, onnxAttributes);
28611             return min_gram_length;
28612         }
28613 
28614         public java.util.Optional<String[]> pool_strings() {
28615             String[] pool_strings = Attribute.pool_strings.access(String[].class, onnxAttributes);
28616             return java.util.Optional.ofNullable(pool_strings).map(String[]::clone);
28617         }
28618 
28619         public String mode() {
28620             String mode = Attribute.mode.access(String.class, onnxAttributes);
28621             return mode;
28622         }
28623 
28624         public int max_gram_length() {
28625             int max_gram_length = Attribute.max_gram_length.access(int.class, onnxAttributes);
28626             return max_gram_length;
28627         }
28628 
28629         public int max_skip_count() {
28630             int max_skip_count = Attribute.max_skip_count.access(int.class, onnxAttributes);
28631             return max_skip_count;
28632         }
28633 
28634         public java.util.Optional<int[]> pool_int64s() {
28635             int[] pool_int64s = Attribute.pool_int64s.access(int[].class, onnxAttributes);
28636             return java.util.Optional.ofNullable(pool_int64s).map(int[]::clone);
28637         }
28638 
28639         public java.util.Optional<float[]> weights() {
28640             float[] weights = Attribute.weights.access(float[].class, onnxAttributes);
28641             return java.util.Optional.ofNullable(weights).map(float[]::clone);
28642         }
28643 
28644         public int[] ngram_indexes() {
28645             int[] ngram_indexes = Attribute.ngram_indexes.access(int[].class, onnxAttributes);
28646             return ngram_indexes.clone();
28647         }
28648 
28649     }
28650 
28651     public static TfIdfVectorizer TfIdfVectorizer(TypeElement resultType, Value X, int[] ngram_counts, int min_gram_length, java.util.Optional<String[]> pool_strings, String mode, int max_gram_length, int max_skip_count, java.util.Optional<int[]> pool_int64s, java.util.Optional<float[]> weights, int[] ngram_indexes) {
28652         return new TfIdfVectorizer(resultType, X, ngram_counts, min_gram_length, pool_strings, mode, max_gram_length, max_skip_count, pool_int64s, weights, ngram_indexes);
28653     }
28654 
28655     @OpFactory.OpDeclaration(ThresholdedRelu.NAME)
28656     public static final class ThresholdedRelu extends OnnxOp {
28657         public static final String NAME = "ThresholdedRelu";
28658 
28659         public enum Attribute implements OnnxAttribute {
28660             alpha(Float.class, true, 1.0f),
28661             ;
28662 
28663                 final Class<?> t;
28664                 final boolean optional;
28665                 final Object defaultValue;
28666 
28667                 Attribute(Class<?> type, boolean optional, Object defaultValue) {
28668                     this.t = type;
28669                     this.optional = optional;
28670                     this.defaultValue = defaultValue;
28671                     assert optional || defaultValue == null;
28672                 }
28673 
28674                 public Class<?> type() {
28675                     return t;
28676                 }
28677 
28678                 public boolean isOptional() {
28679                     return optional;
28680                 }
28681 
28682                 public Object defaultValue() {
28683                     return defaultValue;
28684                 }
28685         }
28686 
28687         public enum TypeConstraint implements OnnxTypeConstraint {
28688             T(new OnnxType.TypeVariable("T", List.of(OnnxType.tensor(OnnxType.bfloat16()), OnnxType.tensor(OnnxType.float16()), OnnxType.tensor(OnnxType.float32()), OnnxType.tensor(OnnxType.float64())))),
28689             ;
28690 
28691             final OnnxType.TypeVariable typeVariable;
28692 
28693             TypeConstraint(OnnxType.TypeVariable typeVariable) {
28694                 assert typeVariable.name().equals(name());
28695                 this.typeVariable = typeVariable;
28696             }
28697 
28698             @Override
28699             public OnnxType.TypeVariable typeVariable() {
28700                 return typeVariable;
28701             }
28702         }
28703 
28704         public enum InputParameter implements OnnxParameter {
28705             X(TypeConstraint.T.typeVariable(), Quantifier.REQUIRED),
28706             ;
28707 
28708             final OnnxType type;
28709             final Quantifier quantifier;
28710 
28711             InputParameter(OnnxType type, Quantifier quantifier) {
28712                 this.type = type;
28713                 this.quantifier = quantifier;
28714             }
28715 
28716             @Override
28717             public OnnxType type() {
28718                 return type;
28719             }
28720 
28721             @Override
28722             public Quantifier quantifier() {
28723                 return quantifier;
28724             }
28725         }
28726 
28727         public enum OutputParameter implements OnnxParameter {
28728             Y(TypeConstraint.T.typeVariable(), Quantifier.REQUIRED),
28729             ;
28730 
28731             final OnnxType type;
28732             final Quantifier quantifier;
28733 
28734             OutputParameter(OnnxType type, Quantifier quantifier) {
28735                 this.type = type;
28736                 this.quantifier = quantifier;
28737             }
28738 
28739             @Override
28740             public OnnxType type() {
28741                 return type;
28742             }
28743 
28744             @Override
28745             public Quantifier quantifier() {
28746                 return quantifier;
28747             }
28748         }
28749 
28750         public static final OnnxSchema SCHEMA = new OnnxSchemaRecord(
28751                 NAME,
28752                 List.of(Attribute.values()),
28753                 List.of(TypeConstraint.values()),
28754                 List.of(InputParameter.values()),
28755                 List.of(OutputParameter.values())
28756         );
28757 
28758         public ThresholdedRelu(ExternalizedOp def) {
28759             super(SCHEMA, def);
28760         }
28761 
28762         ThresholdedRelu(ThresholdedRelu that, CopyContext cc) {
28763             super(that, cc);
28764         }
28765 
28766         @Override
28767         public ThresholdedRelu transform(CopyContext cc, OpTransformer ot) {
28768             return new ThresholdedRelu(this, cc);
28769         }
28770 
28771         ThresholdedRelu(TypeElement resultType, Value X, java.util.Optional<Float> alpha) {
28772             super(SCHEMA, resultType, Set.of(), List.of(X), List.of(alpha));
28773         }
28774 
28775         @Override
28776         public SequencedSet<OnnxParameter> onnxOutputs() {
28777             return onnxOutputs(SCHEMA);
28778         }
28779 
28780         @Override
28781         public SequencedMap<OnnxParameter, Object> onnxInputs() {
28782             return onnxInputs(SCHEMA, List.of(X()));
28783         }
28784 
28785         public Value X() {
28786             return operands().get(0);
28787         }
28788 
28789         public java.util.Optional<Float> alpha() {
28790             Float alpha = Attribute.alpha.access(Float.class, onnxAttributes);
28791             return java.util.Optional.ofNullable(alpha);
28792         }
28793 
28794     }
28795 
28796     public static ThresholdedRelu ThresholdedRelu(TypeElement resultType, Value X, java.util.Optional<Float> alpha) {
28797         return new ThresholdedRelu(resultType, X, alpha);
28798     }
28799 
28800     @OpFactory.OpDeclaration(Tile.NAME)
28801     public static final class Tile extends OnnxOp {
28802         public static final String NAME = "Tile";
28803 
28804         public enum Attribute implements OnnxAttribute.None { }
28805 
28806         public enum TypeConstraint implements OnnxTypeConstraint {
28807             T(new OnnxType.TypeVariable("T", List.of(OnnxType.tensor(OnnxType.uint8()), OnnxType.tensor(OnnxType.uint16()), OnnxType.tensor(OnnxType.uint32()), OnnxType.tensor(OnnxType.uint64()), OnnxType.tensor(OnnxType.int8()), OnnxType.tensor(OnnxType.int16()), OnnxType.tensor(OnnxType.int32()), OnnxType.tensor(OnnxType.int64()), OnnxType.tensor(OnnxType.bfloat16()), OnnxType.tensor(OnnxType.float16()), OnnxType.tensor(OnnxType.float32()), OnnxType.tensor(OnnxType.float64()), OnnxType.tensor(OnnxType.string()), OnnxType.tensor(OnnxType.bool()), OnnxType.tensor(OnnxType.complex64()), OnnxType.tensor(OnnxType.complex128())))),
28808             T1(new OnnxType.TypeVariable("T1", List.of(OnnxType.tensor(OnnxType.int64())))),
28809             ;
28810 
28811             final OnnxType.TypeVariable typeVariable;
28812 
28813             TypeConstraint(OnnxType.TypeVariable typeVariable) {
28814                 assert typeVariable.name().equals(name());
28815                 this.typeVariable = typeVariable;
28816             }
28817 
28818             @Override
28819             public OnnxType.TypeVariable typeVariable() {
28820                 return typeVariable;
28821             }
28822         }
28823 
28824         public enum InputParameter implements OnnxParameter {
28825             input(TypeConstraint.T.typeVariable(), Quantifier.REQUIRED),
28826             repeats(TypeConstraint.T1.typeVariable(), Quantifier.REQUIRED),
28827             ;
28828 
28829             final OnnxType type;
28830             final Quantifier quantifier;
28831 
28832             InputParameter(OnnxType type, Quantifier quantifier) {
28833                 this.type = type;
28834                 this.quantifier = quantifier;
28835             }
28836 
28837             @Override
28838             public OnnxType type() {
28839                 return type;
28840             }
28841 
28842             @Override
28843             public Quantifier quantifier() {
28844                 return quantifier;
28845             }
28846         }
28847 
28848         public enum OutputParameter implements OnnxParameter {
28849             output(TypeConstraint.T.typeVariable(), Quantifier.REQUIRED),
28850             ;
28851 
28852             final OnnxType type;
28853             final Quantifier quantifier;
28854 
28855             OutputParameter(OnnxType type, Quantifier quantifier) {
28856                 this.type = type;
28857                 this.quantifier = quantifier;
28858             }
28859 
28860             @Override
28861             public OnnxType type() {
28862                 return type;
28863             }
28864 
28865             @Override
28866             public Quantifier quantifier() {
28867                 return quantifier;
28868             }
28869         }
28870 
28871         public static final OnnxSchema SCHEMA = new OnnxSchemaRecord(
28872                 NAME,
28873                 List.of(Attribute.values()),
28874                 List.of(TypeConstraint.values()),
28875                 List.of(InputParameter.values()),
28876                 List.of(OutputParameter.values())
28877         );
28878 
28879         public Tile(ExternalizedOp def) {
28880             super(SCHEMA, def);
28881         }
28882 
28883         Tile(Tile that, CopyContext cc) {
28884             super(that, cc);
28885         }
28886 
28887         @Override
28888         public Tile transform(CopyContext cc, OpTransformer ot) {
28889             return new Tile(this, cc);
28890         }
28891 
28892         Tile(TypeElement resultType, Value input, Value repeats) {
28893             super(SCHEMA, resultType, Set.of(), List.of(input, repeats), List.of());
28894         }
28895 
28896         @Override
28897         public SequencedSet<OnnxParameter> onnxOutputs() {
28898             return onnxOutputs(SCHEMA);
28899         }
28900 
28901         @Override
28902         public SequencedMap<OnnxParameter, Object> onnxInputs() {
28903             return onnxInputs(SCHEMA, List.of(input(), repeats()));
28904         }
28905 
28906         public Value input() {
28907             return operands().get(0);
28908         }
28909 
28910         public Value repeats() {
28911             return operands().get(1);
28912         }
28913 
28914     }
28915 
28916     public static Tile Tile(TypeElement resultType, Value input, Value repeats) {
28917         return new Tile(resultType, input, repeats);
28918     }
28919 
28920     @OpFactory.OpDeclaration(TopK.NAME)
28921     public static final class TopK extends OnnxOp {
28922         public static final String NAME = "TopK";
28923 
28924         public enum Attribute implements OnnxAttribute {
28925             largest(Integer.class, true, 1),
28926             sorted(Integer.class, true, 1),
28927             axis(Integer.class, true, -1),
28928             ;
28929 
28930                 final Class<?> t;
28931                 final boolean optional;
28932                 final Object defaultValue;
28933 
28934                 Attribute(Class<?> type, boolean optional, Object defaultValue) {
28935                     this.t = type;
28936                     this.optional = optional;
28937                     this.defaultValue = defaultValue;
28938                     assert optional || defaultValue == null;
28939                 }
28940 
28941                 public Class<?> type() {
28942                     return t;
28943                 }
28944 
28945                 public boolean isOptional() {
28946                     return optional;
28947                 }
28948 
28949                 public Object defaultValue() {
28950                     return defaultValue;
28951                 }
28952         }
28953 
28954         public enum TypeConstraint implements OnnxTypeConstraint {
28955             T(new OnnxType.TypeVariable("T", List.of(OnnxType.tensor(OnnxType.uint8()), OnnxType.tensor(OnnxType.uint16()), OnnxType.tensor(OnnxType.uint32()), OnnxType.tensor(OnnxType.uint64()), OnnxType.tensor(OnnxType.int8()), OnnxType.tensor(OnnxType.int16()), OnnxType.tensor(OnnxType.int32()), OnnxType.tensor(OnnxType.int64()), OnnxType.tensor(OnnxType.float16()), OnnxType.tensor(OnnxType.float32()), OnnxType.tensor(OnnxType.float64())))),
28956             I(new OnnxType.TypeVariable("I", List.of(OnnxType.tensor(OnnxType.int64())))),
28957             ;
28958 
28959             final OnnxType.TypeVariable typeVariable;
28960 
28961             TypeConstraint(OnnxType.TypeVariable typeVariable) {
28962                 assert typeVariable.name().equals(name());
28963                 this.typeVariable = typeVariable;
28964             }
28965 
28966             @Override
28967             public OnnxType.TypeVariable typeVariable() {
28968                 return typeVariable;
28969             }
28970         }
28971 
28972         public enum InputParameter implements OnnxParameter {
28973             X(TypeConstraint.T.typeVariable(), Quantifier.REQUIRED),
28974             K(OnnxType.tensor(OnnxType.int64()), Quantifier.REQUIRED),
28975             ;
28976 
28977             final OnnxType type;
28978             final Quantifier quantifier;
28979 
28980             InputParameter(OnnxType type, Quantifier quantifier) {
28981                 this.type = type;
28982                 this.quantifier = quantifier;
28983             }
28984 
28985             @Override
28986             public OnnxType type() {
28987                 return type;
28988             }
28989 
28990             @Override
28991             public Quantifier quantifier() {
28992                 return quantifier;
28993             }
28994         }
28995 
28996         public enum OutputParameter implements OnnxParameter {
28997             Values(TypeConstraint.T.typeVariable(), Quantifier.REQUIRED),
28998             Indices(TypeConstraint.I.typeVariable(), Quantifier.REQUIRED),
28999             ;
29000 
29001             final OnnxType type;
29002             final Quantifier quantifier;
29003 
29004             OutputParameter(OnnxType type, Quantifier quantifier) {
29005                 this.type = type;
29006                 this.quantifier = quantifier;
29007             }
29008 
29009             @Override
29010             public OnnxType type() {
29011                 return type;
29012             }
29013 
29014             @Override
29015             public Quantifier quantifier() {
29016                 return quantifier;
29017             }
29018         }
29019 
29020         public static final OnnxSchema SCHEMA = new OnnxSchemaRecord(
29021                 NAME,
29022                 List.of(Attribute.values()),
29023                 List.of(TypeConstraint.values()),
29024                 List.of(InputParameter.values()),
29025                 List.of(OutputParameter.values())
29026         );
29027 
29028         public TopK(ExternalizedOp def) {
29029             super(SCHEMA, def);
29030         }
29031 
29032         TopK(TopK that, CopyContext cc) {
29033             super(that, cc);
29034         }
29035 
29036         @Override
29037         public TopK transform(CopyContext cc, OpTransformer ot) {
29038             return new TopK(this, cc);
29039         }
29040 
29041         TopK(TypeElement resultType, Value X, Value K, java.util.Optional<Integer> largest, java.util.Optional<Integer> sorted, java.util.Optional<Integer> axis) {
29042             super(SCHEMA, resultType, Set.of(), List.of(X, K), List.of(largest, sorted, axis));
29043         }
29044 
29045         @Override
29046         public SequencedSet<OnnxParameter> onnxOutputs() {
29047             return onnxOutputs(SCHEMA);
29048         }
29049 
29050         @Override
29051         public SequencedMap<OnnxParameter, Object> onnxInputs() {
29052             return onnxInputs(SCHEMA, List.of(X(), K()));
29053         }
29054 
29055         public Value X() {
29056             return operands().get(0);
29057         }
29058 
29059         public Value K() {
29060             return operands().get(1);
29061         }
29062 
29063         public java.util.Optional<Integer> largest() {
29064             Integer largest = Attribute.largest.access(Integer.class, onnxAttributes);
29065             return java.util.Optional.ofNullable(largest);
29066         }
29067 
29068         public java.util.Optional<Integer> sorted() {
29069             Integer sorted = Attribute.sorted.access(Integer.class, onnxAttributes);
29070             return java.util.Optional.ofNullable(sorted);
29071         }
29072 
29073         public java.util.Optional<Integer> axis() {
29074             Integer axis = Attribute.axis.access(Integer.class, onnxAttributes);
29075             return java.util.Optional.ofNullable(axis);
29076         }
29077 
29078     }
29079 
29080     public static TopK TopK(TypeElement resultType, Value X, Value K, java.util.Optional<Integer> largest, java.util.Optional<Integer> sorted, java.util.Optional<Integer> axis) {
29081         return new TopK(resultType, X, K, largest, sorted, axis);
29082     }
29083 
29084     @OpFactory.OpDeclaration(Transpose.NAME)
29085     public static final class Transpose extends OnnxOp {
29086         public static final String NAME = "Transpose";
29087 
29088         public enum Attribute implements OnnxAttribute {
29089             perm(int[].class, true, null),
29090             ;
29091 
29092                 final Class<?> t;
29093                 final boolean optional;
29094                 final Object defaultValue;
29095 
29096                 Attribute(Class<?> type, boolean optional, Object defaultValue) {
29097                     this.t = type;
29098                     this.optional = optional;
29099                     this.defaultValue = defaultValue;
29100                     assert optional || defaultValue == null;
29101                 }
29102 
29103                 public Class<?> type() {
29104                     return t;
29105                 }
29106 
29107                 public boolean isOptional() {
29108                     return optional;
29109                 }
29110 
29111                 public Object defaultValue() {
29112                     return defaultValue;
29113                 }
29114         }
29115 
29116         public enum TypeConstraint implements OnnxTypeConstraint {
29117             T(new OnnxType.TypeVariable("T", List.of(OnnxType.tensor(OnnxType.uint8()), OnnxType.tensor(OnnxType.uint16()), OnnxType.tensor(OnnxType.uint32()), OnnxType.tensor(OnnxType.uint64()), OnnxType.tensor(OnnxType.int8()), OnnxType.tensor(OnnxType.int16()), OnnxType.tensor(OnnxType.int32()), OnnxType.tensor(OnnxType.int64()), OnnxType.tensor(OnnxType.bfloat16()), OnnxType.tensor(OnnxType.float16()), OnnxType.tensor(OnnxType.float32()), OnnxType.tensor(OnnxType.float64()), OnnxType.tensor(OnnxType.string()), OnnxType.tensor(OnnxType.bool()), OnnxType.tensor(OnnxType.complex64()), OnnxType.tensor(OnnxType.complex128()), OnnxType.tensor(OnnxType.float8e4m3fn()), OnnxType.tensor(OnnxType.float8e4m3fnuz()), OnnxType.tensor(OnnxType.float8e5m2()), OnnxType.tensor(OnnxType.float8e5m2fnuz()), OnnxType.tensor(OnnxType.uint4()), OnnxType.tensor(OnnxType.int4()), OnnxType.tensor(OnnxType.float4e2m1())))),
29118             ;
29119 
29120             final OnnxType.TypeVariable typeVariable;
29121 
29122             TypeConstraint(OnnxType.TypeVariable typeVariable) {
29123                 assert typeVariable.name().equals(name());
29124                 this.typeVariable = typeVariable;
29125             }
29126 
29127             @Override
29128             public OnnxType.TypeVariable typeVariable() {
29129                 return typeVariable;
29130             }
29131         }
29132 
29133         public enum InputParameter implements OnnxParameter {
29134             data(TypeConstraint.T.typeVariable(), Quantifier.REQUIRED),
29135             ;
29136 
29137             final OnnxType type;
29138             final Quantifier quantifier;
29139 
29140             InputParameter(OnnxType type, Quantifier quantifier) {
29141                 this.type = type;
29142                 this.quantifier = quantifier;
29143             }
29144 
29145             @Override
29146             public OnnxType type() {
29147                 return type;
29148             }
29149 
29150             @Override
29151             public Quantifier quantifier() {
29152                 return quantifier;
29153             }
29154         }
29155 
29156         public enum OutputParameter implements OnnxParameter {
29157             transposed(TypeConstraint.T.typeVariable(), Quantifier.REQUIRED),
29158             ;
29159 
29160             final OnnxType type;
29161             final Quantifier quantifier;
29162 
29163             OutputParameter(OnnxType type, Quantifier quantifier) {
29164                 this.type = type;
29165                 this.quantifier = quantifier;
29166             }
29167 
29168             @Override
29169             public OnnxType type() {
29170                 return type;
29171             }
29172 
29173             @Override
29174             public Quantifier quantifier() {
29175                 return quantifier;
29176             }
29177         }
29178 
29179         public static final OnnxSchema SCHEMA = new OnnxSchemaRecord(
29180                 NAME,
29181                 List.of(Attribute.values()),
29182                 List.of(TypeConstraint.values()),
29183                 List.of(InputParameter.values()),
29184                 List.of(OutputParameter.values())
29185         );
29186 
29187         public Transpose(ExternalizedOp def) {
29188             super(SCHEMA, def);
29189         }
29190 
29191         Transpose(Transpose that, CopyContext cc) {
29192             super(that, cc);
29193         }
29194 
29195         @Override
29196         public Transpose transform(CopyContext cc, OpTransformer ot) {
29197             return new Transpose(this, cc);
29198         }
29199 
29200         Transpose(TypeElement resultType, Value data, java.util.Optional<int[]> perm) {
29201             super(SCHEMA, resultType, Set.of(), List.of(data), List.of(perm));
29202         }
29203 
29204         @Override
29205         public SequencedSet<OnnxParameter> onnxOutputs() {
29206             return onnxOutputs(SCHEMA);
29207         }
29208 
29209         @Override
29210         public SequencedMap<OnnxParameter, Object> onnxInputs() {
29211             return onnxInputs(SCHEMA, List.of(data()));
29212         }
29213 
29214         public Value data() {
29215             return operands().get(0);
29216         }
29217 
29218         public java.util.Optional<int[]> perm() {
29219             int[] perm = Attribute.perm.access(int[].class, onnxAttributes);
29220             return java.util.Optional.ofNullable(perm).map(int[]::clone);
29221         }
29222 
29223     }
29224 
29225     public static Transpose Transpose(TypeElement resultType, Value data, java.util.Optional<int[]> perm) {
29226         return new Transpose(resultType, data, perm);
29227     }
29228 
29229     @OpFactory.OpDeclaration(TreeEnsemble.NAME)
29230     public static final class TreeEnsemble extends OnnxOp {
29231         public static final String NAME = "TreeEnsemble";
29232 
29233         public enum Attribute implements OnnxAttribute {
29234             aggregate_function(Integer.class, true, 1),
29235             nodes_hitrates(byte[].class, true, null),
29236             nodes_featureids(int[].class, false, null),
29237             nodes_falseleafs(int[].class, false, null),
29238             post_transform(Integer.class, true, 0),
29239             nodes_trueleafs(int[].class, false, null),
29240             nodes_modes(byte[].class, false, null),
29241             nodes_falsenodeids(int[].class, false, null),
29242             nodes_truenodeids(int[].class, false, null),
29243             leaf_weights(byte[].class, false, null),
29244             leaf_targetids(int[].class, false, null),
29245             tree_roots(int[].class, false, null),
29246             n_targets(Integer.class, true, null),
29247             nodes_missing_value_tracks_true(int[].class, true, null),
29248             membership_values(byte[].class, true, null),
29249             nodes_splits(byte[].class, false, null),
29250             ;
29251 
29252                 final Class<?> t;
29253                 final boolean optional;
29254                 final Object defaultValue;
29255 
29256                 Attribute(Class<?> type, boolean optional, Object defaultValue) {
29257                     this.t = type;
29258                     this.optional = optional;
29259                     this.defaultValue = defaultValue;
29260                     assert optional || defaultValue == null;
29261                 }
29262 
29263                 public Class<?> type() {
29264                     return t;
29265                 }
29266 
29267                 public boolean isOptional() {
29268                     return optional;
29269                 }
29270 
29271                 public Object defaultValue() {
29272                     return defaultValue;
29273                 }
29274         }
29275 
29276         public enum TypeConstraint implements OnnxTypeConstraint {
29277             T(new OnnxType.TypeVariable("T", List.of(OnnxType.tensor(OnnxType.float32()), OnnxType.tensor(OnnxType.float64()), OnnxType.tensor(OnnxType.float16())))),
29278             ;
29279 
29280             final OnnxType.TypeVariable typeVariable;
29281 
29282             TypeConstraint(OnnxType.TypeVariable typeVariable) {
29283                 assert typeVariable.name().equals(name());
29284                 this.typeVariable = typeVariable;
29285             }
29286 
29287             @Override
29288             public OnnxType.TypeVariable typeVariable() {
29289                 return typeVariable;
29290             }
29291         }
29292 
29293         public enum InputParameter implements OnnxParameter {
29294             X(TypeConstraint.T.typeVariable(), Quantifier.REQUIRED),
29295             ;
29296 
29297             final OnnxType type;
29298             final Quantifier quantifier;
29299 
29300             InputParameter(OnnxType type, Quantifier quantifier) {
29301                 this.type = type;
29302                 this.quantifier = quantifier;
29303             }
29304 
29305             @Override
29306             public OnnxType type() {
29307                 return type;
29308             }
29309 
29310             @Override
29311             public Quantifier quantifier() {
29312                 return quantifier;
29313             }
29314         }
29315 
29316         public enum OutputParameter implements OnnxParameter {
29317             Y(TypeConstraint.T.typeVariable(), Quantifier.REQUIRED),
29318             ;
29319 
29320             final OnnxType type;
29321             final Quantifier quantifier;
29322 
29323             OutputParameter(OnnxType type, Quantifier quantifier) {
29324                 this.type = type;
29325                 this.quantifier = quantifier;
29326             }
29327 
29328             @Override
29329             public OnnxType type() {
29330                 return type;
29331             }
29332 
29333             @Override
29334             public Quantifier quantifier() {
29335                 return quantifier;
29336             }
29337         }
29338 
29339         public static final OnnxSchema SCHEMA = new OnnxSchemaRecord(
29340                 NAME,
29341                 List.of(Attribute.values()),
29342                 List.of(TypeConstraint.values()),
29343                 List.of(InputParameter.values()),
29344                 List.of(OutputParameter.values())
29345         );
29346 
29347         public TreeEnsemble(ExternalizedOp def) {
29348             super(SCHEMA, def);
29349         }
29350 
29351         TreeEnsemble(TreeEnsemble that, CopyContext cc) {
29352             super(that, cc);
29353         }
29354 
29355         @Override
29356         public TreeEnsemble transform(CopyContext cc, OpTransformer ot) {
29357             return new TreeEnsemble(this, cc);
29358         }
29359 
29360         TreeEnsemble(TypeElement resultType, Value X, java.util.Optional<Integer> aggregate_function, java.util.Optional<byte[]> nodes_hitrates, int[] nodes_featureids, int[] nodes_falseleafs, java.util.Optional<Integer> post_transform, int[] nodes_trueleafs, byte[] nodes_modes, int[] nodes_falsenodeids, int[] nodes_truenodeids, byte[] leaf_weights, int[] leaf_targetids, int[] tree_roots, java.util.Optional<Integer> n_targets, java.util.Optional<int[]> nodes_missing_value_tracks_true, java.util.Optional<byte[]> membership_values, byte[] nodes_splits) {
29361             super(SCHEMA, resultType, Set.of(), List.of(X), List.of(aggregate_function, nodes_hitrates, nodes_featureids, nodes_falseleafs, post_transform, nodes_trueleafs, nodes_modes, nodes_falsenodeids, nodes_truenodeids, leaf_weights, leaf_targetids, tree_roots, n_targets, nodes_missing_value_tracks_true, membership_values, nodes_splits));
29362         }
29363 
29364         @Override
29365         public SequencedSet<OnnxParameter> onnxOutputs() {
29366             return onnxOutputs(SCHEMA);
29367         }
29368 
29369         @Override
29370         public SequencedMap<OnnxParameter, Object> onnxInputs() {
29371             return onnxInputs(SCHEMA, List.of(X()));
29372         }
29373 
29374         public Value X() {
29375             return operands().get(0);
29376         }
29377 
29378         public java.util.Optional<Integer> aggregate_function() {
29379             Integer aggregate_function = Attribute.aggregate_function.access(Integer.class, onnxAttributes);
29380             return java.util.Optional.ofNullable(aggregate_function);
29381         }
29382 
29383         public java.util.Optional<byte[]> nodes_hitrates() {
29384             byte[] nodes_hitrates = Attribute.nodes_hitrates.access(byte[].class, onnxAttributes);
29385             return java.util.Optional.ofNullable(nodes_hitrates).map(byte[]::clone);
29386         }
29387 
29388         public int[] nodes_featureids() {
29389             int[] nodes_featureids = Attribute.nodes_featureids.access(int[].class, onnxAttributes);
29390             return nodes_featureids.clone();
29391         }
29392 
29393         public int[] nodes_falseleafs() {
29394             int[] nodes_falseleafs = Attribute.nodes_falseleafs.access(int[].class, onnxAttributes);
29395             return nodes_falseleafs.clone();
29396         }
29397 
29398         public java.util.Optional<Integer> post_transform() {
29399             Integer post_transform = Attribute.post_transform.access(Integer.class, onnxAttributes);
29400             return java.util.Optional.ofNullable(post_transform);
29401         }
29402 
29403         public int[] nodes_trueleafs() {
29404             int[] nodes_trueleafs = Attribute.nodes_trueleafs.access(int[].class, onnxAttributes);
29405             return nodes_trueleafs.clone();
29406         }
29407 
29408         public byte[] nodes_modes() {
29409             byte[] nodes_modes = Attribute.nodes_modes.access(byte[].class, onnxAttributes);
29410             return nodes_modes.clone();
29411         }
29412 
29413         public int[] nodes_falsenodeids() {
29414             int[] nodes_falsenodeids = Attribute.nodes_falsenodeids.access(int[].class, onnxAttributes);
29415             return nodes_falsenodeids.clone();
29416         }
29417 
29418         public int[] nodes_truenodeids() {
29419             int[] nodes_truenodeids = Attribute.nodes_truenodeids.access(int[].class, onnxAttributes);
29420             return nodes_truenodeids.clone();
29421         }
29422 
29423         public byte[] leaf_weights() {
29424             byte[] leaf_weights = Attribute.leaf_weights.access(byte[].class, onnxAttributes);
29425             return leaf_weights.clone();
29426         }
29427 
29428         public int[] leaf_targetids() {
29429             int[] leaf_targetids = Attribute.leaf_targetids.access(int[].class, onnxAttributes);
29430             return leaf_targetids.clone();
29431         }
29432 
29433         public int[] tree_roots() {
29434             int[] tree_roots = Attribute.tree_roots.access(int[].class, onnxAttributes);
29435             return tree_roots.clone();
29436         }
29437 
29438         public java.util.Optional<Integer> n_targets() {
29439             Integer n_targets = Attribute.n_targets.access(Integer.class, onnxAttributes);
29440             return java.util.Optional.ofNullable(n_targets);
29441         }
29442 
29443         public java.util.Optional<int[]> nodes_missing_value_tracks_true() {
29444             int[] nodes_missing_value_tracks_true = Attribute.nodes_missing_value_tracks_true.access(int[].class, onnxAttributes);
29445             return java.util.Optional.ofNullable(nodes_missing_value_tracks_true).map(int[]::clone);
29446         }
29447 
29448         public java.util.Optional<byte[]> membership_values() {
29449             byte[] membership_values = Attribute.membership_values.access(byte[].class, onnxAttributes);
29450             return java.util.Optional.ofNullable(membership_values).map(byte[]::clone);
29451         }
29452 
29453         public byte[] nodes_splits() {
29454             byte[] nodes_splits = Attribute.nodes_splits.access(byte[].class, onnxAttributes);
29455             return nodes_splits.clone();
29456         }
29457 
29458     }
29459 
29460     public static TreeEnsemble TreeEnsemble(TypeElement resultType, Value X, java.util.Optional<Integer> aggregate_function, java.util.Optional<byte[]> nodes_hitrates, int[] nodes_featureids, int[] nodes_falseleafs, java.util.Optional<Integer> post_transform, int[] nodes_trueleafs, byte[] nodes_modes, int[] nodes_falsenodeids, int[] nodes_truenodeids, byte[] leaf_weights, int[] leaf_targetids, int[] tree_roots, java.util.Optional<Integer> n_targets, java.util.Optional<int[]> nodes_missing_value_tracks_true, java.util.Optional<byte[]> membership_values, byte[] nodes_splits) {
29461         return new TreeEnsemble(resultType, X, aggregate_function, nodes_hitrates, nodes_featureids, nodes_falseleafs, post_transform, nodes_trueleafs, nodes_modes, nodes_falsenodeids, nodes_truenodeids, leaf_weights, leaf_targetids, tree_roots, n_targets, nodes_missing_value_tracks_true, membership_values, nodes_splits);
29462     }
29463 
29464     @OpFactory.OpDeclaration(TreeEnsembleClassifier.NAME)
29465     public static final class TreeEnsembleClassifier extends OnnxOp {
29466         public static final String NAME = "TreeEnsembleClassifier";
29467 
29468         public enum Attribute implements OnnxAttribute {
29469             classlabels_int64s(int[].class, true, null),
29470             class_ids(int[].class, true, null),
29471             nodes_hitrates(float[].class, true, null),
29472             nodes_featureids(int[].class, true, null),
29473             nodes_treeids(int[].class, true, null),
29474             class_weights_as_tensor(byte[].class, true, null),
29475             post_transform(String.class, true, "NONE"),
29476             nodes_modes(String[].class, true, null),
29477             nodes_falsenodeids(int[].class, true, null),
29478             classlabels_strings(String[].class, true, null),
29479             nodes_truenodeids(int[].class, true, null),
29480             nodes_nodeids(int[].class, true, null),
29481             nodes_hitrates_as_tensor(byte[].class, true, null),
29482             class_weights(float[].class, true, null),
29483             base_values_as_tensor(byte[].class, true, null),
29484             nodes_missing_value_tracks_true(int[].class, true, null),
29485             class_nodeids(int[].class, true, null),
29486             class_treeids(int[].class, true, null),
29487             base_values(float[].class, true, null),
29488             nodes_values(float[].class, true, null),
29489             nodes_values_as_tensor(byte[].class, true, null),
29490             ;
29491 
29492                 final Class<?> t;
29493                 final boolean optional;
29494                 final Object defaultValue;
29495 
29496                 Attribute(Class<?> type, boolean optional, Object defaultValue) {
29497                     this.t = type;
29498                     this.optional = optional;
29499                     this.defaultValue = defaultValue;
29500                     assert optional || defaultValue == null;
29501                 }
29502 
29503                 public Class<?> type() {
29504                     return t;
29505                 }
29506 
29507                 public boolean isOptional() {
29508                     return optional;
29509                 }
29510 
29511                 public Object defaultValue() {
29512                     return defaultValue;
29513                 }
29514         }
29515 
29516         public enum TypeConstraint implements OnnxTypeConstraint {
29517             T1(new OnnxType.TypeVariable("T1", List.of(OnnxType.tensor(OnnxType.float32()), OnnxType.tensor(OnnxType.float64()), OnnxType.tensor(OnnxType.int64()), OnnxType.tensor(OnnxType.int32())))),
29518             T2(new OnnxType.TypeVariable("T2", List.of(OnnxType.tensor(OnnxType.string()), OnnxType.tensor(OnnxType.int64())))),
29519             ;
29520 
29521             final OnnxType.TypeVariable typeVariable;
29522 
29523             TypeConstraint(OnnxType.TypeVariable typeVariable) {
29524                 assert typeVariable.name().equals(name());
29525                 this.typeVariable = typeVariable;
29526             }
29527 
29528             @Override
29529             public OnnxType.TypeVariable typeVariable() {
29530                 return typeVariable;
29531             }
29532         }
29533 
29534         public enum InputParameter implements OnnxParameter {
29535             X(TypeConstraint.T1.typeVariable(), Quantifier.REQUIRED),
29536             ;
29537 
29538             final OnnxType type;
29539             final Quantifier quantifier;
29540 
29541             InputParameter(OnnxType type, Quantifier quantifier) {
29542                 this.type = type;
29543                 this.quantifier = quantifier;
29544             }
29545 
29546             @Override
29547             public OnnxType type() {
29548                 return type;
29549             }
29550 
29551             @Override
29552             public Quantifier quantifier() {
29553                 return quantifier;
29554             }
29555         }
29556 
29557         public enum OutputParameter implements OnnxParameter {
29558             Y(TypeConstraint.T2.typeVariable(), Quantifier.REQUIRED),
29559             Z(OnnxType.tensor(OnnxType.float32()), Quantifier.REQUIRED),
29560             ;
29561 
29562             final OnnxType type;
29563             final Quantifier quantifier;
29564 
29565             OutputParameter(OnnxType type, Quantifier quantifier) {
29566                 this.type = type;
29567                 this.quantifier = quantifier;
29568             }
29569 
29570             @Override
29571             public OnnxType type() {
29572                 return type;
29573             }
29574 
29575             @Override
29576             public Quantifier quantifier() {
29577                 return quantifier;
29578             }
29579         }
29580 
29581         public static final OnnxSchema SCHEMA = new OnnxSchemaRecord(
29582                 NAME,
29583                 List.of(Attribute.values()),
29584                 List.of(TypeConstraint.values()),
29585                 List.of(InputParameter.values()),
29586                 List.of(OutputParameter.values())
29587         );
29588 
29589         public TreeEnsembleClassifier(ExternalizedOp def) {
29590             super(SCHEMA, def);
29591         }
29592 
29593         TreeEnsembleClassifier(TreeEnsembleClassifier that, CopyContext cc) {
29594             super(that, cc);
29595         }
29596 
29597         @Override
29598         public TreeEnsembleClassifier transform(CopyContext cc, OpTransformer ot) {
29599             return new TreeEnsembleClassifier(this, cc);
29600         }
29601 
29602         TreeEnsembleClassifier(TypeElement resultType, Value X, java.util.Optional<int[]> classlabels_int64s, java.util.Optional<int[]> class_ids, java.util.Optional<float[]> nodes_hitrates, java.util.Optional<int[]> nodes_featureids, java.util.Optional<int[]> nodes_treeids, java.util.Optional<byte[]> class_weights_as_tensor, java.util.Optional<String> post_transform, java.util.Optional<String[]> nodes_modes, java.util.Optional<int[]> nodes_falsenodeids, java.util.Optional<String[]> classlabels_strings, java.util.Optional<int[]> nodes_truenodeids, java.util.Optional<int[]> nodes_nodeids, java.util.Optional<byte[]> nodes_hitrates_as_tensor, java.util.Optional<float[]> class_weights, java.util.Optional<byte[]> base_values_as_tensor, java.util.Optional<int[]> nodes_missing_value_tracks_true, java.util.Optional<int[]> class_nodeids, java.util.Optional<int[]> class_treeids, java.util.Optional<float[]> base_values, java.util.Optional<float[]> nodes_values, java.util.Optional<byte[]> nodes_values_as_tensor) {
29603             super(SCHEMA, resultType, Set.of(), List.of(X), List.of(classlabels_int64s, class_ids, nodes_hitrates, nodes_featureids, nodes_treeids, class_weights_as_tensor, post_transform, nodes_modes, nodes_falsenodeids, classlabels_strings, nodes_truenodeids, nodes_nodeids, nodes_hitrates_as_tensor, class_weights, base_values_as_tensor, nodes_missing_value_tracks_true, class_nodeids, class_treeids, base_values, nodes_values, nodes_values_as_tensor));
29604         }
29605 
29606         @Override
29607         public SequencedSet<OnnxParameter> onnxOutputs() {
29608             return onnxOutputs(SCHEMA);
29609         }
29610 
29611         @Override
29612         public SequencedMap<OnnxParameter, Object> onnxInputs() {
29613             return onnxInputs(SCHEMA, List.of(X()));
29614         }
29615 
29616         public Value X() {
29617             return operands().get(0);
29618         }
29619 
29620         public java.util.Optional<int[]> classlabels_int64s() {
29621             int[] classlabels_int64s = Attribute.classlabels_int64s.access(int[].class, onnxAttributes);
29622             return java.util.Optional.ofNullable(classlabels_int64s).map(int[]::clone);
29623         }
29624 
29625         public java.util.Optional<int[]> class_ids() {
29626             int[] class_ids = Attribute.class_ids.access(int[].class, onnxAttributes);
29627             return java.util.Optional.ofNullable(class_ids).map(int[]::clone);
29628         }
29629 
29630         public java.util.Optional<float[]> nodes_hitrates() {
29631             float[] nodes_hitrates = Attribute.nodes_hitrates.access(float[].class, onnxAttributes);
29632             return java.util.Optional.ofNullable(nodes_hitrates).map(float[]::clone);
29633         }
29634 
29635         public java.util.Optional<int[]> nodes_featureids() {
29636             int[] nodes_featureids = Attribute.nodes_featureids.access(int[].class, onnxAttributes);
29637             return java.util.Optional.ofNullable(nodes_featureids).map(int[]::clone);
29638         }
29639 
29640         public java.util.Optional<int[]> nodes_treeids() {
29641             int[] nodes_treeids = Attribute.nodes_treeids.access(int[].class, onnxAttributes);
29642             return java.util.Optional.ofNullable(nodes_treeids).map(int[]::clone);
29643         }
29644 
29645         public java.util.Optional<byte[]> class_weights_as_tensor() {
29646             byte[] class_weights_as_tensor = Attribute.class_weights_as_tensor.access(byte[].class, onnxAttributes);
29647             return java.util.Optional.ofNullable(class_weights_as_tensor).map(byte[]::clone);
29648         }
29649 
29650         public java.util.Optional<String> post_transform() {
29651             String post_transform = Attribute.post_transform.access(String.class, onnxAttributes);
29652             return java.util.Optional.ofNullable(post_transform);
29653         }
29654 
29655         public java.util.Optional<String[]> nodes_modes() {
29656             String[] nodes_modes = Attribute.nodes_modes.access(String[].class, onnxAttributes);
29657             return java.util.Optional.ofNullable(nodes_modes).map(String[]::clone);
29658         }
29659 
29660         public java.util.Optional<int[]> nodes_falsenodeids() {
29661             int[] nodes_falsenodeids = Attribute.nodes_falsenodeids.access(int[].class, onnxAttributes);
29662             return java.util.Optional.ofNullable(nodes_falsenodeids).map(int[]::clone);
29663         }
29664 
29665         public java.util.Optional<String[]> classlabels_strings() {
29666             String[] classlabels_strings = Attribute.classlabels_strings.access(String[].class, onnxAttributes);
29667             return java.util.Optional.ofNullable(classlabels_strings).map(String[]::clone);
29668         }
29669 
29670         public java.util.Optional<int[]> nodes_truenodeids() {
29671             int[] nodes_truenodeids = Attribute.nodes_truenodeids.access(int[].class, onnxAttributes);
29672             return java.util.Optional.ofNullable(nodes_truenodeids).map(int[]::clone);
29673         }
29674 
29675         public java.util.Optional<int[]> nodes_nodeids() {
29676             int[] nodes_nodeids = Attribute.nodes_nodeids.access(int[].class, onnxAttributes);
29677             return java.util.Optional.ofNullable(nodes_nodeids).map(int[]::clone);
29678         }
29679 
29680         public java.util.Optional<byte[]> nodes_hitrates_as_tensor() {
29681             byte[] nodes_hitrates_as_tensor = Attribute.nodes_hitrates_as_tensor.access(byte[].class, onnxAttributes);
29682             return java.util.Optional.ofNullable(nodes_hitrates_as_tensor).map(byte[]::clone);
29683         }
29684 
29685         public java.util.Optional<float[]> class_weights() {
29686             float[] class_weights = Attribute.class_weights.access(float[].class, onnxAttributes);
29687             return java.util.Optional.ofNullable(class_weights).map(float[]::clone);
29688         }
29689 
29690         public java.util.Optional<byte[]> base_values_as_tensor() {
29691             byte[] base_values_as_tensor = Attribute.base_values_as_tensor.access(byte[].class, onnxAttributes);
29692             return java.util.Optional.ofNullable(base_values_as_tensor).map(byte[]::clone);
29693         }
29694 
29695         public java.util.Optional<int[]> nodes_missing_value_tracks_true() {
29696             int[] nodes_missing_value_tracks_true = Attribute.nodes_missing_value_tracks_true.access(int[].class, onnxAttributes);
29697             return java.util.Optional.ofNullable(nodes_missing_value_tracks_true).map(int[]::clone);
29698         }
29699 
29700         public java.util.Optional<int[]> class_nodeids() {
29701             int[] class_nodeids = Attribute.class_nodeids.access(int[].class, onnxAttributes);
29702             return java.util.Optional.ofNullable(class_nodeids).map(int[]::clone);
29703         }
29704 
29705         public java.util.Optional<int[]> class_treeids() {
29706             int[] class_treeids = Attribute.class_treeids.access(int[].class, onnxAttributes);
29707             return java.util.Optional.ofNullable(class_treeids).map(int[]::clone);
29708         }
29709 
29710         public java.util.Optional<float[]> base_values() {
29711             float[] base_values = Attribute.base_values.access(float[].class, onnxAttributes);
29712             return java.util.Optional.ofNullable(base_values).map(float[]::clone);
29713         }
29714 
29715         public java.util.Optional<float[]> nodes_values() {
29716             float[] nodes_values = Attribute.nodes_values.access(float[].class, onnxAttributes);
29717             return java.util.Optional.ofNullable(nodes_values).map(float[]::clone);
29718         }
29719 
29720         public java.util.Optional<byte[]> nodes_values_as_tensor() {
29721             byte[] nodes_values_as_tensor = Attribute.nodes_values_as_tensor.access(byte[].class, onnxAttributes);
29722             return java.util.Optional.ofNullable(nodes_values_as_tensor).map(byte[]::clone);
29723         }
29724 
29725     }
29726 
29727     public static TreeEnsembleClassifier TreeEnsembleClassifier(TypeElement resultType, Value X, java.util.Optional<int[]> classlabels_int64s, java.util.Optional<int[]> class_ids, java.util.Optional<float[]> nodes_hitrates, java.util.Optional<int[]> nodes_featureids, java.util.Optional<int[]> nodes_treeids, java.util.Optional<byte[]> class_weights_as_tensor, java.util.Optional<String> post_transform, java.util.Optional<String[]> nodes_modes, java.util.Optional<int[]> nodes_falsenodeids, java.util.Optional<String[]> classlabels_strings, java.util.Optional<int[]> nodes_truenodeids, java.util.Optional<int[]> nodes_nodeids, java.util.Optional<byte[]> nodes_hitrates_as_tensor, java.util.Optional<float[]> class_weights, java.util.Optional<byte[]> base_values_as_tensor, java.util.Optional<int[]> nodes_missing_value_tracks_true, java.util.Optional<int[]> class_nodeids, java.util.Optional<int[]> class_treeids, java.util.Optional<float[]> base_values, java.util.Optional<float[]> nodes_values, java.util.Optional<byte[]> nodes_values_as_tensor) {
29728         return new TreeEnsembleClassifier(resultType, X, classlabels_int64s, class_ids, nodes_hitrates, nodes_featureids, nodes_treeids, class_weights_as_tensor, post_transform, nodes_modes, nodes_falsenodeids, classlabels_strings, nodes_truenodeids, nodes_nodeids, nodes_hitrates_as_tensor, class_weights, base_values_as_tensor, nodes_missing_value_tracks_true, class_nodeids, class_treeids, base_values, nodes_values, nodes_values_as_tensor);
29729     }
29730 
29731     @OpFactory.OpDeclaration(TreeEnsembleRegressor.NAME)
29732     public static final class TreeEnsembleRegressor extends OnnxOp {
29733         public static final String NAME = "TreeEnsembleRegressor";
29734 
29735         public enum Attribute implements OnnxAttribute {
29736             aggregate_function(String.class, true, "SUM"),
29737             nodes_hitrates(float[].class, true, null),
29738             target_weights_as_tensor(byte[].class, true, null),
29739             nodes_featureids(int[].class, true, null),
29740             target_treeids(int[].class, true, null),
29741             nodes_treeids(int[].class, true, null),
29742             post_transform(String.class, true, "NONE"),
29743             nodes_modes(String[].class, true, null),
29744             target_weights(float[].class, true, null),
29745             nodes_falsenodeids(int[].class, true, null),
29746             target_ids(int[].class, true, null),
29747             nodes_truenodeids(int[].class, true, null),
29748             target_nodeids(int[].class, true, null),
29749             nodes_nodeids(int[].class, true, null),
29750             nodes_hitrates_as_tensor(byte[].class, true, null),
29751             base_values_as_tensor(byte[].class, true, null),
29752             n_targets(Integer.class, true, null),
29753             nodes_missing_value_tracks_true(int[].class, true, null),
29754             base_values(float[].class, true, null),
29755             nodes_values(float[].class, true, null),
29756             nodes_values_as_tensor(byte[].class, true, null),
29757             ;
29758 
29759                 final Class<?> t;
29760                 final boolean optional;
29761                 final Object defaultValue;
29762 
29763                 Attribute(Class<?> type, boolean optional, Object defaultValue) {
29764                     this.t = type;
29765                     this.optional = optional;
29766                     this.defaultValue = defaultValue;
29767                     assert optional || defaultValue == null;
29768                 }
29769 
29770                 public Class<?> type() {
29771                     return t;
29772                 }
29773 
29774                 public boolean isOptional() {
29775                     return optional;
29776                 }
29777 
29778                 public Object defaultValue() {
29779                     return defaultValue;
29780                 }
29781         }
29782 
29783         public enum TypeConstraint implements OnnxTypeConstraint {
29784             T(new OnnxType.TypeVariable("T", List.of(OnnxType.tensor(OnnxType.float32()), OnnxType.tensor(OnnxType.float64()), OnnxType.tensor(OnnxType.int64()), OnnxType.tensor(OnnxType.int32())))),
29785             ;
29786 
29787             final OnnxType.TypeVariable typeVariable;
29788 
29789             TypeConstraint(OnnxType.TypeVariable typeVariable) {
29790                 assert typeVariable.name().equals(name());
29791                 this.typeVariable = typeVariable;
29792             }
29793 
29794             @Override
29795             public OnnxType.TypeVariable typeVariable() {
29796                 return typeVariable;
29797             }
29798         }
29799 
29800         public enum InputParameter implements OnnxParameter {
29801             X(TypeConstraint.T.typeVariable(), Quantifier.REQUIRED),
29802             ;
29803 
29804             final OnnxType type;
29805             final Quantifier quantifier;
29806 
29807             InputParameter(OnnxType type, Quantifier quantifier) {
29808                 this.type = type;
29809                 this.quantifier = quantifier;
29810             }
29811 
29812             @Override
29813             public OnnxType type() {
29814                 return type;
29815             }
29816 
29817             @Override
29818             public Quantifier quantifier() {
29819                 return quantifier;
29820             }
29821         }
29822 
29823         public enum OutputParameter implements OnnxParameter {
29824             Y(OnnxType.tensor(OnnxType.float32()), Quantifier.REQUIRED),
29825             ;
29826 
29827             final OnnxType type;
29828             final Quantifier quantifier;
29829 
29830             OutputParameter(OnnxType type, Quantifier quantifier) {
29831                 this.type = type;
29832                 this.quantifier = quantifier;
29833             }
29834 
29835             @Override
29836             public OnnxType type() {
29837                 return type;
29838             }
29839 
29840             @Override
29841             public Quantifier quantifier() {
29842                 return quantifier;
29843             }
29844         }
29845 
29846         public static final OnnxSchema SCHEMA = new OnnxSchemaRecord(
29847                 NAME,
29848                 List.of(Attribute.values()),
29849                 List.of(TypeConstraint.values()),
29850                 List.of(InputParameter.values()),
29851                 List.of(OutputParameter.values())
29852         );
29853 
29854         public TreeEnsembleRegressor(ExternalizedOp def) {
29855             super(SCHEMA, def);
29856         }
29857 
29858         TreeEnsembleRegressor(TreeEnsembleRegressor that, CopyContext cc) {
29859             super(that, cc);
29860         }
29861 
29862         @Override
29863         public TreeEnsembleRegressor transform(CopyContext cc, OpTransformer ot) {
29864             return new TreeEnsembleRegressor(this, cc);
29865         }
29866 
29867         TreeEnsembleRegressor(TypeElement resultType, Value X, java.util.Optional<String> aggregate_function, java.util.Optional<float[]> nodes_hitrates, java.util.Optional<byte[]> target_weights_as_tensor, java.util.Optional<int[]> nodes_featureids, java.util.Optional<int[]> target_treeids, java.util.Optional<int[]> nodes_treeids, java.util.Optional<String> post_transform, java.util.Optional<String[]> nodes_modes, java.util.Optional<float[]> target_weights, java.util.Optional<int[]> nodes_falsenodeids, java.util.Optional<int[]> target_ids, java.util.Optional<int[]> nodes_truenodeids, java.util.Optional<int[]> target_nodeids, java.util.Optional<int[]> nodes_nodeids, java.util.Optional<byte[]> nodes_hitrates_as_tensor, java.util.Optional<byte[]> base_values_as_tensor, java.util.Optional<Integer> n_targets, java.util.Optional<int[]> nodes_missing_value_tracks_true, java.util.Optional<float[]> base_values, java.util.Optional<float[]> nodes_values, java.util.Optional<byte[]> nodes_values_as_tensor) {
29868             super(SCHEMA, resultType, Set.of(), List.of(X), List.of(aggregate_function, nodes_hitrates, target_weights_as_tensor, nodes_featureids, target_treeids, nodes_treeids, post_transform, nodes_modes, target_weights, nodes_falsenodeids, target_ids, nodes_truenodeids, target_nodeids, nodes_nodeids, nodes_hitrates_as_tensor, base_values_as_tensor, n_targets, nodes_missing_value_tracks_true, base_values, nodes_values, nodes_values_as_tensor));
29869         }
29870 
29871         @Override
29872         public SequencedSet<OnnxParameter> onnxOutputs() {
29873             return onnxOutputs(SCHEMA);
29874         }
29875 
29876         @Override
29877         public SequencedMap<OnnxParameter, Object> onnxInputs() {
29878             return onnxInputs(SCHEMA, List.of(X()));
29879         }
29880 
29881         public Value X() {
29882             return operands().get(0);
29883         }
29884 
29885         public java.util.Optional<String> aggregate_function() {
29886             String aggregate_function = Attribute.aggregate_function.access(String.class, onnxAttributes);
29887             return java.util.Optional.ofNullable(aggregate_function);
29888         }
29889 
29890         public java.util.Optional<float[]> nodes_hitrates() {
29891             float[] nodes_hitrates = Attribute.nodes_hitrates.access(float[].class, onnxAttributes);
29892             return java.util.Optional.ofNullable(nodes_hitrates).map(float[]::clone);
29893         }
29894 
29895         public java.util.Optional<byte[]> target_weights_as_tensor() {
29896             byte[] target_weights_as_tensor = Attribute.target_weights_as_tensor.access(byte[].class, onnxAttributes);
29897             return java.util.Optional.ofNullable(target_weights_as_tensor).map(byte[]::clone);
29898         }
29899 
29900         public java.util.Optional<int[]> nodes_featureids() {
29901             int[] nodes_featureids = Attribute.nodes_featureids.access(int[].class, onnxAttributes);
29902             return java.util.Optional.ofNullable(nodes_featureids).map(int[]::clone);
29903         }
29904 
29905         public java.util.Optional<int[]> target_treeids() {
29906             int[] target_treeids = Attribute.target_treeids.access(int[].class, onnxAttributes);
29907             return java.util.Optional.ofNullable(target_treeids).map(int[]::clone);
29908         }
29909 
29910         public java.util.Optional<int[]> nodes_treeids() {
29911             int[] nodes_treeids = Attribute.nodes_treeids.access(int[].class, onnxAttributes);
29912             return java.util.Optional.ofNullable(nodes_treeids).map(int[]::clone);
29913         }
29914 
29915         public java.util.Optional<String> post_transform() {
29916             String post_transform = Attribute.post_transform.access(String.class, onnxAttributes);
29917             return java.util.Optional.ofNullable(post_transform);
29918         }
29919 
29920         public java.util.Optional<String[]> nodes_modes() {
29921             String[] nodes_modes = Attribute.nodes_modes.access(String[].class, onnxAttributes);
29922             return java.util.Optional.ofNullable(nodes_modes).map(String[]::clone);
29923         }
29924 
29925         public java.util.Optional<float[]> target_weights() {
29926             float[] target_weights = Attribute.target_weights.access(float[].class, onnxAttributes);
29927             return java.util.Optional.ofNullable(target_weights).map(float[]::clone);
29928         }
29929 
29930         public java.util.Optional<int[]> nodes_falsenodeids() {
29931             int[] nodes_falsenodeids = Attribute.nodes_falsenodeids.access(int[].class, onnxAttributes);
29932             return java.util.Optional.ofNullable(nodes_falsenodeids).map(int[]::clone);
29933         }
29934 
29935         public java.util.Optional<int[]> target_ids() {
29936             int[] target_ids = Attribute.target_ids.access(int[].class, onnxAttributes);
29937             return java.util.Optional.ofNullable(target_ids).map(int[]::clone);
29938         }
29939 
29940         public java.util.Optional<int[]> nodes_truenodeids() {
29941             int[] nodes_truenodeids = Attribute.nodes_truenodeids.access(int[].class, onnxAttributes);
29942             return java.util.Optional.ofNullable(nodes_truenodeids).map(int[]::clone);
29943         }
29944 
29945         public java.util.Optional<int[]> target_nodeids() {
29946             int[] target_nodeids = Attribute.target_nodeids.access(int[].class, onnxAttributes);
29947             return java.util.Optional.ofNullable(target_nodeids).map(int[]::clone);
29948         }
29949 
29950         public java.util.Optional<int[]> nodes_nodeids() {
29951             int[] nodes_nodeids = Attribute.nodes_nodeids.access(int[].class, onnxAttributes);
29952             return java.util.Optional.ofNullable(nodes_nodeids).map(int[]::clone);
29953         }
29954 
29955         public java.util.Optional<byte[]> nodes_hitrates_as_tensor() {
29956             byte[] nodes_hitrates_as_tensor = Attribute.nodes_hitrates_as_tensor.access(byte[].class, onnxAttributes);
29957             return java.util.Optional.ofNullable(nodes_hitrates_as_tensor).map(byte[]::clone);
29958         }
29959 
29960         public java.util.Optional<byte[]> base_values_as_tensor() {
29961             byte[] base_values_as_tensor = Attribute.base_values_as_tensor.access(byte[].class, onnxAttributes);
29962             return java.util.Optional.ofNullable(base_values_as_tensor).map(byte[]::clone);
29963         }
29964 
29965         public java.util.Optional<Integer> n_targets() {
29966             Integer n_targets = Attribute.n_targets.access(Integer.class, onnxAttributes);
29967             return java.util.Optional.ofNullable(n_targets);
29968         }
29969 
29970         public java.util.Optional<int[]> nodes_missing_value_tracks_true() {
29971             int[] nodes_missing_value_tracks_true = Attribute.nodes_missing_value_tracks_true.access(int[].class, onnxAttributes);
29972             return java.util.Optional.ofNullable(nodes_missing_value_tracks_true).map(int[]::clone);
29973         }
29974 
29975         public java.util.Optional<float[]> base_values() {
29976             float[] base_values = Attribute.base_values.access(float[].class, onnxAttributes);
29977             return java.util.Optional.ofNullable(base_values).map(float[]::clone);
29978         }
29979 
29980         public java.util.Optional<float[]> nodes_values() {
29981             float[] nodes_values = Attribute.nodes_values.access(float[].class, onnxAttributes);
29982             return java.util.Optional.ofNullable(nodes_values).map(float[]::clone);
29983         }
29984 
29985         public java.util.Optional<byte[]> nodes_values_as_tensor() {
29986             byte[] nodes_values_as_tensor = Attribute.nodes_values_as_tensor.access(byte[].class, onnxAttributes);
29987             return java.util.Optional.ofNullable(nodes_values_as_tensor).map(byte[]::clone);
29988         }
29989 
29990     }
29991 
29992     public static TreeEnsembleRegressor TreeEnsembleRegressor(TypeElement resultType, Value X, java.util.Optional<String> aggregate_function, java.util.Optional<float[]> nodes_hitrates, java.util.Optional<byte[]> target_weights_as_tensor, java.util.Optional<int[]> nodes_featureids, java.util.Optional<int[]> target_treeids, java.util.Optional<int[]> nodes_treeids, java.util.Optional<String> post_transform, java.util.Optional<String[]> nodes_modes, java.util.Optional<float[]> target_weights, java.util.Optional<int[]> nodes_falsenodeids, java.util.Optional<int[]> target_ids, java.util.Optional<int[]> nodes_truenodeids, java.util.Optional<int[]> target_nodeids, java.util.Optional<int[]> nodes_nodeids, java.util.Optional<byte[]> nodes_hitrates_as_tensor, java.util.Optional<byte[]> base_values_as_tensor, java.util.Optional<Integer> n_targets, java.util.Optional<int[]> nodes_missing_value_tracks_true, java.util.Optional<float[]> base_values, java.util.Optional<float[]> nodes_values, java.util.Optional<byte[]> nodes_values_as_tensor) {
29993         return new TreeEnsembleRegressor(resultType, X, aggregate_function, nodes_hitrates, target_weights_as_tensor, nodes_featureids, target_treeids, nodes_treeids, post_transform, nodes_modes, target_weights, nodes_falsenodeids, target_ids, nodes_truenodeids, target_nodeids, nodes_nodeids, nodes_hitrates_as_tensor, base_values_as_tensor, n_targets, nodes_missing_value_tracks_true, base_values, nodes_values, nodes_values_as_tensor);
29994     }
29995 
29996     @OpFactory.OpDeclaration(Trilu.NAME)
29997     public static final class Trilu extends OnnxOp {
29998         public static final String NAME = "Trilu";
29999 
30000         public enum Attribute implements OnnxAttribute {
30001             upper(Integer.class, true, 1),
30002             ;
30003 
30004                 final Class<?> t;
30005                 final boolean optional;
30006                 final Object defaultValue;
30007 
30008                 Attribute(Class<?> type, boolean optional, Object defaultValue) {
30009                     this.t = type;
30010                     this.optional = optional;
30011                     this.defaultValue = defaultValue;
30012                     assert optional || defaultValue == null;
30013                 }
30014 
30015                 public Class<?> type() {
30016                     return t;
30017                 }
30018 
30019                 public boolean isOptional() {
30020                     return optional;
30021                 }
30022 
30023                 public Object defaultValue() {
30024                     return defaultValue;
30025                 }
30026         }
30027 
30028         public enum TypeConstraint implements OnnxTypeConstraint {
30029             T(new OnnxType.TypeVariable("T", List.of(OnnxType.tensor(OnnxType.uint8()), OnnxType.tensor(OnnxType.uint16()), OnnxType.tensor(OnnxType.uint32()), OnnxType.tensor(OnnxType.uint64()), OnnxType.tensor(OnnxType.int8()), OnnxType.tensor(OnnxType.int16()), OnnxType.tensor(OnnxType.int32()), OnnxType.tensor(OnnxType.int64()), OnnxType.tensor(OnnxType.bfloat16()), OnnxType.tensor(OnnxType.float16()), OnnxType.tensor(OnnxType.float32()), OnnxType.tensor(OnnxType.float64()), OnnxType.tensor(OnnxType.string()), OnnxType.tensor(OnnxType.bool()), OnnxType.tensor(OnnxType.complex64()), OnnxType.tensor(OnnxType.complex128())))),
30030             ;
30031 
30032             final OnnxType.TypeVariable typeVariable;
30033 
30034             TypeConstraint(OnnxType.TypeVariable typeVariable) {
30035                 assert typeVariable.name().equals(name());
30036                 this.typeVariable = typeVariable;
30037             }
30038 
30039             @Override
30040             public OnnxType.TypeVariable typeVariable() {
30041                 return typeVariable;
30042             }
30043         }
30044 
30045         public enum InputParameter implements OnnxParameter {
30046             input(TypeConstraint.T.typeVariable(), Quantifier.REQUIRED),
30047             k(OnnxType.tensor(OnnxType.int64()), Quantifier.OPTIONAL),
30048             ;
30049 
30050             final OnnxType type;
30051             final Quantifier quantifier;
30052 
30053             InputParameter(OnnxType type, Quantifier quantifier) {
30054                 this.type = type;
30055                 this.quantifier = quantifier;
30056             }
30057 
30058             @Override
30059             public OnnxType type() {
30060                 return type;
30061             }
30062 
30063             @Override
30064             public Quantifier quantifier() {
30065                 return quantifier;
30066             }
30067         }
30068 
30069         public enum OutputParameter implements OnnxParameter {
30070             output(TypeConstraint.T.typeVariable(), Quantifier.REQUIRED),
30071             ;
30072 
30073             final OnnxType type;
30074             final Quantifier quantifier;
30075 
30076             OutputParameter(OnnxType type, Quantifier quantifier) {
30077                 this.type = type;
30078                 this.quantifier = quantifier;
30079             }
30080 
30081             @Override
30082             public OnnxType type() {
30083                 return type;
30084             }
30085 
30086             @Override
30087             public Quantifier quantifier() {
30088                 return quantifier;
30089             }
30090         }
30091 
30092         public static final OnnxSchema SCHEMA = new OnnxSchemaRecord(
30093                 NAME,
30094                 List.of(Attribute.values()),
30095                 List.of(TypeConstraint.values()),
30096                 List.of(InputParameter.values()),
30097                 List.of(OutputParameter.values())
30098         );
30099 
30100         public Trilu(ExternalizedOp def) {
30101             super(SCHEMA, def);
30102         }
30103 
30104         Trilu(Trilu that, CopyContext cc) {
30105             super(that, cc);
30106         }
30107 
30108         @Override
30109         public Trilu transform(CopyContext cc, OpTransformer ot) {
30110             return new Trilu(this, cc);
30111         }
30112 
30113         Trilu(TypeElement resultType, Value input, java.util.Optional<Value> k, java.util.Optional<Integer> upper) {
30114             super(SCHEMA, resultType, Set.of(), List.of(input, k), List.of(upper));
30115         }
30116 
30117         @Override
30118         public SequencedSet<OnnxParameter> onnxOutputs() {
30119             return onnxOutputs(SCHEMA);
30120         }
30121 
30122         @Override
30123         public SequencedMap<OnnxParameter, Object> onnxInputs() {
30124             return onnxInputs(SCHEMA, List.of(input(), k()));
30125         }
30126 
30127         public Value input() {
30128             return operands().get(0);
30129         }
30130 
30131         public java.util.Optional<Value> k() {
30132             int i = optionalInputArguments.indexOf(InputParameter.k);
30133             return i != -1 ? java.util.Optional.of(operands().get(1 + i)) : java.util.Optional.empty();
30134         }
30135 
30136         public java.util.Optional<Integer> upper() {
30137             Integer upper = Attribute.upper.access(Integer.class, onnxAttributes);
30138             return java.util.Optional.ofNullable(upper);
30139         }
30140 
30141     }
30142 
30143     public static Trilu Trilu(TypeElement resultType, Value input, java.util.Optional<Value> k, java.util.Optional<Integer> upper) {
30144         return new Trilu(resultType, input, k, upper);
30145     }
30146 
30147     @OpFactory.OpDeclaration(Unique.NAME)
30148     public static final class Unique extends OnnxOp {
30149         public static final String NAME = "Unique";
30150 
30151         public enum Attribute implements OnnxAttribute {
30152             sorted(Integer.class, true, 1),
30153             axis(Integer.class, true, null),
30154             ;
30155 
30156                 final Class<?> t;
30157                 final boolean optional;
30158                 final Object defaultValue;
30159 
30160                 Attribute(Class<?> type, boolean optional, Object defaultValue) {
30161                     this.t = type;
30162                     this.optional = optional;
30163                     this.defaultValue = defaultValue;
30164                     assert optional || defaultValue == null;
30165                 }
30166 
30167                 public Class<?> type() {
30168                     return t;
30169                 }
30170 
30171                 public boolean isOptional() {
30172                     return optional;
30173                 }
30174 
30175                 public Object defaultValue() {
30176                     return defaultValue;
30177                 }
30178         }
30179 
30180         public enum TypeConstraint implements OnnxTypeConstraint {
30181             T(new OnnxType.TypeVariable("T", List.of(OnnxType.tensor(OnnxType.uint8()), OnnxType.tensor(OnnxType.uint16()), OnnxType.tensor(OnnxType.uint32()), OnnxType.tensor(OnnxType.uint64()), OnnxType.tensor(OnnxType.int8()), OnnxType.tensor(OnnxType.int16()), OnnxType.tensor(OnnxType.int32()), OnnxType.tensor(OnnxType.int64()), OnnxType.tensor(OnnxType.float16()), OnnxType.tensor(OnnxType.float32()), OnnxType.tensor(OnnxType.float64()), OnnxType.tensor(OnnxType.string()), OnnxType.tensor(OnnxType.bool()), OnnxType.tensor(OnnxType.complex64()), OnnxType.tensor(OnnxType.complex128())))),
30182             ;
30183 
30184             final OnnxType.TypeVariable typeVariable;
30185 
30186             TypeConstraint(OnnxType.TypeVariable typeVariable) {
30187                 assert typeVariable.name().equals(name());
30188                 this.typeVariable = typeVariable;
30189             }
30190 
30191             @Override
30192             public OnnxType.TypeVariable typeVariable() {
30193                 return typeVariable;
30194             }
30195         }
30196 
30197         public enum InputParameter implements OnnxParameter {
30198             X(TypeConstraint.T.typeVariable(), Quantifier.REQUIRED),
30199             ;
30200 
30201             final OnnxType type;
30202             final Quantifier quantifier;
30203 
30204             InputParameter(OnnxType type, Quantifier quantifier) {
30205                 this.type = type;
30206                 this.quantifier = quantifier;
30207             }
30208 
30209             @Override
30210             public OnnxType type() {
30211                 return type;
30212             }
30213 
30214             @Override
30215             public Quantifier quantifier() {
30216                 return quantifier;
30217             }
30218         }
30219 
30220         public enum OutputParameter implements OnnxParameter {
30221             Y(TypeConstraint.T.typeVariable(), Quantifier.REQUIRED),
30222             indices(OnnxType.tensor(OnnxType.int64()), Quantifier.OPTIONAL),
30223             inverse_indices(OnnxType.tensor(OnnxType.int64()), Quantifier.OPTIONAL),
30224             counts(OnnxType.tensor(OnnxType.int64()), Quantifier.OPTIONAL),
30225             ;
30226 
30227             final OnnxType type;
30228             final Quantifier quantifier;
30229 
30230             OutputParameter(OnnxType type, Quantifier quantifier) {
30231                 this.type = type;
30232                 this.quantifier = quantifier;
30233             }
30234 
30235             @Override
30236             public OnnxType type() {
30237                 return type;
30238             }
30239 
30240             @Override
30241             public Quantifier quantifier() {
30242                 return quantifier;
30243             }
30244         }
30245 
30246         public static final OnnxSchema SCHEMA = new OnnxSchemaRecord(
30247                 NAME,
30248                 List.of(Attribute.values()),
30249                 List.of(TypeConstraint.values()),
30250                 List.of(InputParameter.values()),
30251                 List.of(OutputParameter.values())
30252         );
30253 
30254         public Unique(ExternalizedOp def) {
30255             super(SCHEMA, def);
30256         }
30257 
30258         Unique(Unique that, CopyContext cc) {
30259             super(that, cc);
30260         }
30261 
30262         @Override
30263         public Unique transform(CopyContext cc, OpTransformer ot) {
30264             return new Unique(this, cc);
30265         }
30266 
30267         Unique(TypeElement resultType, Set<OutputParameter> optionalOutputs, Value X, java.util.Optional<Integer> sorted, java.util.Optional<Integer> axis) {
30268             super(SCHEMA, resultType, optionalOutputs, List.of(X), List.of(sorted, axis));
30269         }
30270 
30271         @Override
30272         public SequencedSet<OnnxParameter> onnxOutputs() {
30273             return onnxOutputs(SCHEMA);
30274         }
30275 
30276         @Override
30277         public SequencedMap<OnnxParameter, Object> onnxInputs() {
30278             return onnxInputs(SCHEMA, List.of(X()));
30279         }
30280 
30281         public Value X() {
30282             return operands().get(0);
30283         }
30284 
30285         public java.util.Optional<Integer> sorted() {
30286             Integer sorted = Attribute.sorted.access(Integer.class, onnxAttributes);
30287             return java.util.Optional.ofNullable(sorted);
30288         }
30289 
30290         public java.util.Optional<Integer> axis() {
30291             Integer axis = Attribute.axis.access(Integer.class, onnxAttributes);
30292             return java.util.Optional.ofNullable(axis);
30293         }
30294 
30295     }
30296 
30297     public static Unique Unique(TypeElement resultType, Set<Unique.OutputParameter> optionalOutputs, Value X, java.util.Optional<Integer> sorted, java.util.Optional<Integer> axis) {
30298         return new Unique(resultType, optionalOutputs, X, sorted, axis);
30299     }
30300 
30301     @OpFactory.OpDeclaration(Unsqueeze.NAME)
30302     public static final class Unsqueeze extends OnnxOp {
30303         public static final String NAME = "Unsqueeze";
30304 
30305         public enum Attribute implements OnnxAttribute.None { }
30306 
30307         public enum TypeConstraint implements OnnxTypeConstraint {
30308             T(new OnnxType.TypeVariable("T", List.of(OnnxType.tensor(OnnxType.uint8()), OnnxType.tensor(OnnxType.uint16()), OnnxType.tensor(OnnxType.uint32()), OnnxType.tensor(OnnxType.uint64()), OnnxType.tensor(OnnxType.int8()), OnnxType.tensor(OnnxType.int16()), OnnxType.tensor(OnnxType.int32()), OnnxType.tensor(OnnxType.int64()), OnnxType.tensor(OnnxType.bfloat16()), OnnxType.tensor(OnnxType.float16()), OnnxType.tensor(OnnxType.float32()), OnnxType.tensor(OnnxType.float64()), OnnxType.tensor(OnnxType.string()), OnnxType.tensor(OnnxType.bool()), OnnxType.tensor(OnnxType.complex64()), OnnxType.tensor(OnnxType.complex128()), OnnxType.tensor(OnnxType.float8e4m3fn()), OnnxType.tensor(OnnxType.float8e4m3fnuz()), OnnxType.tensor(OnnxType.float8e5m2()), OnnxType.tensor(OnnxType.float8e5m2fnuz()), OnnxType.tensor(OnnxType.uint4()), OnnxType.tensor(OnnxType.int4()), OnnxType.tensor(OnnxType.float4e2m1())))),
30309             ;
30310 
30311             final OnnxType.TypeVariable typeVariable;
30312 
30313             TypeConstraint(OnnxType.TypeVariable typeVariable) {
30314                 assert typeVariable.name().equals(name());
30315                 this.typeVariable = typeVariable;
30316             }
30317 
30318             @Override
30319             public OnnxType.TypeVariable typeVariable() {
30320                 return typeVariable;
30321             }
30322         }
30323 
30324         public enum InputParameter implements OnnxParameter {
30325             data(TypeConstraint.T.typeVariable(), Quantifier.REQUIRED),
30326             axes(OnnxType.tensor(OnnxType.int64()), Quantifier.REQUIRED),
30327             ;
30328 
30329             final OnnxType type;
30330             final Quantifier quantifier;
30331 
30332             InputParameter(OnnxType type, Quantifier quantifier) {
30333                 this.type = type;
30334                 this.quantifier = quantifier;
30335             }
30336 
30337             @Override
30338             public OnnxType type() {
30339                 return type;
30340             }
30341 
30342             @Override
30343             public Quantifier quantifier() {
30344                 return quantifier;
30345             }
30346         }
30347 
30348         public enum OutputParameter implements OnnxParameter {
30349             expanded(TypeConstraint.T.typeVariable(), Quantifier.REQUIRED),
30350             ;
30351 
30352             final OnnxType type;
30353             final Quantifier quantifier;
30354 
30355             OutputParameter(OnnxType type, Quantifier quantifier) {
30356                 this.type = type;
30357                 this.quantifier = quantifier;
30358             }
30359 
30360             @Override
30361             public OnnxType type() {
30362                 return type;
30363             }
30364 
30365             @Override
30366             public Quantifier quantifier() {
30367                 return quantifier;
30368             }
30369         }
30370 
30371         public static final OnnxSchema SCHEMA = new OnnxSchemaRecord(
30372                 NAME,
30373                 List.of(Attribute.values()),
30374                 List.of(TypeConstraint.values()),
30375                 List.of(InputParameter.values()),
30376                 List.of(OutputParameter.values())
30377         );
30378 
30379         public Unsqueeze(ExternalizedOp def) {
30380             super(SCHEMA, def);
30381         }
30382 
30383         Unsqueeze(Unsqueeze that, CopyContext cc) {
30384             super(that, cc);
30385         }
30386 
30387         @Override
30388         public Unsqueeze transform(CopyContext cc, OpTransformer ot) {
30389             return new Unsqueeze(this, cc);
30390         }
30391 
30392         Unsqueeze(TypeElement resultType, Value data, Value axes) {
30393             super(SCHEMA, resultType, Set.of(), List.of(data, axes), List.of());
30394         }
30395 
30396         @Override
30397         public SequencedSet<OnnxParameter> onnxOutputs() {
30398             return onnxOutputs(SCHEMA);
30399         }
30400 
30401         @Override
30402         public SequencedMap<OnnxParameter, Object> onnxInputs() {
30403             return onnxInputs(SCHEMA, List.of(data(), axes()));
30404         }
30405 
30406         public Value data() {
30407             return operands().get(0);
30408         }
30409 
30410         public Value axes() {
30411             return operands().get(1);
30412         }
30413 
30414     }
30415 
30416     public static Unsqueeze Unsqueeze(TypeElement resultType, Value data, Value axes) {
30417         return new Unsqueeze(resultType, data, axes);
30418     }
30419 
30420     @OpFactory.OpDeclaration(Upsample.NAME)
30421     public static final class Upsample extends OnnxOp {
30422         public static final String NAME = "Upsample";
30423 
30424         public enum Attribute implements OnnxAttribute {
30425             mode(String.class, true, "nearest"),
30426             ;
30427 
30428                 final Class<?> t;
30429                 final boolean optional;
30430                 final Object defaultValue;
30431 
30432                 Attribute(Class<?> type, boolean optional, Object defaultValue) {
30433                     this.t = type;
30434                     this.optional = optional;
30435                     this.defaultValue = defaultValue;
30436                     assert optional || defaultValue == null;
30437                 }
30438 
30439                 public Class<?> type() {
30440                     return t;
30441                 }
30442 
30443                 public boolean isOptional() {
30444                     return optional;
30445                 }
30446 
30447                 public Object defaultValue() {
30448                     return defaultValue;
30449                 }
30450         }
30451 
30452         public enum TypeConstraint implements OnnxTypeConstraint {
30453             T(new OnnxType.TypeVariable("T", List.of(OnnxType.tensor(OnnxType.uint8()), OnnxType.tensor(OnnxType.uint16()), OnnxType.tensor(OnnxType.uint32()), OnnxType.tensor(OnnxType.uint64()), OnnxType.tensor(OnnxType.int8()), OnnxType.tensor(OnnxType.int16()), OnnxType.tensor(OnnxType.int32()), OnnxType.tensor(OnnxType.int64()), OnnxType.tensor(OnnxType.float16()), OnnxType.tensor(OnnxType.float32()), OnnxType.tensor(OnnxType.float64()), OnnxType.tensor(OnnxType.string()), OnnxType.tensor(OnnxType.bool()), OnnxType.tensor(OnnxType.complex64()), OnnxType.tensor(OnnxType.complex128())))),
30454             ;
30455 
30456             final OnnxType.TypeVariable typeVariable;
30457 
30458             TypeConstraint(OnnxType.TypeVariable typeVariable) {
30459                 assert typeVariable.name().equals(name());
30460                 this.typeVariable = typeVariable;
30461             }
30462 
30463             @Override
30464             public OnnxType.TypeVariable typeVariable() {
30465                 return typeVariable;
30466             }
30467         }
30468 
30469         public enum InputParameter implements OnnxParameter {
30470             X(TypeConstraint.T.typeVariable(), Quantifier.REQUIRED),
30471             scales(OnnxType.tensor(OnnxType.float32()), Quantifier.REQUIRED),
30472             ;
30473 
30474             final OnnxType type;
30475             final Quantifier quantifier;
30476 
30477             InputParameter(OnnxType type, Quantifier quantifier) {
30478                 this.type = type;
30479                 this.quantifier = quantifier;
30480             }
30481 
30482             @Override
30483             public OnnxType type() {
30484                 return type;
30485             }
30486 
30487             @Override
30488             public Quantifier quantifier() {
30489                 return quantifier;
30490             }
30491         }
30492 
30493         public enum OutputParameter implements OnnxParameter {
30494             Y(TypeConstraint.T.typeVariable(), Quantifier.REQUIRED),
30495             ;
30496 
30497             final OnnxType type;
30498             final Quantifier quantifier;
30499 
30500             OutputParameter(OnnxType type, Quantifier quantifier) {
30501                 this.type = type;
30502                 this.quantifier = quantifier;
30503             }
30504 
30505             @Override
30506             public OnnxType type() {
30507                 return type;
30508             }
30509 
30510             @Override
30511             public Quantifier quantifier() {
30512                 return quantifier;
30513             }
30514         }
30515 
30516         public static final OnnxSchema SCHEMA = new OnnxSchemaRecord(
30517                 NAME,
30518                 List.of(Attribute.values()),
30519                 List.of(TypeConstraint.values()),
30520                 List.of(InputParameter.values()),
30521                 List.of(OutputParameter.values())
30522         );
30523 
30524         public Upsample(ExternalizedOp def) {
30525             super(SCHEMA, def);
30526         }
30527 
30528         Upsample(Upsample that, CopyContext cc) {
30529             super(that, cc);
30530         }
30531 
30532         @Override
30533         public Upsample transform(CopyContext cc, OpTransformer ot) {
30534             return new Upsample(this, cc);
30535         }
30536 
30537         Upsample(TypeElement resultType, Value X, Value scales, java.util.Optional<String> mode) {
30538             super(SCHEMA, resultType, Set.of(), List.of(X, scales), List.of(mode));
30539         }
30540 
30541         @Override
30542         public SequencedSet<OnnxParameter> onnxOutputs() {
30543             return onnxOutputs(SCHEMA);
30544         }
30545 
30546         @Override
30547         public SequencedMap<OnnxParameter, Object> onnxInputs() {
30548             return onnxInputs(SCHEMA, List.of(X(), scales()));
30549         }
30550 
30551         public Value X() {
30552             return operands().get(0);
30553         }
30554 
30555         public Value scales() {
30556             return operands().get(1);
30557         }
30558 
30559         public java.util.Optional<String> mode() {
30560             String mode = Attribute.mode.access(String.class, onnxAttributes);
30561             return java.util.Optional.ofNullable(mode);
30562         }
30563 
30564     }
30565 
30566     public static Upsample Upsample(TypeElement resultType, Value X, Value scales, java.util.Optional<String> mode) {
30567         return new Upsample(resultType, X, scales, mode);
30568     }
30569 
30570     @OpFactory.OpDeclaration(Where.NAME)
30571     public static final class Where extends OnnxOp {
30572         public static final String NAME = "Where";
30573 
30574         public enum Attribute implements OnnxAttribute.None { }
30575 
30576         public enum TypeConstraint implements OnnxTypeConstraint {
30577             B(new OnnxType.TypeVariable("B", List.of(OnnxType.tensor(OnnxType.bool())))),
30578             T(new OnnxType.TypeVariable("T", List.of(OnnxType.tensor(OnnxType.uint8()), OnnxType.tensor(OnnxType.uint16()), OnnxType.tensor(OnnxType.uint32()), OnnxType.tensor(OnnxType.uint64()), OnnxType.tensor(OnnxType.int8()), OnnxType.tensor(OnnxType.int16()), OnnxType.tensor(OnnxType.int32()), OnnxType.tensor(OnnxType.int64()), OnnxType.tensor(OnnxType.bfloat16()), OnnxType.tensor(OnnxType.float16()), OnnxType.tensor(OnnxType.float32()), OnnxType.tensor(OnnxType.float64()), OnnxType.tensor(OnnxType.string()), OnnxType.tensor(OnnxType.bool()), OnnxType.tensor(OnnxType.complex64()), OnnxType.tensor(OnnxType.complex128())))),
30579             ;
30580 
30581             final OnnxType.TypeVariable typeVariable;
30582 
30583             TypeConstraint(OnnxType.TypeVariable typeVariable) {
30584                 assert typeVariable.name().equals(name());
30585                 this.typeVariable = typeVariable;
30586             }
30587 
30588             @Override
30589             public OnnxType.TypeVariable typeVariable() {
30590                 return typeVariable;
30591             }
30592         }
30593 
30594         public enum InputParameter implements OnnxParameter {
30595             condition(TypeConstraint.B.typeVariable(), Quantifier.REQUIRED),
30596             X(TypeConstraint.T.typeVariable(), Quantifier.REQUIRED),
30597             Y(TypeConstraint.T.typeVariable(), Quantifier.REQUIRED),
30598             ;
30599 
30600             final OnnxType type;
30601             final Quantifier quantifier;
30602 
30603             InputParameter(OnnxType type, Quantifier quantifier) {
30604                 this.type = type;
30605                 this.quantifier = quantifier;
30606             }
30607 
30608             @Override
30609             public OnnxType type() {
30610                 return type;
30611             }
30612 
30613             @Override
30614             public Quantifier quantifier() {
30615                 return quantifier;
30616             }
30617         }
30618 
30619         public enum OutputParameter implements OnnxParameter {
30620             output(TypeConstraint.T.typeVariable(), Quantifier.REQUIRED),
30621             ;
30622 
30623             final OnnxType type;
30624             final Quantifier quantifier;
30625 
30626             OutputParameter(OnnxType type, Quantifier quantifier) {
30627                 this.type = type;
30628                 this.quantifier = quantifier;
30629             }
30630 
30631             @Override
30632             public OnnxType type() {
30633                 return type;
30634             }
30635 
30636             @Override
30637             public Quantifier quantifier() {
30638                 return quantifier;
30639             }
30640         }
30641 
30642         public static final OnnxSchema SCHEMA = new OnnxSchemaRecord(
30643                 NAME,
30644                 List.of(Attribute.values()),
30645                 List.of(TypeConstraint.values()),
30646                 List.of(InputParameter.values()),
30647                 List.of(OutputParameter.values())
30648         );
30649 
30650         public Where(ExternalizedOp def) {
30651             super(SCHEMA, def);
30652         }
30653 
30654         Where(Where that, CopyContext cc) {
30655             super(that, cc);
30656         }
30657 
30658         @Override
30659         public Where transform(CopyContext cc, OpTransformer ot) {
30660             return new Where(this, cc);
30661         }
30662 
30663         Where(TypeElement resultType, Value condition, Value X, Value Y) {
30664             super(SCHEMA, resultType, Set.of(), List.of(condition, X, Y), List.of());
30665         }
30666 
30667         @Override
30668         public SequencedSet<OnnxParameter> onnxOutputs() {
30669             return onnxOutputs(SCHEMA);
30670         }
30671 
30672         @Override
30673         public SequencedMap<OnnxParameter, Object> onnxInputs() {
30674             return onnxInputs(SCHEMA, List.of(condition(), X(), Y()));
30675         }
30676 
30677         public Value condition() {
30678             return operands().get(0);
30679         }
30680 
30681         public Value X() {
30682             return operands().get(1);
30683         }
30684 
30685         public Value Y() {
30686             return operands().get(2);
30687         }
30688 
30689     }
30690 
30691     public static Where Where(TypeElement resultType, Value condition, Value X, Value Y) {
30692         return new Where(resultType, condition, X, Y);
30693     }
30694 
30695     @OpFactory.OpDeclaration(Xor.NAME)
30696     public static final class Xor extends OnnxOp {
30697         public static final String NAME = "Xor";
30698 
30699         public enum Attribute implements OnnxAttribute.None { }
30700 
30701         public enum TypeConstraint implements OnnxTypeConstraint {
30702             T(new OnnxType.TypeVariable("T", List.of(OnnxType.tensor(OnnxType.bool())))),
30703             T1(new OnnxType.TypeVariable("T1", List.of(OnnxType.tensor(OnnxType.bool())))),
30704             ;
30705 
30706             final OnnxType.TypeVariable typeVariable;
30707 
30708             TypeConstraint(OnnxType.TypeVariable typeVariable) {
30709                 assert typeVariable.name().equals(name());
30710                 this.typeVariable = typeVariable;
30711             }
30712 
30713             @Override
30714             public OnnxType.TypeVariable typeVariable() {
30715                 return typeVariable;
30716             }
30717         }
30718 
30719         public enum InputParameter implements OnnxParameter {
30720             A(TypeConstraint.T.typeVariable(), Quantifier.REQUIRED),
30721             B(TypeConstraint.T.typeVariable(), Quantifier.REQUIRED),
30722             ;
30723 
30724             final OnnxType type;
30725             final Quantifier quantifier;
30726 
30727             InputParameter(OnnxType type, Quantifier quantifier) {
30728                 this.type = type;
30729                 this.quantifier = quantifier;
30730             }
30731 
30732             @Override
30733             public OnnxType type() {
30734                 return type;
30735             }
30736 
30737             @Override
30738             public Quantifier quantifier() {
30739                 return quantifier;
30740             }
30741         }
30742 
30743         public enum OutputParameter implements OnnxParameter {
30744             C(TypeConstraint.T1.typeVariable(), Quantifier.REQUIRED),
30745             ;
30746 
30747             final OnnxType type;
30748             final Quantifier quantifier;
30749 
30750             OutputParameter(OnnxType type, Quantifier quantifier) {
30751                 this.type = type;
30752                 this.quantifier = quantifier;
30753             }
30754 
30755             @Override
30756             public OnnxType type() {
30757                 return type;
30758             }
30759 
30760             @Override
30761             public Quantifier quantifier() {
30762                 return quantifier;
30763             }
30764         }
30765 
30766         public static final OnnxSchema SCHEMA = new OnnxSchemaRecord(
30767                 NAME,
30768                 List.of(Attribute.values()),
30769                 List.of(TypeConstraint.values()),
30770                 List.of(InputParameter.values()),
30771                 List.of(OutputParameter.values())
30772         );
30773 
30774         public Xor(ExternalizedOp def) {
30775             super(SCHEMA, def);
30776         }
30777 
30778         Xor(Xor that, CopyContext cc) {
30779             super(that, cc);
30780         }
30781 
30782         @Override
30783         public Xor transform(CopyContext cc, OpTransformer ot) {
30784             return new Xor(this, cc);
30785         }
30786 
30787         Xor(TypeElement resultType, Value A, Value B) {
30788             super(SCHEMA, resultType, Set.of(), List.of(A, B), List.of());
30789         }
30790 
30791         @Override
30792         public SequencedSet<OnnxParameter> onnxOutputs() {
30793             return onnxOutputs(SCHEMA);
30794         }
30795 
30796         @Override
30797         public SequencedMap<OnnxParameter, Object> onnxInputs() {
30798             return onnxInputs(SCHEMA, List.of(A(), B()));
30799         }
30800 
30801         public Value A() {
30802             return operands().get(0);
30803         }
30804 
30805         public Value B() {
30806             return operands().get(1);
30807         }
30808 
30809     }
30810 
30811     public static Xor Xor(TypeElement resultType, Value A, Value B) {
30812         return new Xor(resultType, A, B);
30813     }
30814 
30815     @OpFactory.OpDeclaration(ZipMap.NAME)
30816     public static final class ZipMap extends OnnxOp {
30817         public static final String NAME = "ZipMap";
30818 
30819         public enum Attribute implements OnnxAttribute {
30820             classlabels_int64s(int[].class, true, null),
30821             classlabels_strings(String[].class, true, null),
30822             ;
30823 
30824                 final Class<?> t;
30825                 final boolean optional;
30826                 final Object defaultValue;
30827 
30828                 Attribute(Class<?> type, boolean optional, Object defaultValue) {
30829                     this.t = type;
30830                     this.optional = optional;
30831                     this.defaultValue = defaultValue;
30832                     assert optional || defaultValue == null;
30833                 }
30834 
30835                 public Class<?> type() {
30836                     return t;
30837                 }
30838 
30839                 public boolean isOptional() {
30840                     return optional;
30841                 }
30842 
30843                 public Object defaultValue() {
30844                     return defaultValue;
30845                 }
30846         }
30847 
30848         public enum TypeConstraint implements OnnxTypeConstraint {
30849             T(new OnnxType.TypeVariable("T", List.of(OnnxType.seq(OnnxType.map(OnnxType.string(), OnnxType.float32())), OnnxType.seq(OnnxType.map(OnnxType.int64(), OnnxType.float32()))))),
30850             ;
30851 
30852             final OnnxType.TypeVariable typeVariable;
30853 
30854             TypeConstraint(OnnxType.TypeVariable typeVariable) {
30855                 assert typeVariable.name().equals(name());
30856                 this.typeVariable = typeVariable;
30857             }
30858 
30859             @Override
30860             public OnnxType.TypeVariable typeVariable() {
30861                 return typeVariable;
30862             }
30863         }
30864 
30865         public enum InputParameter implements OnnxParameter {
30866             X(OnnxType.tensor(OnnxType.float32()), Quantifier.REQUIRED),
30867             ;
30868 
30869             final OnnxType type;
30870             final Quantifier quantifier;
30871 
30872             InputParameter(OnnxType type, Quantifier quantifier) {
30873                 this.type = type;
30874                 this.quantifier = quantifier;
30875             }
30876 
30877             @Override
30878             public OnnxType type() {
30879                 return type;
30880             }
30881 
30882             @Override
30883             public Quantifier quantifier() {
30884                 return quantifier;
30885             }
30886         }
30887 
30888         public enum OutputParameter implements OnnxParameter {
30889             Z(TypeConstraint.T.typeVariable(), Quantifier.REQUIRED),
30890             ;
30891 
30892             final OnnxType type;
30893             final Quantifier quantifier;
30894 
30895             OutputParameter(OnnxType type, Quantifier quantifier) {
30896                 this.type = type;
30897                 this.quantifier = quantifier;
30898             }
30899 
30900             @Override
30901             public OnnxType type() {
30902                 return type;
30903             }
30904 
30905             @Override
30906             public Quantifier quantifier() {
30907                 return quantifier;
30908             }
30909         }
30910 
30911         public static final OnnxSchema SCHEMA = new OnnxSchemaRecord(
30912                 NAME,
30913                 List.of(Attribute.values()),
30914                 List.of(TypeConstraint.values()),
30915                 List.of(InputParameter.values()),
30916                 List.of(OutputParameter.values())
30917         );
30918 
30919         public ZipMap(ExternalizedOp def) {
30920             super(SCHEMA, def);
30921         }
30922 
30923         ZipMap(ZipMap that, CopyContext cc) {
30924             super(that, cc);
30925         }
30926 
30927         @Override
30928         public ZipMap transform(CopyContext cc, OpTransformer ot) {
30929             return new ZipMap(this, cc);
30930         }
30931 
30932         ZipMap(TypeElement resultType, Value X, java.util.Optional<int[]> classlabels_int64s, java.util.Optional<String[]> classlabels_strings) {
30933             super(SCHEMA, resultType, Set.of(), List.of(X), List.of(classlabels_int64s, classlabels_strings));
30934         }
30935 
30936         @Override
30937         public SequencedSet<OnnxParameter> onnxOutputs() {
30938             return onnxOutputs(SCHEMA);
30939         }
30940 
30941         @Override
30942         public SequencedMap<OnnxParameter, Object> onnxInputs() {
30943             return onnxInputs(SCHEMA, List.of(X()));
30944         }
30945 
30946         public Value X() {
30947             return operands().get(0);
30948         }
30949 
30950         public java.util.Optional<int[]> classlabels_int64s() {
30951             int[] classlabels_int64s = Attribute.classlabels_int64s.access(int[].class, onnxAttributes);
30952             return java.util.Optional.ofNullable(classlabels_int64s).map(int[]::clone);
30953         }
30954 
30955         public java.util.Optional<String[]> classlabels_strings() {
30956             String[] classlabels_strings = Attribute.classlabels_strings.access(String[].class, onnxAttributes);
30957             return java.util.Optional.ofNullable(classlabels_strings).map(String[]::clone);
30958         }
30959 
30960     }
30961 
30962     public static ZipMap ZipMap(TypeElement resultType, Value X, java.util.Optional<int[]> classlabels_int64s, java.util.Optional<String[]> classlabels_strings) {
30963         return new ZipMap(resultType, X, classlabels_int64s, classlabels_strings);
30964     }
30965 
30966 }