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.extern.ExternalizedOp;
   31 import jdk.incubator.code.extern.OpFactory;
   32 
   33 import java.util.*;
   34 import oracle.code.onnx.Tensor;
   35 
   36 @SuppressWarnings({"OptionalUsedAsFieldOrParameterType", "unused", "SequencedCollectionMethodCanBeUsed"})
   37 public final class OnnxOps extends ExplicitOnnxOps {
   38 
   39     private OnnxOps() {}
   40 
   41     @OpFactoryHelper.OpDeclaration(Abs.NAME)
   42     public static final class Abs extends OnnxOp {
   43         public static final String NAME = "Abs";
   44 
   45         public enum Attribute implements OnnxAttribute.None { }
   46 
   47         public enum TypeConstraint implements OnnxTypeConstraint {
   48             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())))),
   49             ;
   50 
   51             final OnnxType.TypeVariable typeVariable;
   52 
   53             TypeConstraint(OnnxType.TypeVariable typeVariable) {
   54                 assert typeVariable.name().equals(name());
   55                 this.typeVariable = typeVariable;
   56             }
   57 
   58             @Override
   59             public OnnxType.TypeVariable typeVariable() {
   60                 return typeVariable;
   61             }
   62         }
   63 
   64         public enum InputParameter implements OnnxParameter {
   65             X(TypeConstraint.T.typeVariable(), Quantifier.REQUIRED),
   66             ;
   67 
   68             final OnnxType type;
   69             final Quantifier quantifier;
   70 
   71             InputParameter(OnnxType type, Quantifier quantifier) {
   72                 this.type = type;
   73                 this.quantifier = quantifier;
   74             }
   75 
   76             @Override
   77             public OnnxType type() {
   78                 return type;
   79             }
   80 
   81             @Override
   82             public Quantifier quantifier() {
   83                 return quantifier;
   84             }
   85         }
   86 
   87         public enum OutputParameter implements OnnxParameter {
   88             Y(TypeConstraint.T.typeVariable(), Quantifier.REQUIRED),
   89             ;
   90 
   91             final OnnxType type;
   92             final Quantifier quantifier;
   93 
   94             OutputParameter(OnnxType type, Quantifier quantifier) {
   95                 this.type = type;
   96                 this.quantifier = quantifier;
   97             }
   98 
   99             @Override
  100             public OnnxType type() {
  101                 return type;
  102             }
  103 
  104             @Override
  105             public Quantifier quantifier() {
  106                 return quantifier;
  107             }
  108         }
  109 
  110         public static final OnnxSchema SCHEMA = new OnnxSchemaRecord(
  111                 NAME,
  112                 List.of(Attribute.values()),
  113                 List.of(TypeConstraint.values()),
  114                 List.of(InputParameter.values()),
  115                 List.of(OutputParameter.values())
  116         );
  117 
  118         public Abs(ExternalizedOp def) {
  119             super(SCHEMA, def);
  120         }
  121 
  122         Abs(Abs that, CopyContext cc) {
  123             super(that, cc);
  124         }
  125 
  126         @Override
  127         public Abs transform(CopyContext cc, OpTransformer ot) {
  128             return new Abs(this, cc);
  129         }
  130 
  131         Abs(TypeElement resultType, Value X) {
  132             super(SCHEMA, resultType, Set.of(), List.of(X), List.of());
  133         }
  134 
  135         @Override
  136         public SequencedSet<OnnxParameter> onnxOutputs() {
  137             return onnxOutputs(SCHEMA);
  138         }
  139 
  140         @Override
  141         public SequencedMap<OnnxParameter, Object> onnxInputs() {
  142             return onnxInputs(SCHEMA, List.of(X()));
  143         }
  144 
  145         public Value X() {
  146             return operands().get(0);
  147         }
  148 
  149     }
  150 
  151     public static Abs Abs(TypeElement resultType, Value X) {
  152         return new Abs(resultType, X);
  153     }
  154 
  155     @OpFactoryHelper.OpDeclaration(Acos.NAME)
  156     public static final class Acos extends OnnxOp {
  157         public static final String NAME = "Acos";
  158 
  159         public enum Attribute implements OnnxAttribute.None { }
  160 
  161         public enum TypeConstraint implements OnnxTypeConstraint {
  162             T(new OnnxType.TypeVariable("T", List.of(OnnxType.tensor(OnnxType.bfloat16()), OnnxType.tensor(OnnxType.float16()), OnnxType.tensor(OnnxType.float32()), OnnxType.tensor(OnnxType.float64())))),
  163             ;
  164 
  165             final OnnxType.TypeVariable typeVariable;
  166 
  167             TypeConstraint(OnnxType.TypeVariable typeVariable) {
  168                 assert typeVariable.name().equals(name());
  169                 this.typeVariable = typeVariable;
  170             }
  171 
  172             @Override
  173             public OnnxType.TypeVariable typeVariable() {
  174                 return typeVariable;
  175             }
  176         }
  177 
  178         public enum InputParameter implements OnnxParameter {
  179             input(TypeConstraint.T.typeVariable(), Quantifier.REQUIRED),
  180             ;
  181 
  182             final OnnxType type;
  183             final Quantifier quantifier;
  184 
  185             InputParameter(OnnxType type, Quantifier quantifier) {
  186                 this.type = type;
  187                 this.quantifier = quantifier;
  188             }
  189 
  190             @Override
  191             public OnnxType type() {
  192                 return type;
  193             }
  194 
  195             @Override
  196             public Quantifier quantifier() {
  197                 return quantifier;
  198             }
  199         }
  200 
  201         public enum OutputParameter implements OnnxParameter {
  202             output(TypeConstraint.T.typeVariable(), Quantifier.REQUIRED),
  203             ;
  204 
  205             final OnnxType type;
  206             final Quantifier quantifier;
  207 
  208             OutputParameter(OnnxType type, Quantifier quantifier) {
  209                 this.type = type;
  210                 this.quantifier = quantifier;
  211             }
  212 
  213             @Override
  214             public OnnxType type() {
  215                 return type;
  216             }
  217 
  218             @Override
  219             public Quantifier quantifier() {
  220                 return quantifier;
  221             }
  222         }
  223 
  224         public static final OnnxSchema SCHEMA = new OnnxSchemaRecord(
  225                 NAME,
  226                 List.of(Attribute.values()),
  227                 List.of(TypeConstraint.values()),
  228                 List.of(InputParameter.values()),
  229                 List.of(OutputParameter.values())
  230         );
  231 
  232         public Acos(ExternalizedOp def) {
  233             super(SCHEMA, def);
  234         }
  235 
  236         Acos(Acos that, CopyContext cc) {
  237             super(that, cc);
  238         }
  239 
  240         @Override
  241         public Acos transform(CopyContext cc, OpTransformer ot) {
  242             return new Acos(this, cc);
  243         }
  244 
  245         Acos(TypeElement resultType, Value input) {
  246             super(SCHEMA, resultType, Set.of(), List.of(input), List.of());
  247         }
  248 
  249         @Override
  250         public SequencedSet<OnnxParameter> onnxOutputs() {
  251             return onnxOutputs(SCHEMA);
  252         }
  253 
  254         @Override
  255         public SequencedMap<OnnxParameter, Object> onnxInputs() {
  256             return onnxInputs(SCHEMA, List.of(input()));
  257         }
  258 
  259         public Value input() {
  260             return operands().get(0);
  261         }
  262 
  263     }
  264 
  265     public static Acos Acos(TypeElement resultType, Value input) {
  266         return new Acos(resultType, input);
  267     }
  268 
  269     @OpFactoryHelper.OpDeclaration(Acosh.NAME)
  270     public static final class Acosh extends OnnxOp {
  271         public static final String NAME = "Acosh";
  272 
  273         public enum Attribute implements OnnxAttribute.None { }
  274 
  275         public enum TypeConstraint implements OnnxTypeConstraint {
  276             T(new OnnxType.TypeVariable("T", List.of(OnnxType.tensor(OnnxType.bfloat16()), OnnxType.tensor(OnnxType.float16()), OnnxType.tensor(OnnxType.float32()), OnnxType.tensor(OnnxType.float64())))),
  277             ;
  278 
  279             final OnnxType.TypeVariable typeVariable;
  280 
  281             TypeConstraint(OnnxType.TypeVariable typeVariable) {
  282                 assert typeVariable.name().equals(name());
  283                 this.typeVariable = typeVariable;
  284             }
  285 
  286             @Override
  287             public OnnxType.TypeVariable typeVariable() {
  288                 return typeVariable;
  289             }
  290         }
  291 
  292         public enum InputParameter implements OnnxParameter {
  293             input(TypeConstraint.T.typeVariable(), Quantifier.REQUIRED),
  294             ;
  295 
  296             final OnnxType type;
  297             final Quantifier quantifier;
  298 
  299             InputParameter(OnnxType type, Quantifier quantifier) {
  300                 this.type = type;
  301                 this.quantifier = quantifier;
  302             }
  303 
  304             @Override
  305             public OnnxType type() {
  306                 return type;
  307             }
  308 
  309             @Override
  310             public Quantifier quantifier() {
  311                 return quantifier;
  312             }
  313         }
  314 
  315         public enum OutputParameter implements OnnxParameter {
  316             output(TypeConstraint.T.typeVariable(), Quantifier.REQUIRED),
  317             ;
  318 
  319             final OnnxType type;
  320             final Quantifier quantifier;
  321 
  322             OutputParameter(OnnxType type, Quantifier quantifier) {
  323                 this.type = type;
  324                 this.quantifier = quantifier;
  325             }
  326 
  327             @Override
  328             public OnnxType type() {
  329                 return type;
  330             }
  331 
  332             @Override
  333             public Quantifier quantifier() {
  334                 return quantifier;
  335             }
  336         }
  337 
  338         public static final OnnxSchema SCHEMA = new OnnxSchemaRecord(
  339                 NAME,
  340                 List.of(Attribute.values()),
  341                 List.of(TypeConstraint.values()),
  342                 List.of(InputParameter.values()),
  343                 List.of(OutputParameter.values())
  344         );
  345 
  346         public Acosh(ExternalizedOp def) {
  347             super(SCHEMA, def);
  348         }
  349 
  350         Acosh(Acosh that, CopyContext cc) {
  351             super(that, cc);
  352         }
  353 
  354         @Override
  355         public Acosh transform(CopyContext cc, OpTransformer ot) {
  356             return new Acosh(this, cc);
  357         }
  358 
  359         Acosh(TypeElement resultType, Value input) {
  360             super(SCHEMA, resultType, Set.of(), List.of(input), List.of());
  361         }
  362 
  363         @Override
  364         public SequencedSet<OnnxParameter> onnxOutputs() {
  365             return onnxOutputs(SCHEMA);
  366         }
  367 
  368         @Override
  369         public SequencedMap<OnnxParameter, Object> onnxInputs() {
  370             return onnxInputs(SCHEMA, List.of(input()));
  371         }
  372 
  373         public Value input() {
  374             return operands().get(0);
  375         }
  376 
  377     }
  378 
  379     public static Acosh Acosh(TypeElement resultType, Value input) {
  380         return new Acosh(resultType, input);
  381     }
  382 
  383     @OpFactoryHelper.OpDeclaration(Adagrad.NAME)
  384     public static final class Adagrad extends OnnxOp {
  385         public static final String NAME = "Adagrad";
  386 
  387         public enum Attribute implements OnnxAttribute {
  388             epsilon(Float.class, true, 1.0E-6f),
  389             decay_factor(Float.class, true, 0.0f),
  390             norm_coefficient(Float.class, true, 0.0f),
  391             ;
  392 
  393                 final Class<?> t;
  394                 final boolean optional;
  395                 final Object defaultValue;
  396 
  397                 Attribute(Class<?> type, boolean optional, Object defaultValue) {
  398                     this.t = type;
  399                     this.optional = optional;
  400                     this.defaultValue = defaultValue;
  401                     assert optional || defaultValue == null;
  402                 }
  403 
  404                 public Class<?> type() {
  405                     return t;
  406                 }
  407 
  408                 public boolean isOptional() {
  409                     return optional;
  410                 }
  411 
  412                 public Object defaultValue() {
  413                     return defaultValue;
  414                 }
  415         }
  416 
  417         public enum TypeConstraint implements OnnxTypeConstraint {
  418             T1(new OnnxType.TypeVariable("T1", List.of(OnnxType.tensor(OnnxType.float32()), OnnxType.tensor(OnnxType.float64())))),
  419             T2(new OnnxType.TypeVariable("T2", List.of(OnnxType.tensor(OnnxType.int64())))),
  420             T3(new OnnxType.TypeVariable("T3", List.of(OnnxType.tensor(OnnxType.float32()), OnnxType.tensor(OnnxType.float64())))),
  421             ;
  422 
  423             final OnnxType.TypeVariable typeVariable;
  424 
  425             TypeConstraint(OnnxType.TypeVariable typeVariable) {
  426                 assert typeVariable.name().equals(name());
  427                 this.typeVariable = typeVariable;
  428             }
  429 
  430             @Override
  431             public OnnxType.TypeVariable typeVariable() {
  432                 return typeVariable;
  433             }
  434         }
  435 
  436         public enum InputParameter implements OnnxParameter {
  437             R(TypeConstraint.T1.typeVariable(), Quantifier.REQUIRED),
  438             T(TypeConstraint.T2.typeVariable(), Quantifier.REQUIRED),
  439             inputs(TypeConstraint.T3.typeVariable(), Quantifier.VARIADIC),
  440             ;
  441 
  442             final OnnxType type;
  443             final Quantifier quantifier;
  444 
  445             InputParameter(OnnxType type, Quantifier quantifier) {
  446                 this.type = type;
  447                 this.quantifier = quantifier;
  448             }
  449 
  450             @Override
  451             public OnnxType type() {
  452                 return type;
  453             }
  454 
  455             @Override
  456             public Quantifier quantifier() {
  457                 return quantifier;
  458             }
  459         }
  460 
  461         public enum OutputParameter implements OnnxParameter {
  462             outputs(TypeConstraint.T3.typeVariable(), Quantifier.VARIADIC),
  463             ;
  464 
  465             final OnnxType type;
  466             final Quantifier quantifier;
  467 
  468             OutputParameter(OnnxType type, Quantifier quantifier) {
  469                 this.type = type;
  470                 this.quantifier = quantifier;
  471             }
  472 
  473             @Override
  474             public OnnxType type() {
  475                 return type;
  476             }
  477 
  478             @Override
  479             public Quantifier quantifier() {
  480                 return quantifier;
  481             }
  482         }
  483 
  484         public static final OnnxSchema SCHEMA = new OnnxSchemaRecord(
  485                 NAME,
  486                 List.of(Attribute.values()),
  487                 List.of(TypeConstraint.values()),
  488                 List.of(InputParameter.values()),
  489                 List.of(OutputParameter.values())
  490         );
  491 
  492         public Adagrad(ExternalizedOp def) {
  493             super(SCHEMA, def);
  494         }
  495 
  496         Adagrad(Adagrad that, CopyContext cc) {
  497             super(that, cc);
  498         }
  499 
  500         @Override
  501         public Adagrad transform(CopyContext cc, OpTransformer ot) {
  502             return new Adagrad(this, cc);
  503         }
  504 
  505         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) {
  506             super(SCHEMA, resultType, Set.of(), List.of(R, T, inputs), List.of(epsilon, decay_factor, norm_coefficient));
  507         }
  508 
  509         @Override
  510         public SequencedSet<OnnxParameter> onnxOutputs() {
  511             return onnxOutputs(SCHEMA);
  512         }
  513 
  514         @Override
  515         public SequencedMap<OnnxParameter, Object> onnxInputs() {
  516             return onnxInputs(SCHEMA, List.of(R(), T(), inputs()));
  517         }
  518 
  519         public Value R() {
  520             return operands().get(0);
  521         }
  522 
  523         public Value T() {
  524             return operands().get(1);
  525         }
  526 
  527         public List<Value> inputs() {
  528             return operands().subList(2, operands().size());
  529         }
  530 
  531         public java.util.Optional<Float> epsilon() {
  532             Float epsilon = Attribute.epsilon.access(Float.class, onnxAttributes);
  533             return java.util.Optional.ofNullable(epsilon);
  534         }
  535 
  536         public java.util.Optional<Float> decay_factor() {
  537             Float decay_factor = Attribute.decay_factor.access(Float.class, onnxAttributes);
  538             return java.util.Optional.ofNullable(decay_factor);
  539         }
  540 
  541         public java.util.Optional<Float> norm_coefficient() {
  542             Float norm_coefficient = Attribute.norm_coefficient.access(Float.class, onnxAttributes);
  543             return java.util.Optional.ofNullable(norm_coefficient);
  544         }
  545 
  546     }
  547 
  548     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) {
  549         return new Adagrad(resultType, R, T, inputs, epsilon, decay_factor, norm_coefficient);
  550     }
  551 
  552     @OpFactoryHelper.OpDeclaration(Adam.NAME)
  553     public static final class Adam extends OnnxOp {
  554         public static final String NAME = "Adam";
  555 
  556         public enum Attribute implements OnnxAttribute {
  557             epsilon(Float.class, true, 1.0E-6f),
  558             norm_coefficient_post(Float.class, true, 0.0f),
  559             norm_coefficient(Float.class, true, 0.0f),
  560             alpha(Float.class, true, 0.9f),
  561             beta(Float.class, true, 0.999f),
  562             ;
  563 
  564                 final Class<?> t;
  565                 final boolean optional;
  566                 final Object defaultValue;
  567 
  568                 Attribute(Class<?> type, boolean optional, Object defaultValue) {
  569                     this.t = type;
  570                     this.optional = optional;
  571                     this.defaultValue = defaultValue;
  572                     assert optional || defaultValue == null;
  573                 }
  574 
  575                 public Class<?> type() {
  576                     return t;
  577                 }
  578 
  579                 public boolean isOptional() {
  580                     return optional;
  581                 }
  582 
  583                 public Object defaultValue() {
  584                     return defaultValue;
  585                 }
  586         }
  587 
  588         public enum TypeConstraint implements OnnxTypeConstraint {
  589             T1(new OnnxType.TypeVariable("T1", List.of(OnnxType.tensor(OnnxType.float32()), OnnxType.tensor(OnnxType.float64())))),
  590             T2(new OnnxType.TypeVariable("T2", List.of(OnnxType.tensor(OnnxType.int64())))),
  591             T3(new OnnxType.TypeVariable("T3", List.of(OnnxType.tensor(OnnxType.float32()), OnnxType.tensor(OnnxType.float64())))),
  592             ;
  593 
  594             final OnnxType.TypeVariable typeVariable;
  595 
  596             TypeConstraint(OnnxType.TypeVariable typeVariable) {
  597                 assert typeVariable.name().equals(name());
  598                 this.typeVariable = typeVariable;
  599             }
  600 
  601             @Override
  602             public OnnxType.TypeVariable typeVariable() {
  603                 return typeVariable;
  604             }
  605         }
  606 
  607         public enum InputParameter implements OnnxParameter {
  608             R(TypeConstraint.T1.typeVariable(), Quantifier.REQUIRED),
  609             T(TypeConstraint.T2.typeVariable(), Quantifier.REQUIRED),
  610             inputs(TypeConstraint.T3.typeVariable(), Quantifier.VARIADIC),
  611             ;
  612 
  613             final OnnxType type;
  614             final Quantifier quantifier;
  615 
  616             InputParameter(OnnxType type, Quantifier quantifier) {
  617                 this.type = type;
  618                 this.quantifier = quantifier;
  619             }
  620 
  621             @Override
  622             public OnnxType type() {
  623                 return type;
  624             }
  625 
  626             @Override
  627             public Quantifier quantifier() {
  628                 return quantifier;
  629             }
  630         }
  631 
  632         public enum OutputParameter implements OnnxParameter {
  633             outputs(TypeConstraint.T3.typeVariable(), Quantifier.VARIADIC),
  634             ;
  635 
  636             final OnnxType type;
  637             final Quantifier quantifier;
  638 
  639             OutputParameter(OnnxType type, Quantifier quantifier) {
  640                 this.type = type;
  641                 this.quantifier = quantifier;
  642             }
  643 
  644             @Override
  645             public OnnxType type() {
  646                 return type;
  647             }
  648 
  649             @Override
  650             public Quantifier quantifier() {
  651                 return quantifier;
  652             }
  653         }
  654 
  655         public static final OnnxSchema SCHEMA = new OnnxSchemaRecord(
  656                 NAME,
  657                 List.of(Attribute.values()),
  658                 List.of(TypeConstraint.values()),
  659                 List.of(InputParameter.values()),
  660                 List.of(OutputParameter.values())
  661         );
  662 
  663         public Adam(ExternalizedOp def) {
  664             super(SCHEMA, def);
  665         }
  666 
  667         Adam(Adam that, CopyContext cc) {
  668             super(that, cc);
  669         }
  670 
  671         @Override
  672         public Adam transform(CopyContext cc, OpTransformer ot) {
  673             return new Adam(this, cc);
  674         }
  675 
  676         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) {
  677             super(SCHEMA, resultType, Set.of(), List.of(R, T, inputs), List.of(epsilon, norm_coefficient_post, norm_coefficient, alpha, beta));
  678         }
  679 
  680         @Override
  681         public SequencedSet<OnnxParameter> onnxOutputs() {
  682             return onnxOutputs(SCHEMA);
  683         }
  684 
  685         @Override
  686         public SequencedMap<OnnxParameter, Object> onnxInputs() {
  687             return onnxInputs(SCHEMA, List.of(R(), T(), inputs()));
  688         }
  689 
  690         public Value R() {
  691             return operands().get(0);
  692         }
  693 
  694         public Value T() {
  695             return operands().get(1);
  696         }
  697 
  698         public List<Value> inputs() {
  699             return operands().subList(2, operands().size());
  700         }
  701 
  702         public java.util.Optional<Float> epsilon() {
  703             Float epsilon = Attribute.epsilon.access(Float.class, onnxAttributes);
  704             return java.util.Optional.ofNullable(epsilon);
  705         }
  706 
  707         public java.util.Optional<Float> norm_coefficient_post() {
  708             Float norm_coefficient_post = Attribute.norm_coefficient_post.access(Float.class, onnxAttributes);
  709             return java.util.Optional.ofNullable(norm_coefficient_post);
  710         }
  711 
  712         public java.util.Optional<Float> norm_coefficient() {
  713             Float norm_coefficient = Attribute.norm_coefficient.access(Float.class, onnxAttributes);
  714             return java.util.Optional.ofNullable(norm_coefficient);
  715         }
  716 
  717         public java.util.Optional<Float> alpha() {
  718             Float alpha = Attribute.alpha.access(Float.class, onnxAttributes);
  719             return java.util.Optional.ofNullable(alpha);
  720         }
  721 
  722         public java.util.Optional<Float> beta() {
  723             Float beta = Attribute.beta.access(Float.class, onnxAttributes);
  724             return java.util.Optional.ofNullable(beta);
  725         }
  726 
  727     }
  728 
  729     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) {
  730         return new Adam(resultType, R, T, inputs, epsilon, norm_coefficient_post, norm_coefficient, alpha, beta);
  731     }
  732 
  733     @OpFactoryHelper.OpDeclaration(Add.NAME)
  734     public static final class Add extends OnnxOp {
  735         public static final String NAME = "Add";
  736 
  737         public enum Attribute implements OnnxAttribute.None { }
  738 
  739         public enum TypeConstraint implements OnnxTypeConstraint {
  740             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())))),
  741             ;
  742 
  743             final OnnxType.TypeVariable typeVariable;
  744 
  745             TypeConstraint(OnnxType.TypeVariable typeVariable) {
  746                 assert typeVariable.name().equals(name());
  747                 this.typeVariable = typeVariable;
  748             }
  749 
  750             @Override
  751             public OnnxType.TypeVariable typeVariable() {
  752                 return typeVariable;
  753             }
  754         }
  755 
  756         public enum InputParameter implements OnnxParameter {
  757             A(TypeConstraint.T.typeVariable(), Quantifier.REQUIRED),
  758             B(TypeConstraint.T.typeVariable(), Quantifier.REQUIRED),
  759             ;
  760 
  761             final OnnxType type;
  762             final Quantifier quantifier;
  763 
  764             InputParameter(OnnxType type, Quantifier quantifier) {
  765                 this.type = type;
  766                 this.quantifier = quantifier;
  767             }
  768 
  769             @Override
  770             public OnnxType type() {
  771                 return type;
  772             }
  773 
  774             @Override
  775             public Quantifier quantifier() {
  776                 return quantifier;
  777             }
  778         }
  779 
  780         public enum OutputParameter implements OnnxParameter {
  781             C(TypeConstraint.T.typeVariable(), Quantifier.REQUIRED),
  782             ;
  783 
  784             final OnnxType type;
  785             final Quantifier quantifier;
  786 
  787             OutputParameter(OnnxType type, Quantifier quantifier) {
  788                 this.type = type;
  789                 this.quantifier = quantifier;
  790             }
  791 
  792             @Override
  793             public OnnxType type() {
  794                 return type;
  795             }
  796 
  797             @Override
  798             public Quantifier quantifier() {
  799                 return quantifier;
  800             }
  801         }
  802 
  803         public static final OnnxSchema SCHEMA = new OnnxSchemaRecord(
  804                 NAME,
  805                 List.of(Attribute.values()),
  806                 List.of(TypeConstraint.values()),
  807                 List.of(InputParameter.values()),
  808                 List.of(OutputParameter.values())
  809         );
  810 
  811         public Add(ExternalizedOp def) {
  812             super(SCHEMA, def);
  813         }
  814 
  815         Add(Add that, CopyContext cc) {
  816             super(that, cc);
  817         }
  818 
  819         @Override
  820         public Add transform(CopyContext cc, OpTransformer ot) {
  821             return new Add(this, cc);
  822         }
  823 
  824         Add(TypeElement resultType, Value A, Value B) {
  825             super(SCHEMA, resultType, Set.of(), List.of(A, B), List.of());
  826         }
  827 
  828         @Override
  829         public SequencedSet<OnnxParameter> onnxOutputs() {
  830             return onnxOutputs(SCHEMA);
  831         }
  832 
  833         @Override
  834         public SequencedMap<OnnxParameter, Object> onnxInputs() {
  835             return onnxInputs(SCHEMA, List.of(A(), B()));
  836         }
  837 
  838         public Value A() {
  839             return operands().get(0);
  840         }
  841 
  842         public Value B() {
  843             return operands().get(1);
  844         }
  845 
  846     }
  847 
  848     public static Add Add(TypeElement resultType, Value A, Value B) {
  849         return new Add(resultType, A, B);
  850     }
  851 
  852     @OpFactoryHelper.OpDeclaration(AffineGrid.NAME)
  853     public static final class AffineGrid extends OnnxOp {
  854         public static final String NAME = "AffineGrid";
  855 
  856         public enum Attribute implements OnnxAttribute {
  857             align_corners(Long.class, true, 0),
  858             ;
  859 
  860                 final Class<?> t;
  861                 final boolean optional;
  862                 final Object defaultValue;
  863 
  864                 Attribute(Class<?> type, boolean optional, Object defaultValue) {
  865                     this.t = type;
  866                     this.optional = optional;
  867                     this.defaultValue = defaultValue;
  868                     assert optional || defaultValue == null;
  869                 }
  870 
  871                 public Class<?> type() {
  872                     return t;
  873                 }
  874 
  875                 public boolean isOptional() {
  876                     return optional;
  877                 }
  878 
  879                 public Object defaultValue() {
  880                     return defaultValue;
  881                 }
  882         }
  883 
  884         public enum TypeConstraint implements OnnxTypeConstraint {
  885             T1(new OnnxType.TypeVariable("T1", List.of(OnnxType.tensor(OnnxType.bfloat16()), OnnxType.tensor(OnnxType.float16()), OnnxType.tensor(OnnxType.float32()), OnnxType.tensor(OnnxType.float64())))),
  886             T2(new OnnxType.TypeVariable("T2", List.of(OnnxType.tensor(OnnxType.int64())))),
  887             ;
  888 
  889             final OnnxType.TypeVariable typeVariable;
  890 
  891             TypeConstraint(OnnxType.TypeVariable typeVariable) {
  892                 assert typeVariable.name().equals(name());
  893                 this.typeVariable = typeVariable;
  894             }
  895 
  896             @Override
  897             public OnnxType.TypeVariable typeVariable() {
  898                 return typeVariable;
  899             }
  900         }
  901 
  902         public enum InputParameter implements OnnxParameter {
  903             theta(TypeConstraint.T1.typeVariable(), Quantifier.REQUIRED),
  904             size(TypeConstraint.T2.typeVariable(), Quantifier.REQUIRED),
  905             ;
  906 
  907             final OnnxType type;
  908             final Quantifier quantifier;
  909 
  910             InputParameter(OnnxType type, Quantifier quantifier) {
  911                 this.type = type;
  912                 this.quantifier = quantifier;
  913             }
  914 
  915             @Override
  916             public OnnxType type() {
  917                 return type;
  918             }
  919 
  920             @Override
  921             public Quantifier quantifier() {
  922                 return quantifier;
  923             }
  924         }
  925 
  926         public enum OutputParameter implements OnnxParameter {
  927             grid(TypeConstraint.T1.typeVariable(), Quantifier.REQUIRED),
  928             ;
  929 
  930             final OnnxType type;
  931             final Quantifier quantifier;
  932 
  933             OutputParameter(OnnxType type, Quantifier quantifier) {
  934                 this.type = type;
  935                 this.quantifier = quantifier;
  936             }
  937 
  938             @Override
  939             public OnnxType type() {
  940                 return type;
  941             }
  942 
  943             @Override
  944             public Quantifier quantifier() {
  945                 return quantifier;
  946             }
  947         }
  948 
  949         public static final OnnxSchema SCHEMA = new OnnxSchemaRecord(
  950                 NAME,
  951                 List.of(Attribute.values()),
  952                 List.of(TypeConstraint.values()),
  953                 List.of(InputParameter.values()),
  954                 List.of(OutputParameter.values())
  955         );
  956 
  957         public AffineGrid(ExternalizedOp def) {
  958             super(SCHEMA, def);
  959         }
  960 
  961         AffineGrid(AffineGrid that, CopyContext cc) {
  962             super(that, cc);
  963         }
  964 
  965         @Override
  966         public AffineGrid transform(CopyContext cc, OpTransformer ot) {
  967             return new AffineGrid(this, cc);
  968         }
  969 
  970         AffineGrid(TypeElement resultType, Value theta, Value size, java.util.Optional<Long> align_corners) {
  971             super(SCHEMA, resultType, Set.of(), List.of(theta, size), List.of(align_corners));
  972         }
  973 
  974         @Override
  975         public SequencedSet<OnnxParameter> onnxOutputs() {
  976             return onnxOutputs(SCHEMA);
  977         }
  978 
  979         @Override
  980         public SequencedMap<OnnxParameter, Object> onnxInputs() {
  981             return onnxInputs(SCHEMA, List.of(theta(), size()));
  982         }
  983 
  984         public Value theta() {
  985             return operands().get(0);
  986         }
  987 
  988         public Value size() {
  989             return operands().get(1);
  990         }
  991 
  992         public java.util.Optional<Long> align_corners() {
  993             Long align_corners = Attribute.align_corners.access(Long.class, onnxAttributes);
  994             return java.util.Optional.ofNullable(align_corners);
  995         }
  996 
  997     }
  998 
  999     public static AffineGrid AffineGrid(TypeElement resultType, Value theta, Value size, java.util.Optional<Long> align_corners) {
 1000         return new AffineGrid(resultType, theta, size, align_corners);
 1001     }
 1002 
 1003     @OpFactoryHelper.OpDeclaration(And.NAME)
 1004     public static final class And extends OnnxOp {
 1005         public static final String NAME = "And";
 1006 
 1007         public enum Attribute implements OnnxAttribute.None { }
 1008 
 1009         public enum TypeConstraint implements OnnxTypeConstraint {
 1010             T(new OnnxType.TypeVariable("T", List.of(OnnxType.tensor(OnnxType.bool())))),
 1011             T1(new OnnxType.TypeVariable("T1", List.of(OnnxType.tensor(OnnxType.bool())))),
 1012             ;
 1013 
 1014             final OnnxType.TypeVariable typeVariable;
 1015 
 1016             TypeConstraint(OnnxType.TypeVariable typeVariable) {
 1017                 assert typeVariable.name().equals(name());
 1018                 this.typeVariable = typeVariable;
 1019             }
 1020 
 1021             @Override
 1022             public OnnxType.TypeVariable typeVariable() {
 1023                 return typeVariable;
 1024             }
 1025         }
 1026 
 1027         public enum InputParameter implements OnnxParameter {
 1028             A(TypeConstraint.T.typeVariable(), Quantifier.REQUIRED),
 1029             B(TypeConstraint.T.typeVariable(), Quantifier.REQUIRED),
 1030             ;
 1031 
 1032             final OnnxType type;
 1033             final Quantifier quantifier;
 1034 
 1035             InputParameter(OnnxType type, Quantifier quantifier) {
 1036                 this.type = type;
 1037                 this.quantifier = quantifier;
 1038             }
 1039 
 1040             @Override
 1041             public OnnxType type() {
 1042                 return type;
 1043             }
 1044 
 1045             @Override
 1046             public Quantifier quantifier() {
 1047                 return quantifier;
 1048             }
 1049         }
 1050 
 1051         public enum OutputParameter implements OnnxParameter {
 1052             C(TypeConstraint.T1.typeVariable(), Quantifier.REQUIRED),
 1053             ;
 1054 
 1055             final OnnxType type;
 1056             final Quantifier quantifier;
 1057 
 1058             OutputParameter(OnnxType type, Quantifier quantifier) {
 1059                 this.type = type;
 1060                 this.quantifier = quantifier;
 1061             }
 1062 
 1063             @Override
 1064             public OnnxType type() {
 1065                 return type;
 1066             }
 1067 
 1068             @Override
 1069             public Quantifier quantifier() {
 1070                 return quantifier;
 1071             }
 1072         }
 1073 
 1074         public static final OnnxSchema SCHEMA = new OnnxSchemaRecord(
 1075                 NAME,
 1076                 List.of(Attribute.values()),
 1077                 List.of(TypeConstraint.values()),
 1078                 List.of(InputParameter.values()),
 1079                 List.of(OutputParameter.values())
 1080         );
 1081 
 1082         public And(ExternalizedOp def) {
 1083             super(SCHEMA, def);
 1084         }
 1085 
 1086         And(And that, CopyContext cc) {
 1087             super(that, cc);
 1088         }
 1089 
 1090         @Override
 1091         public And transform(CopyContext cc, OpTransformer ot) {
 1092             return new And(this, cc);
 1093         }
 1094 
 1095         And(TypeElement resultType, Value A, Value B) {
 1096             super(SCHEMA, resultType, Set.of(), List.of(A, B), List.of());
 1097         }
 1098 
 1099         @Override
 1100         public SequencedSet<OnnxParameter> onnxOutputs() {
 1101             return onnxOutputs(SCHEMA);
 1102         }
 1103 
 1104         @Override
 1105         public SequencedMap<OnnxParameter, Object> onnxInputs() {
 1106             return onnxInputs(SCHEMA, List.of(A(), B()));
 1107         }
 1108 
 1109         public Value A() {
 1110             return operands().get(0);
 1111         }
 1112 
 1113         public Value B() {
 1114             return operands().get(1);
 1115         }
 1116 
 1117     }
 1118 
 1119     public static And And(TypeElement resultType, Value A, Value B) {
 1120         return new And(resultType, A, B);
 1121     }
 1122 
 1123     @OpFactoryHelper.OpDeclaration(ArgMax.NAME)
 1124     public static final class ArgMax extends OnnxOp {
 1125         public static final String NAME = "ArgMax";
 1126 
 1127         public enum Attribute implements OnnxAttribute {
 1128             keepdims(Long.class, true, 1),
 1129             select_last_index(Long.class, true, 0),
 1130             axis(Long.class, true, 0),
 1131             ;
 1132 
 1133                 final Class<?> t;
 1134                 final boolean optional;
 1135                 final Object defaultValue;
 1136 
 1137                 Attribute(Class<?> type, boolean optional, Object defaultValue) {
 1138                     this.t = type;
 1139                     this.optional = optional;
 1140                     this.defaultValue = defaultValue;
 1141                     assert optional || defaultValue == null;
 1142                 }
 1143 
 1144                 public Class<?> type() {
 1145                     return t;
 1146                 }
 1147 
 1148                 public boolean isOptional() {
 1149                     return optional;
 1150                 }
 1151 
 1152                 public Object defaultValue() {
 1153                     return defaultValue;
 1154                 }
 1155         }
 1156 
 1157         public enum TypeConstraint implements OnnxTypeConstraint {
 1158             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())))),
 1159             ;
 1160 
 1161             final OnnxType.TypeVariable typeVariable;
 1162 
 1163             TypeConstraint(OnnxType.TypeVariable typeVariable) {
 1164                 assert typeVariable.name().equals(name());
 1165                 this.typeVariable = typeVariable;
 1166             }
 1167 
 1168             @Override
 1169             public OnnxType.TypeVariable typeVariable() {
 1170                 return typeVariable;
 1171             }
 1172         }
 1173 
 1174         public enum InputParameter implements OnnxParameter {
 1175             data(TypeConstraint.T.typeVariable(), Quantifier.REQUIRED),
 1176             ;
 1177 
 1178             final OnnxType type;
 1179             final Quantifier quantifier;
 1180 
 1181             InputParameter(OnnxType type, Quantifier quantifier) {
 1182                 this.type = type;
 1183                 this.quantifier = quantifier;
 1184             }
 1185 
 1186             @Override
 1187             public OnnxType type() {
 1188                 return type;
 1189             }
 1190 
 1191             @Override
 1192             public Quantifier quantifier() {
 1193                 return quantifier;
 1194             }
 1195         }
 1196 
 1197         public enum OutputParameter implements OnnxParameter {
 1198             reduced(OnnxType.tensor(OnnxType.int64()), Quantifier.REQUIRED),
 1199             ;
 1200 
 1201             final OnnxType type;
 1202             final Quantifier quantifier;
 1203 
 1204             OutputParameter(OnnxType type, Quantifier quantifier) {
 1205                 this.type = type;
 1206                 this.quantifier = quantifier;
 1207             }
 1208 
 1209             @Override
 1210             public OnnxType type() {
 1211                 return type;
 1212             }
 1213 
 1214             @Override
 1215             public Quantifier quantifier() {
 1216                 return quantifier;
 1217             }
 1218         }
 1219 
 1220         public static final OnnxSchema SCHEMA = new OnnxSchemaRecord(
 1221                 NAME,
 1222                 List.of(Attribute.values()),
 1223                 List.of(TypeConstraint.values()),
 1224                 List.of(InputParameter.values()),
 1225                 List.of(OutputParameter.values())
 1226         );
 1227 
 1228         public ArgMax(ExternalizedOp def) {
 1229             super(SCHEMA, def);
 1230         }
 1231 
 1232         ArgMax(ArgMax that, CopyContext cc) {
 1233             super(that, cc);
 1234         }
 1235 
 1236         @Override
 1237         public ArgMax transform(CopyContext cc, OpTransformer ot) {
 1238             return new ArgMax(this, cc);
 1239         }
 1240 
 1241         ArgMax(TypeElement resultType, Value data, java.util.Optional<Long> keepdims, java.util.Optional<Long> select_last_index, java.util.Optional<Long> axis) {
 1242             super(SCHEMA, resultType, Set.of(), List.of(data), List.of(keepdims, select_last_index, axis));
 1243         }
 1244 
 1245         @Override
 1246         public SequencedSet<OnnxParameter> onnxOutputs() {
 1247             return onnxOutputs(SCHEMA);
 1248         }
 1249 
 1250         @Override
 1251         public SequencedMap<OnnxParameter, Object> onnxInputs() {
 1252             return onnxInputs(SCHEMA, List.of(data()));
 1253         }
 1254 
 1255         public Value data() {
 1256             return operands().get(0);
 1257         }
 1258 
 1259         public java.util.Optional<Long> keepdims() {
 1260             Long keepdims = Attribute.keepdims.access(Long.class, onnxAttributes);
 1261             return java.util.Optional.ofNullable(keepdims);
 1262         }
 1263 
 1264         public java.util.Optional<Long> select_last_index() {
 1265             Long select_last_index = Attribute.select_last_index.access(Long.class, onnxAttributes);
 1266             return java.util.Optional.ofNullable(select_last_index);
 1267         }
 1268 
 1269         public java.util.Optional<Long> axis() {
 1270             Long axis = Attribute.axis.access(Long.class, onnxAttributes);
 1271             return java.util.Optional.ofNullable(axis);
 1272         }
 1273 
 1274     }
 1275 
 1276     public static ArgMax ArgMax(TypeElement resultType, Value data, java.util.Optional<Long> keepdims, java.util.Optional<Long> select_last_index, java.util.Optional<Long> axis) {
 1277         return new ArgMax(resultType, data, keepdims, select_last_index, axis);
 1278     }
 1279 
 1280     @OpFactoryHelper.OpDeclaration(ArgMin.NAME)
 1281     public static final class ArgMin extends OnnxOp {
 1282         public static final String NAME = "ArgMin";
 1283 
 1284         public enum Attribute implements OnnxAttribute {
 1285             keepdims(Long.class, true, 1),
 1286             select_last_index(Long.class, true, 0),
 1287             axis(Long.class, true, 0),
 1288             ;
 1289 
 1290                 final Class<?> t;
 1291                 final boolean optional;
 1292                 final Object defaultValue;
 1293 
 1294                 Attribute(Class<?> type, boolean optional, Object defaultValue) {
 1295                     this.t = type;
 1296                     this.optional = optional;
 1297                     this.defaultValue = defaultValue;
 1298                     assert optional || defaultValue == null;
 1299                 }
 1300 
 1301                 public Class<?> type() {
 1302                     return t;
 1303                 }
 1304 
 1305                 public boolean isOptional() {
 1306                     return optional;
 1307                 }
 1308 
 1309                 public Object defaultValue() {
 1310                     return defaultValue;
 1311                 }
 1312         }
 1313 
 1314         public enum TypeConstraint implements OnnxTypeConstraint {
 1315             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())))),
 1316             ;
 1317 
 1318             final OnnxType.TypeVariable typeVariable;
 1319 
 1320             TypeConstraint(OnnxType.TypeVariable typeVariable) {
 1321                 assert typeVariable.name().equals(name());
 1322                 this.typeVariable = typeVariable;
 1323             }
 1324 
 1325             @Override
 1326             public OnnxType.TypeVariable typeVariable() {
 1327                 return typeVariable;
 1328             }
 1329         }
 1330 
 1331         public enum InputParameter implements OnnxParameter {
 1332             data(TypeConstraint.T.typeVariable(), Quantifier.REQUIRED),
 1333             ;
 1334 
 1335             final OnnxType type;
 1336             final Quantifier quantifier;
 1337 
 1338             InputParameter(OnnxType type, Quantifier quantifier) {
 1339                 this.type = type;
 1340                 this.quantifier = quantifier;
 1341             }
 1342 
 1343             @Override
 1344             public OnnxType type() {
 1345                 return type;
 1346             }
 1347 
 1348             @Override
 1349             public Quantifier quantifier() {
 1350                 return quantifier;
 1351             }
 1352         }
 1353 
 1354         public enum OutputParameter implements OnnxParameter {
 1355             reduced(OnnxType.tensor(OnnxType.int64()), Quantifier.REQUIRED),
 1356             ;
 1357 
 1358             final OnnxType type;
 1359             final Quantifier quantifier;
 1360 
 1361             OutputParameter(OnnxType type, Quantifier quantifier) {
 1362                 this.type = type;
 1363                 this.quantifier = quantifier;
 1364             }
 1365 
 1366             @Override
 1367             public OnnxType type() {
 1368                 return type;
 1369             }
 1370 
 1371             @Override
 1372             public Quantifier quantifier() {
 1373                 return quantifier;
 1374             }
 1375         }
 1376 
 1377         public static final OnnxSchema SCHEMA = new OnnxSchemaRecord(
 1378                 NAME,
 1379                 List.of(Attribute.values()),
 1380                 List.of(TypeConstraint.values()),
 1381                 List.of(InputParameter.values()),
 1382                 List.of(OutputParameter.values())
 1383         );
 1384 
 1385         public ArgMin(ExternalizedOp def) {
 1386             super(SCHEMA, def);
 1387         }
 1388 
 1389         ArgMin(ArgMin that, CopyContext cc) {
 1390             super(that, cc);
 1391         }
 1392 
 1393         @Override
 1394         public ArgMin transform(CopyContext cc, OpTransformer ot) {
 1395             return new ArgMin(this, cc);
 1396         }
 1397 
 1398         ArgMin(TypeElement resultType, Value data, java.util.Optional<Long> keepdims, java.util.Optional<Long> select_last_index, java.util.Optional<Long> axis) {
 1399             super(SCHEMA, resultType, Set.of(), List.of(data), List.of(keepdims, select_last_index, axis));
 1400         }
 1401 
 1402         @Override
 1403         public SequencedSet<OnnxParameter> onnxOutputs() {
 1404             return onnxOutputs(SCHEMA);
 1405         }
 1406 
 1407         @Override
 1408         public SequencedMap<OnnxParameter, Object> onnxInputs() {
 1409             return onnxInputs(SCHEMA, List.of(data()));
 1410         }
 1411 
 1412         public Value data() {
 1413             return operands().get(0);
 1414         }
 1415 
 1416         public java.util.Optional<Long> keepdims() {
 1417             Long keepdims = Attribute.keepdims.access(Long.class, onnxAttributes);
 1418             return java.util.Optional.ofNullable(keepdims);
 1419         }
 1420 
 1421         public java.util.Optional<Long> select_last_index() {
 1422             Long select_last_index = Attribute.select_last_index.access(Long.class, onnxAttributes);
 1423             return java.util.Optional.ofNullable(select_last_index);
 1424         }
 1425 
 1426         public java.util.Optional<Long> axis() {
 1427             Long axis = Attribute.axis.access(Long.class, onnxAttributes);
 1428             return java.util.Optional.ofNullable(axis);
 1429         }
 1430 
 1431     }
 1432 
 1433     public static ArgMin ArgMin(TypeElement resultType, Value data, java.util.Optional<Long> keepdims, java.util.Optional<Long> select_last_index, java.util.Optional<Long> axis) {
 1434         return new ArgMin(resultType, data, keepdims, select_last_index, axis);
 1435     }
 1436 
 1437     @OpFactoryHelper.OpDeclaration(ArrayFeatureExtractor.NAME)
 1438     public static final class ArrayFeatureExtractor extends OnnxOp {
 1439         public static final String NAME = "ArrayFeatureExtractor";
 1440 
 1441         public enum Attribute implements OnnxAttribute.None { }
 1442 
 1443         public enum TypeConstraint implements OnnxTypeConstraint {
 1444             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())))),
 1445             ;
 1446 
 1447             final OnnxType.TypeVariable typeVariable;
 1448 
 1449             TypeConstraint(OnnxType.TypeVariable typeVariable) {
 1450                 assert typeVariable.name().equals(name());
 1451                 this.typeVariable = typeVariable;
 1452             }
 1453 
 1454             @Override
 1455             public OnnxType.TypeVariable typeVariable() {
 1456                 return typeVariable;
 1457             }
 1458         }
 1459 
 1460         public enum InputParameter implements OnnxParameter {
 1461             X(TypeConstraint.T.typeVariable(), Quantifier.REQUIRED),
 1462             Y(OnnxType.tensor(OnnxType.int64()), Quantifier.REQUIRED),
 1463             ;
 1464 
 1465             final OnnxType type;
 1466             final Quantifier quantifier;
 1467 
 1468             InputParameter(OnnxType type, Quantifier quantifier) {
 1469                 this.type = type;
 1470                 this.quantifier = quantifier;
 1471             }
 1472 
 1473             @Override
 1474             public OnnxType type() {
 1475                 return type;
 1476             }
 1477 
 1478             @Override
 1479             public Quantifier quantifier() {
 1480                 return quantifier;
 1481             }
 1482         }
 1483 
 1484         public enum OutputParameter implements OnnxParameter {
 1485             Z(TypeConstraint.T.typeVariable(), Quantifier.REQUIRED),
 1486             ;
 1487 
 1488             final OnnxType type;
 1489             final Quantifier quantifier;
 1490 
 1491             OutputParameter(OnnxType type, Quantifier quantifier) {
 1492                 this.type = type;
 1493                 this.quantifier = quantifier;
 1494             }
 1495 
 1496             @Override
 1497             public OnnxType type() {
 1498                 return type;
 1499             }
 1500 
 1501             @Override
 1502             public Quantifier quantifier() {
 1503                 return quantifier;
 1504             }
 1505         }
 1506 
 1507         public static final OnnxSchema SCHEMA = new OnnxSchemaRecord(
 1508                 NAME,
 1509                 List.of(Attribute.values()),
 1510                 List.of(TypeConstraint.values()),
 1511                 List.of(InputParameter.values()),
 1512                 List.of(OutputParameter.values())
 1513         );
 1514 
 1515         public ArrayFeatureExtractor(ExternalizedOp def) {
 1516             super(SCHEMA, def);
 1517         }
 1518 
 1519         ArrayFeatureExtractor(ArrayFeatureExtractor that, CopyContext cc) {
 1520             super(that, cc);
 1521         }
 1522 
 1523         @Override
 1524         public ArrayFeatureExtractor transform(CopyContext cc, OpTransformer ot) {
 1525             return new ArrayFeatureExtractor(this, cc);
 1526         }
 1527 
 1528         ArrayFeatureExtractor(TypeElement resultType, Value X, Value Y) {
 1529             super(SCHEMA, resultType, Set.of(), List.of(X, Y), List.of());
 1530         }
 1531 
 1532         @Override
 1533         public SequencedSet<OnnxParameter> onnxOutputs() {
 1534             return onnxOutputs(SCHEMA);
 1535         }
 1536 
 1537         @Override
 1538         public SequencedMap<OnnxParameter, Object> onnxInputs() {
 1539             return onnxInputs(SCHEMA, List.of(X(), Y()));
 1540         }
 1541 
 1542         public Value X() {
 1543             return operands().get(0);
 1544         }
 1545 
 1546         public Value Y() {
 1547             return operands().get(1);
 1548         }
 1549 
 1550     }
 1551 
 1552     public static ArrayFeatureExtractor ArrayFeatureExtractor(TypeElement resultType, Value X, Value Y) {
 1553         return new ArrayFeatureExtractor(resultType, X, Y);
 1554     }
 1555 
 1556     @OpFactoryHelper.OpDeclaration(Asin.NAME)
 1557     public static final class Asin extends OnnxOp {
 1558         public static final String NAME = "Asin";
 1559 
 1560         public enum Attribute implements OnnxAttribute.None { }
 1561 
 1562         public enum TypeConstraint implements OnnxTypeConstraint {
 1563             T(new OnnxType.TypeVariable("T", List.of(OnnxType.tensor(OnnxType.bfloat16()), OnnxType.tensor(OnnxType.float16()), OnnxType.tensor(OnnxType.float32()), OnnxType.tensor(OnnxType.float64())))),
 1564             ;
 1565 
 1566             final OnnxType.TypeVariable typeVariable;
 1567 
 1568             TypeConstraint(OnnxType.TypeVariable typeVariable) {
 1569                 assert typeVariable.name().equals(name());
 1570                 this.typeVariable = typeVariable;
 1571             }
 1572 
 1573             @Override
 1574             public OnnxType.TypeVariable typeVariable() {
 1575                 return typeVariable;
 1576             }
 1577         }
 1578 
 1579         public enum InputParameter implements OnnxParameter {
 1580             input(TypeConstraint.T.typeVariable(), Quantifier.REQUIRED),
 1581             ;
 1582 
 1583             final OnnxType type;
 1584             final Quantifier quantifier;
 1585 
 1586             InputParameter(OnnxType type, Quantifier quantifier) {
 1587                 this.type = type;
 1588                 this.quantifier = quantifier;
 1589             }
 1590 
 1591             @Override
 1592             public OnnxType type() {
 1593                 return type;
 1594             }
 1595 
 1596             @Override
 1597             public Quantifier quantifier() {
 1598                 return quantifier;
 1599             }
 1600         }
 1601 
 1602         public enum OutputParameter implements OnnxParameter {
 1603             output(TypeConstraint.T.typeVariable(), Quantifier.REQUIRED),
 1604             ;
 1605 
 1606             final OnnxType type;
 1607             final Quantifier quantifier;
 1608 
 1609             OutputParameter(OnnxType type, Quantifier quantifier) {
 1610                 this.type = type;
 1611                 this.quantifier = quantifier;
 1612             }
 1613 
 1614             @Override
 1615             public OnnxType type() {
 1616                 return type;
 1617             }
 1618 
 1619             @Override
 1620             public Quantifier quantifier() {
 1621                 return quantifier;
 1622             }
 1623         }
 1624 
 1625         public static final OnnxSchema SCHEMA = new OnnxSchemaRecord(
 1626                 NAME,
 1627                 List.of(Attribute.values()),
 1628                 List.of(TypeConstraint.values()),
 1629                 List.of(InputParameter.values()),
 1630                 List.of(OutputParameter.values())
 1631         );
 1632 
 1633         public Asin(ExternalizedOp def) {
 1634             super(SCHEMA, def);
 1635         }
 1636 
 1637         Asin(Asin that, CopyContext cc) {
 1638             super(that, cc);
 1639         }
 1640 
 1641         @Override
 1642         public Asin transform(CopyContext cc, OpTransformer ot) {
 1643             return new Asin(this, cc);
 1644         }
 1645 
 1646         Asin(TypeElement resultType, Value input) {
 1647             super(SCHEMA, resultType, Set.of(), List.of(input), List.of());
 1648         }
 1649 
 1650         @Override
 1651         public SequencedSet<OnnxParameter> onnxOutputs() {
 1652             return onnxOutputs(SCHEMA);
 1653         }
 1654 
 1655         @Override
 1656         public SequencedMap<OnnxParameter, Object> onnxInputs() {
 1657             return onnxInputs(SCHEMA, List.of(input()));
 1658         }
 1659 
 1660         public Value input() {
 1661             return operands().get(0);
 1662         }
 1663 
 1664     }
 1665 
 1666     public static Asin Asin(TypeElement resultType, Value input) {
 1667         return new Asin(resultType, input);
 1668     }
 1669 
 1670     @OpFactoryHelper.OpDeclaration(Asinh.NAME)
 1671     public static final class Asinh extends OnnxOp {
 1672         public static final String NAME = "Asinh";
 1673 
 1674         public enum Attribute implements OnnxAttribute.None { }
 1675 
 1676         public enum TypeConstraint implements OnnxTypeConstraint {
 1677             T(new OnnxType.TypeVariable("T", List.of(OnnxType.tensor(OnnxType.bfloat16()), OnnxType.tensor(OnnxType.float16()), OnnxType.tensor(OnnxType.float32()), OnnxType.tensor(OnnxType.float64())))),
 1678             ;
 1679 
 1680             final OnnxType.TypeVariable typeVariable;
 1681 
 1682             TypeConstraint(OnnxType.TypeVariable typeVariable) {
 1683                 assert typeVariable.name().equals(name());
 1684                 this.typeVariable = typeVariable;
 1685             }
 1686 
 1687             @Override
 1688             public OnnxType.TypeVariable typeVariable() {
 1689                 return typeVariable;
 1690             }
 1691         }
 1692 
 1693         public enum InputParameter implements OnnxParameter {
 1694             input(TypeConstraint.T.typeVariable(), Quantifier.REQUIRED),
 1695             ;
 1696 
 1697             final OnnxType type;
 1698             final Quantifier quantifier;
 1699 
 1700             InputParameter(OnnxType type, Quantifier quantifier) {
 1701                 this.type = type;
 1702                 this.quantifier = quantifier;
 1703             }
 1704 
 1705             @Override
 1706             public OnnxType type() {
 1707                 return type;
 1708             }
 1709 
 1710             @Override
 1711             public Quantifier quantifier() {
 1712                 return quantifier;
 1713             }
 1714         }
 1715 
 1716         public enum OutputParameter implements OnnxParameter {
 1717             output(TypeConstraint.T.typeVariable(), Quantifier.REQUIRED),
 1718             ;
 1719 
 1720             final OnnxType type;
 1721             final Quantifier quantifier;
 1722 
 1723             OutputParameter(OnnxType type, Quantifier quantifier) {
 1724                 this.type = type;
 1725                 this.quantifier = quantifier;
 1726             }
 1727 
 1728             @Override
 1729             public OnnxType type() {
 1730                 return type;
 1731             }
 1732 
 1733             @Override
 1734             public Quantifier quantifier() {
 1735                 return quantifier;
 1736             }
 1737         }
 1738 
 1739         public static final OnnxSchema SCHEMA = new OnnxSchemaRecord(
 1740                 NAME,
 1741                 List.of(Attribute.values()),
 1742                 List.of(TypeConstraint.values()),
 1743                 List.of(InputParameter.values()),
 1744                 List.of(OutputParameter.values())
 1745         );
 1746 
 1747         public Asinh(ExternalizedOp def) {
 1748             super(SCHEMA, def);
 1749         }
 1750 
 1751         Asinh(Asinh that, CopyContext cc) {
 1752             super(that, cc);
 1753         }
 1754 
 1755         @Override
 1756         public Asinh transform(CopyContext cc, OpTransformer ot) {
 1757             return new Asinh(this, cc);
 1758         }
 1759 
 1760         Asinh(TypeElement resultType, Value input) {
 1761             super(SCHEMA, resultType, Set.of(), List.of(input), List.of());
 1762         }
 1763 
 1764         @Override
 1765         public SequencedSet<OnnxParameter> onnxOutputs() {
 1766             return onnxOutputs(SCHEMA);
 1767         }
 1768 
 1769         @Override
 1770         public SequencedMap<OnnxParameter, Object> onnxInputs() {
 1771             return onnxInputs(SCHEMA, List.of(input()));
 1772         }
 1773 
 1774         public Value input() {
 1775             return operands().get(0);
 1776         }
 1777 
 1778     }
 1779 
 1780     public static Asinh Asinh(TypeElement resultType, Value input) {
 1781         return new Asinh(resultType, input);
 1782     }
 1783 
 1784     @OpFactoryHelper.OpDeclaration(Atan.NAME)
 1785     public static final class Atan extends OnnxOp {
 1786         public static final String NAME = "Atan";
 1787 
 1788         public enum Attribute implements OnnxAttribute.None { }
 1789 
 1790         public enum TypeConstraint implements OnnxTypeConstraint {
 1791             T(new OnnxType.TypeVariable("T", List.of(OnnxType.tensor(OnnxType.bfloat16()), OnnxType.tensor(OnnxType.float16()), OnnxType.tensor(OnnxType.float32()), OnnxType.tensor(OnnxType.float64())))),
 1792             ;
 1793 
 1794             final OnnxType.TypeVariable typeVariable;
 1795 
 1796             TypeConstraint(OnnxType.TypeVariable typeVariable) {
 1797                 assert typeVariable.name().equals(name());
 1798                 this.typeVariable = typeVariable;
 1799             }
 1800 
 1801             @Override
 1802             public OnnxType.TypeVariable typeVariable() {
 1803                 return typeVariable;
 1804             }
 1805         }
 1806 
 1807         public enum InputParameter implements OnnxParameter {
 1808             input(TypeConstraint.T.typeVariable(), Quantifier.REQUIRED),
 1809             ;
 1810 
 1811             final OnnxType type;
 1812             final Quantifier quantifier;
 1813 
 1814             InputParameter(OnnxType type, Quantifier quantifier) {
 1815                 this.type = type;
 1816                 this.quantifier = quantifier;
 1817             }
 1818 
 1819             @Override
 1820             public OnnxType type() {
 1821                 return type;
 1822             }
 1823 
 1824             @Override
 1825             public Quantifier quantifier() {
 1826                 return quantifier;
 1827             }
 1828         }
 1829 
 1830         public enum OutputParameter implements OnnxParameter {
 1831             output(TypeConstraint.T.typeVariable(), Quantifier.REQUIRED),
 1832             ;
 1833 
 1834             final OnnxType type;
 1835             final Quantifier quantifier;
 1836 
 1837             OutputParameter(OnnxType type, Quantifier quantifier) {
 1838                 this.type = type;
 1839                 this.quantifier = quantifier;
 1840             }
 1841 
 1842             @Override
 1843             public OnnxType type() {
 1844                 return type;
 1845             }
 1846 
 1847             @Override
 1848             public Quantifier quantifier() {
 1849                 return quantifier;
 1850             }
 1851         }
 1852 
 1853         public static final OnnxSchema SCHEMA = new OnnxSchemaRecord(
 1854                 NAME,
 1855                 List.of(Attribute.values()),
 1856                 List.of(TypeConstraint.values()),
 1857                 List.of(InputParameter.values()),
 1858                 List.of(OutputParameter.values())
 1859         );
 1860 
 1861         public Atan(ExternalizedOp def) {
 1862             super(SCHEMA, def);
 1863         }
 1864 
 1865         Atan(Atan that, CopyContext cc) {
 1866             super(that, cc);
 1867         }
 1868 
 1869         @Override
 1870         public Atan transform(CopyContext cc, OpTransformer ot) {
 1871             return new Atan(this, cc);
 1872         }
 1873 
 1874         Atan(TypeElement resultType, Value input) {
 1875             super(SCHEMA, resultType, Set.of(), List.of(input), List.of());
 1876         }
 1877 
 1878         @Override
 1879         public SequencedSet<OnnxParameter> onnxOutputs() {
 1880             return onnxOutputs(SCHEMA);
 1881         }
 1882 
 1883         @Override
 1884         public SequencedMap<OnnxParameter, Object> onnxInputs() {
 1885             return onnxInputs(SCHEMA, List.of(input()));
 1886         }
 1887 
 1888         public Value input() {
 1889             return operands().get(0);
 1890         }
 1891 
 1892     }
 1893 
 1894     public static Atan Atan(TypeElement resultType, Value input) {
 1895         return new Atan(resultType, input);
 1896     }
 1897 
 1898     @OpFactoryHelper.OpDeclaration(Atanh.NAME)
 1899     public static final class Atanh extends OnnxOp {
 1900         public static final String NAME = "Atanh";
 1901 
 1902         public enum Attribute implements OnnxAttribute.None { }
 1903 
 1904         public enum TypeConstraint implements OnnxTypeConstraint {
 1905             T(new OnnxType.TypeVariable("T", List.of(OnnxType.tensor(OnnxType.bfloat16()), OnnxType.tensor(OnnxType.float16()), OnnxType.tensor(OnnxType.float32()), OnnxType.tensor(OnnxType.float64())))),
 1906             ;
 1907 
 1908             final OnnxType.TypeVariable typeVariable;
 1909 
 1910             TypeConstraint(OnnxType.TypeVariable typeVariable) {
 1911                 assert typeVariable.name().equals(name());
 1912                 this.typeVariable = typeVariable;
 1913             }
 1914 
 1915             @Override
 1916             public OnnxType.TypeVariable typeVariable() {
 1917                 return typeVariable;
 1918             }
 1919         }
 1920 
 1921         public enum InputParameter implements OnnxParameter {
 1922             input(TypeConstraint.T.typeVariable(), Quantifier.REQUIRED),
 1923             ;
 1924 
 1925             final OnnxType type;
 1926             final Quantifier quantifier;
 1927 
 1928             InputParameter(OnnxType type, Quantifier quantifier) {
 1929                 this.type = type;
 1930                 this.quantifier = quantifier;
 1931             }
 1932 
 1933             @Override
 1934             public OnnxType type() {
 1935                 return type;
 1936             }
 1937 
 1938             @Override
 1939             public Quantifier quantifier() {
 1940                 return quantifier;
 1941             }
 1942         }
 1943 
 1944         public enum OutputParameter implements OnnxParameter {
 1945             output(TypeConstraint.T.typeVariable(), Quantifier.REQUIRED),
 1946             ;
 1947 
 1948             final OnnxType type;
 1949             final Quantifier quantifier;
 1950 
 1951             OutputParameter(OnnxType type, Quantifier quantifier) {
 1952                 this.type = type;
 1953                 this.quantifier = quantifier;
 1954             }
 1955 
 1956             @Override
 1957             public OnnxType type() {
 1958                 return type;
 1959             }
 1960 
 1961             @Override
 1962             public Quantifier quantifier() {
 1963                 return quantifier;
 1964             }
 1965         }
 1966 
 1967         public static final OnnxSchema SCHEMA = new OnnxSchemaRecord(
 1968                 NAME,
 1969                 List.of(Attribute.values()),
 1970                 List.of(TypeConstraint.values()),
 1971                 List.of(InputParameter.values()),
 1972                 List.of(OutputParameter.values())
 1973         );
 1974 
 1975         public Atanh(ExternalizedOp def) {
 1976             super(SCHEMA, def);
 1977         }
 1978 
 1979         Atanh(Atanh that, CopyContext cc) {
 1980             super(that, cc);
 1981         }
 1982 
 1983         @Override
 1984         public Atanh transform(CopyContext cc, OpTransformer ot) {
 1985             return new Atanh(this, cc);
 1986         }
 1987 
 1988         Atanh(TypeElement resultType, Value input) {
 1989             super(SCHEMA, resultType, Set.of(), List.of(input), List.of());
 1990         }
 1991 
 1992         @Override
 1993         public SequencedSet<OnnxParameter> onnxOutputs() {
 1994             return onnxOutputs(SCHEMA);
 1995         }
 1996 
 1997         @Override
 1998         public SequencedMap<OnnxParameter, Object> onnxInputs() {
 1999             return onnxInputs(SCHEMA, List.of(input()));
 2000         }
 2001 
 2002         public Value input() {
 2003             return operands().get(0);
 2004         }
 2005 
 2006     }
 2007 
 2008     public static Atanh Atanh(TypeElement resultType, Value input) {
 2009         return new Atanh(resultType, input);
 2010     }
 2011 
 2012     @OpFactoryHelper.OpDeclaration(AveragePool.NAME)
 2013     public static final class AveragePool extends OnnxOp {
 2014         public static final String NAME = "AveragePool";
 2015 
 2016         public enum Attribute implements OnnxAttribute {
 2017             pads(long[].class, true, null),
 2018             dilations(long[].class, true, null),
 2019             auto_pad(String.class, true, "NOTSET"),
 2020             count_include_pad(Long.class, true, 0),
 2021             ceil_mode(Long.class, true, 0),
 2022             strides(long[].class, true, null),
 2023             kernel_shape(long[].class, false, null),
 2024             ;
 2025 
 2026                 final Class<?> t;
 2027                 final boolean optional;
 2028                 final Object defaultValue;
 2029 
 2030                 Attribute(Class<?> type, boolean optional, Object defaultValue) {
 2031                     this.t = type;
 2032                     this.optional = optional;
 2033                     this.defaultValue = defaultValue;
 2034                     assert optional || defaultValue == null;
 2035                 }
 2036 
 2037                 public Class<?> type() {
 2038                     return t;
 2039                 }
 2040 
 2041                 public boolean isOptional() {
 2042                     return optional;
 2043                 }
 2044 
 2045                 public Object defaultValue() {
 2046                     return defaultValue;
 2047                 }
 2048         }
 2049 
 2050         public enum TypeConstraint implements OnnxTypeConstraint {
 2051             T(new OnnxType.TypeVariable("T", List.of(OnnxType.tensor(OnnxType.bfloat16()), OnnxType.tensor(OnnxType.float16()), OnnxType.tensor(OnnxType.float32()), OnnxType.tensor(OnnxType.float64())))),
 2052             ;
 2053 
 2054             final OnnxType.TypeVariable typeVariable;
 2055 
 2056             TypeConstraint(OnnxType.TypeVariable typeVariable) {
 2057                 assert typeVariable.name().equals(name());
 2058                 this.typeVariable = typeVariable;
 2059             }
 2060 
 2061             @Override
 2062             public OnnxType.TypeVariable typeVariable() {
 2063                 return typeVariable;
 2064             }
 2065         }
 2066 
 2067         public enum InputParameter implements OnnxParameter {
 2068             X(TypeConstraint.T.typeVariable(), Quantifier.REQUIRED),
 2069             ;
 2070 
 2071             final OnnxType type;
 2072             final Quantifier quantifier;
 2073 
 2074             InputParameter(OnnxType type, Quantifier quantifier) {
 2075                 this.type = type;
 2076                 this.quantifier = quantifier;
 2077             }
 2078 
 2079             @Override
 2080             public OnnxType type() {
 2081                 return type;
 2082             }
 2083 
 2084             @Override
 2085             public Quantifier quantifier() {
 2086                 return quantifier;
 2087             }
 2088         }
 2089 
 2090         public enum OutputParameter implements OnnxParameter {
 2091             Y(TypeConstraint.T.typeVariable(), Quantifier.REQUIRED),
 2092             ;
 2093 
 2094             final OnnxType type;
 2095             final Quantifier quantifier;
 2096 
 2097             OutputParameter(OnnxType type, Quantifier quantifier) {
 2098                 this.type = type;
 2099                 this.quantifier = quantifier;
 2100             }
 2101 
 2102             @Override
 2103             public OnnxType type() {
 2104                 return type;
 2105             }
 2106 
 2107             @Override
 2108             public Quantifier quantifier() {
 2109                 return quantifier;
 2110             }
 2111         }
 2112 
 2113         public static final OnnxSchema SCHEMA = new OnnxSchemaRecord(
 2114                 NAME,
 2115                 List.of(Attribute.values()),
 2116                 List.of(TypeConstraint.values()),
 2117                 List.of(InputParameter.values()),
 2118                 List.of(OutputParameter.values())
 2119         );
 2120 
 2121         public AveragePool(ExternalizedOp def) {
 2122             super(SCHEMA, def);
 2123         }
 2124 
 2125         AveragePool(AveragePool that, CopyContext cc) {
 2126             super(that, cc);
 2127         }
 2128 
 2129         @Override
 2130         public AveragePool transform(CopyContext cc, OpTransformer ot) {
 2131             return new AveragePool(this, cc);
 2132         }
 2133 
 2134         AveragePool(TypeElement resultType, Value X, java.util.Optional<long[]> pads, java.util.Optional<long[]> dilations, java.util.Optional<String> auto_pad, java.util.Optional<Long> count_include_pad, java.util.Optional<Long> ceil_mode, java.util.Optional<long[]> strides, long[] kernel_shape) {
 2135             super(SCHEMA, resultType, Set.of(), List.of(X), List.of(pads, dilations, auto_pad, count_include_pad, ceil_mode, strides, kernel_shape));
 2136         }
 2137 
 2138         @Override
 2139         public SequencedSet<OnnxParameter> onnxOutputs() {
 2140             return onnxOutputs(SCHEMA);
 2141         }
 2142 
 2143         @Override
 2144         public SequencedMap<OnnxParameter, Object> onnxInputs() {
 2145             return onnxInputs(SCHEMA, List.of(X()));
 2146         }
 2147 
 2148         public Value X() {
 2149             return operands().get(0);
 2150         }
 2151 
 2152         public java.util.Optional<long[]> pads() {
 2153             long[] pads = Attribute.pads.access(long[].class, onnxAttributes);
 2154             return java.util.Optional.ofNullable(pads).map(long[]::clone);
 2155         }
 2156 
 2157         public java.util.Optional<long[]> dilations() {
 2158             long[] dilations = Attribute.dilations.access(long[].class, onnxAttributes);
 2159             return java.util.Optional.ofNullable(dilations).map(long[]::clone);
 2160         }
 2161 
 2162         public java.util.Optional<String> auto_pad() {
 2163             String auto_pad = Attribute.auto_pad.access(String.class, onnxAttributes);
 2164             return java.util.Optional.ofNullable(auto_pad);
 2165         }
 2166 
 2167         public java.util.Optional<Long> count_include_pad() {
 2168             Long count_include_pad = Attribute.count_include_pad.access(Long.class, onnxAttributes);
 2169             return java.util.Optional.ofNullable(count_include_pad);
 2170         }
 2171 
 2172         public java.util.Optional<Long> ceil_mode() {
 2173             Long ceil_mode = Attribute.ceil_mode.access(Long.class, onnxAttributes);
 2174             return java.util.Optional.ofNullable(ceil_mode);
 2175         }
 2176 
 2177         public java.util.Optional<long[]> strides() {
 2178             long[] strides = Attribute.strides.access(long[].class, onnxAttributes);
 2179             return java.util.Optional.ofNullable(strides).map(long[]::clone);
 2180         }
 2181 
 2182         public long[] kernel_shape() {
 2183             long[] kernel_shape = Attribute.kernel_shape.access(long[].class, onnxAttributes);
 2184             return kernel_shape.clone();
 2185         }
 2186 
 2187     }
 2188 
 2189     public static AveragePool AveragePool(TypeElement resultType, Value X, java.util.Optional<long[]> pads, java.util.Optional<long[]> dilations, java.util.Optional<String> auto_pad, java.util.Optional<Long> count_include_pad, java.util.Optional<Long> ceil_mode, java.util.Optional<long[]> strides, long[] kernel_shape) {
 2190         return new AveragePool(resultType, X, pads, dilations, auto_pad, count_include_pad, ceil_mode, strides, kernel_shape);
 2191     }
 2192 
 2193     @OpFactoryHelper.OpDeclaration(BatchNormalization.NAME)
 2194     public static final class BatchNormalization extends OnnxOp {
 2195         public static final String NAME = "BatchNormalization";
 2196 
 2197         public enum Attribute implements OnnxAttribute {
 2198             epsilon(Float.class, true, 1.0E-5f),
 2199             training_mode(Long.class, true, 0),
 2200             momentum(Float.class, true, 0.9f),
 2201             ;
 2202 
 2203                 final Class<?> t;
 2204                 final boolean optional;
 2205                 final Object defaultValue;
 2206 
 2207                 Attribute(Class<?> type, boolean optional, Object defaultValue) {
 2208                     this.t = type;
 2209                     this.optional = optional;
 2210                     this.defaultValue = defaultValue;
 2211                     assert optional || defaultValue == null;
 2212                 }
 2213 
 2214                 public Class<?> type() {
 2215                     return t;
 2216                 }
 2217 
 2218                 public boolean isOptional() {
 2219                     return optional;
 2220                 }
 2221 
 2222                 public Object defaultValue() {
 2223                     return defaultValue;
 2224                 }
 2225         }
 2226 
 2227         public enum TypeConstraint implements OnnxTypeConstraint {
 2228             T(new OnnxType.TypeVariable("T", List.of(OnnxType.tensor(OnnxType.float16()), OnnxType.tensor(OnnxType.float32()), OnnxType.tensor(OnnxType.float64()), OnnxType.tensor(OnnxType.bfloat16())))),
 2229             T1(new OnnxType.TypeVariable("T1", List.of(OnnxType.tensor(OnnxType.float16()), OnnxType.tensor(OnnxType.float32()), OnnxType.tensor(OnnxType.float64()), OnnxType.tensor(OnnxType.bfloat16())))),
 2230             T2(new OnnxType.TypeVariable("T2", List.of(OnnxType.tensor(OnnxType.float16()), OnnxType.tensor(OnnxType.float32()), OnnxType.tensor(OnnxType.float64()), OnnxType.tensor(OnnxType.bfloat16())))),
 2231             ;
 2232 
 2233             final OnnxType.TypeVariable typeVariable;
 2234 
 2235             TypeConstraint(OnnxType.TypeVariable typeVariable) {
 2236                 assert typeVariable.name().equals(name());
 2237                 this.typeVariable = typeVariable;
 2238             }
 2239 
 2240             @Override
 2241             public OnnxType.TypeVariable typeVariable() {
 2242                 return typeVariable;
 2243             }
 2244         }
 2245 
 2246         public enum InputParameter implements OnnxParameter {
 2247             X(TypeConstraint.T.typeVariable(), Quantifier.REQUIRED),
 2248             scale(TypeConstraint.T1.typeVariable(), Quantifier.REQUIRED),
 2249             B(TypeConstraint.T1.typeVariable(), Quantifier.REQUIRED),
 2250             input_mean(TypeConstraint.T2.typeVariable(), Quantifier.REQUIRED),
 2251             input_var(TypeConstraint.T2.typeVariable(), Quantifier.REQUIRED),
 2252             ;
 2253 
 2254             final OnnxType type;
 2255             final Quantifier quantifier;
 2256 
 2257             InputParameter(OnnxType type, Quantifier quantifier) {
 2258                 this.type = type;
 2259                 this.quantifier = quantifier;
 2260             }
 2261 
 2262             @Override
 2263             public OnnxType type() {
 2264                 return type;
 2265             }
 2266 
 2267             @Override
 2268             public Quantifier quantifier() {
 2269                 return quantifier;
 2270             }
 2271         }
 2272 
 2273         public enum OutputParameter implements OnnxParameter {
 2274             Y(TypeConstraint.T.typeVariable(), Quantifier.REQUIRED),
 2275             running_mean(TypeConstraint.T2.typeVariable(), Quantifier.OPTIONAL),
 2276             running_var(TypeConstraint.T2.typeVariable(), Quantifier.OPTIONAL),
 2277             ;
 2278 
 2279             final OnnxType type;
 2280             final Quantifier quantifier;
 2281 
 2282             OutputParameter(OnnxType type, Quantifier quantifier) {
 2283                 this.type = type;
 2284                 this.quantifier = quantifier;
 2285             }
 2286 
 2287             @Override
 2288             public OnnxType type() {
 2289                 return type;
 2290             }
 2291 
 2292             @Override
 2293             public Quantifier quantifier() {
 2294                 return quantifier;
 2295             }
 2296         }
 2297 
 2298         public static final OnnxSchema SCHEMA = new OnnxSchemaRecord(
 2299                 NAME,
 2300                 List.of(Attribute.values()),
 2301                 List.of(TypeConstraint.values()),
 2302                 List.of(InputParameter.values()),
 2303                 List.of(OutputParameter.values())
 2304         );
 2305 
 2306         public BatchNormalization(ExternalizedOp def) {
 2307             super(SCHEMA, def);
 2308         }
 2309 
 2310         BatchNormalization(BatchNormalization that, CopyContext cc) {
 2311             super(that, cc);
 2312         }
 2313 
 2314         @Override
 2315         public BatchNormalization transform(CopyContext cc, OpTransformer ot) {
 2316             return new BatchNormalization(this, cc);
 2317         }
 2318 
 2319         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<Long> training_mode, java.util.Optional<Float> momentum) {
 2320             super(SCHEMA, resultType, optionalOutputs, List.of(X, scale, B, input_mean, input_var), List.of(epsilon, training_mode, momentum));
 2321         }
 2322 
 2323         @Override
 2324         public SequencedSet<OnnxParameter> onnxOutputs() {
 2325             return onnxOutputs(SCHEMA);
 2326         }
 2327 
 2328         @Override
 2329         public SequencedMap<OnnxParameter, Object> onnxInputs() {
 2330             return onnxInputs(SCHEMA, List.of(X(), scale(), B(), input_mean(), input_var()));
 2331         }
 2332 
 2333         public Value X() {
 2334             return operands().get(0);
 2335         }
 2336 
 2337         public Value scale() {
 2338             return operands().get(1);
 2339         }
 2340 
 2341         public Value B() {
 2342             return operands().get(2);
 2343         }
 2344 
 2345         public Value input_mean() {
 2346             return operands().get(3);
 2347         }
 2348 
 2349         public Value input_var() {
 2350             return operands().get(4);
 2351         }
 2352 
 2353         public java.util.Optional<Float> epsilon() {
 2354             Float epsilon = Attribute.epsilon.access(Float.class, onnxAttributes);
 2355             return java.util.Optional.ofNullable(epsilon);
 2356         }
 2357 
 2358         public java.util.Optional<Long> training_mode() {
 2359             Long training_mode = Attribute.training_mode.access(Long.class, onnxAttributes);
 2360             return java.util.Optional.ofNullable(training_mode);
 2361         }
 2362 
 2363         public java.util.Optional<Float> momentum() {
 2364             Float momentum = Attribute.momentum.access(Float.class, onnxAttributes);
 2365             return java.util.Optional.ofNullable(momentum);
 2366         }
 2367 
 2368     }
 2369 
 2370     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<Long> training_mode, java.util.Optional<Float> momentum) {
 2371         return new BatchNormalization(resultType, optionalOutputs, X, scale, B, input_mean, input_var, epsilon, training_mode, momentum);
 2372     }
 2373 
 2374     @OpFactoryHelper.OpDeclaration(Bernoulli.NAME)
 2375     public static final class Bernoulli extends OnnxOp {
 2376         public static final String NAME = "Bernoulli";
 2377 
 2378         public enum Attribute implements OnnxAttribute {
 2379             seed(Float.class, true, null),
 2380             dtype(Long.class, true, null),
 2381             ;
 2382 
 2383                 final Class<?> t;
 2384                 final boolean optional;
 2385                 final Object defaultValue;
 2386 
 2387                 Attribute(Class<?> type, boolean optional, Object defaultValue) {
 2388                     this.t = type;
 2389                     this.optional = optional;
 2390                     this.defaultValue = defaultValue;
 2391                     assert optional || defaultValue == null;
 2392                 }
 2393 
 2394                 public Class<?> type() {
 2395                     return t;
 2396                 }
 2397 
 2398                 public boolean isOptional() {
 2399                     return optional;
 2400                 }
 2401 
 2402                 public Object defaultValue() {
 2403                     return defaultValue;
 2404                 }
 2405         }
 2406 
 2407         public enum TypeConstraint implements OnnxTypeConstraint {
 2408             T1(new OnnxType.TypeVariable("T1", List.of(OnnxType.tensor(OnnxType.bfloat16()), OnnxType.tensor(OnnxType.float16()), OnnxType.tensor(OnnxType.float32()), OnnxType.tensor(OnnxType.float64())))),
 2409             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())))),
 2410             ;
 2411 
 2412             final OnnxType.TypeVariable typeVariable;
 2413 
 2414             TypeConstraint(OnnxType.TypeVariable typeVariable) {
 2415                 assert typeVariable.name().equals(name());
 2416                 this.typeVariable = typeVariable;
 2417             }
 2418 
 2419             @Override
 2420             public OnnxType.TypeVariable typeVariable() {
 2421                 return typeVariable;
 2422             }
 2423         }
 2424 
 2425         public enum InputParameter implements OnnxParameter {
 2426             input(TypeConstraint.T1.typeVariable(), Quantifier.REQUIRED),
 2427             ;
 2428 
 2429             final OnnxType type;
 2430             final Quantifier quantifier;
 2431 
 2432             InputParameter(OnnxType type, Quantifier quantifier) {
 2433                 this.type = type;
 2434                 this.quantifier = quantifier;
 2435             }
 2436 
 2437             @Override
 2438             public OnnxType type() {
 2439                 return type;
 2440             }
 2441 
 2442             @Override
 2443             public Quantifier quantifier() {
 2444                 return quantifier;
 2445             }
 2446         }
 2447 
 2448         public enum OutputParameter implements OnnxParameter {
 2449             output(TypeConstraint.T2.typeVariable(), Quantifier.REQUIRED),
 2450             ;
 2451 
 2452             final OnnxType type;
 2453             final Quantifier quantifier;
 2454 
 2455             OutputParameter(OnnxType type, Quantifier quantifier) {
 2456                 this.type = type;
 2457                 this.quantifier = quantifier;
 2458             }
 2459 
 2460             @Override
 2461             public OnnxType type() {
 2462                 return type;
 2463             }
 2464 
 2465             @Override
 2466             public Quantifier quantifier() {
 2467                 return quantifier;
 2468             }
 2469         }
 2470 
 2471         public static final OnnxSchema SCHEMA = new OnnxSchemaRecord(
 2472                 NAME,
 2473                 List.of(Attribute.values()),
 2474                 List.of(TypeConstraint.values()),
 2475                 List.of(InputParameter.values()),
 2476                 List.of(OutputParameter.values())
 2477         );
 2478 
 2479         public Bernoulli(ExternalizedOp def) {
 2480             super(SCHEMA, def);
 2481         }
 2482 
 2483         Bernoulli(Bernoulli that, CopyContext cc) {
 2484             super(that, cc);
 2485         }
 2486 
 2487         @Override
 2488         public Bernoulli transform(CopyContext cc, OpTransformer ot) {
 2489             return new Bernoulli(this, cc);
 2490         }
 2491 
 2492         Bernoulli(TypeElement resultType, Value input, java.util.Optional<Float> seed, java.util.Optional<Long> dtype) {
 2493             super(SCHEMA, resultType, Set.of(), List.of(input), List.of(seed, dtype));
 2494         }
 2495 
 2496         @Override
 2497         public SequencedSet<OnnxParameter> onnxOutputs() {
 2498             return onnxOutputs(SCHEMA);
 2499         }
 2500 
 2501         @Override
 2502         public SequencedMap<OnnxParameter, Object> onnxInputs() {
 2503             return onnxInputs(SCHEMA, List.of(input()));
 2504         }
 2505 
 2506         public Value input() {
 2507             return operands().get(0);
 2508         }
 2509 
 2510         public java.util.Optional<Float> seed() {
 2511             Float seed = Attribute.seed.access(Float.class, onnxAttributes);
 2512             return java.util.Optional.ofNullable(seed);
 2513         }
 2514 
 2515         public java.util.Optional<Long> dtype() {
 2516             Long dtype = Attribute.dtype.access(Long.class, onnxAttributes);
 2517             return java.util.Optional.ofNullable(dtype);
 2518         }
 2519 
 2520     }
 2521 
 2522     public static Bernoulli Bernoulli(TypeElement resultType, Value input, java.util.Optional<Float> seed, java.util.Optional<Long> dtype) {
 2523         return new Bernoulli(resultType, input, seed, dtype);
 2524     }
 2525 
 2526     @OpFactoryHelper.OpDeclaration(Binarizer.NAME)
 2527     public static final class Binarizer extends OnnxOp {
 2528         public static final String NAME = "Binarizer";
 2529 
 2530         public enum Attribute implements OnnxAttribute {
 2531             threshold(Float.class, true, 0.0f),
 2532             ;
 2533 
 2534                 final Class<?> t;
 2535                 final boolean optional;
 2536                 final Object defaultValue;
 2537 
 2538                 Attribute(Class<?> type, boolean optional, Object defaultValue) {
 2539                     this.t = type;
 2540                     this.optional = optional;
 2541                     this.defaultValue = defaultValue;
 2542                     assert optional || defaultValue == null;
 2543                 }
 2544 
 2545                 public Class<?> type() {
 2546                     return t;
 2547                 }
 2548 
 2549                 public boolean isOptional() {
 2550                     return optional;
 2551                 }
 2552 
 2553                 public Object defaultValue() {
 2554                     return defaultValue;
 2555                 }
 2556         }
 2557 
 2558         public enum TypeConstraint implements OnnxTypeConstraint {
 2559             T(new OnnxType.TypeVariable("T", List.of(OnnxType.tensor(OnnxType.float32()), OnnxType.tensor(OnnxType.float64()), OnnxType.tensor(OnnxType.int64()), OnnxType.tensor(OnnxType.int32())))),
 2560             ;
 2561 
 2562             final OnnxType.TypeVariable typeVariable;
 2563 
 2564             TypeConstraint(OnnxType.TypeVariable typeVariable) {
 2565                 assert typeVariable.name().equals(name());
 2566                 this.typeVariable = typeVariable;
 2567             }
 2568 
 2569             @Override
 2570             public OnnxType.TypeVariable typeVariable() {
 2571                 return typeVariable;
 2572             }
 2573         }
 2574 
 2575         public enum InputParameter implements OnnxParameter {
 2576             X(TypeConstraint.T.typeVariable(), Quantifier.REQUIRED),
 2577             ;
 2578 
 2579             final OnnxType type;
 2580             final Quantifier quantifier;
 2581 
 2582             InputParameter(OnnxType type, Quantifier quantifier) {
 2583                 this.type = type;
 2584                 this.quantifier = quantifier;
 2585             }
 2586 
 2587             @Override
 2588             public OnnxType type() {
 2589                 return type;
 2590             }
 2591 
 2592             @Override
 2593             public Quantifier quantifier() {
 2594                 return quantifier;
 2595             }
 2596         }
 2597 
 2598         public enum OutputParameter implements OnnxParameter {
 2599             Y(TypeConstraint.T.typeVariable(), Quantifier.REQUIRED),
 2600             ;
 2601 
 2602             final OnnxType type;
 2603             final Quantifier quantifier;
 2604 
 2605             OutputParameter(OnnxType type, Quantifier quantifier) {
 2606                 this.type = type;
 2607                 this.quantifier = quantifier;
 2608             }
 2609 
 2610             @Override
 2611             public OnnxType type() {
 2612                 return type;
 2613             }
 2614 
 2615             @Override
 2616             public Quantifier quantifier() {
 2617                 return quantifier;
 2618             }
 2619         }
 2620 
 2621         public static final OnnxSchema SCHEMA = new OnnxSchemaRecord(
 2622                 NAME,
 2623                 List.of(Attribute.values()),
 2624                 List.of(TypeConstraint.values()),
 2625                 List.of(InputParameter.values()),
 2626                 List.of(OutputParameter.values())
 2627         );
 2628 
 2629         public Binarizer(ExternalizedOp def) {
 2630             super(SCHEMA, def);
 2631         }
 2632 
 2633         Binarizer(Binarizer that, CopyContext cc) {
 2634             super(that, cc);
 2635         }
 2636 
 2637         @Override
 2638         public Binarizer transform(CopyContext cc, OpTransformer ot) {
 2639             return new Binarizer(this, cc);
 2640         }
 2641 
 2642         Binarizer(TypeElement resultType, Value X, java.util.Optional<Float> threshold) {
 2643             super(SCHEMA, resultType, Set.of(), List.of(X), List.of(threshold));
 2644         }
 2645 
 2646         @Override
 2647         public SequencedSet<OnnxParameter> onnxOutputs() {
 2648             return onnxOutputs(SCHEMA);
 2649         }
 2650 
 2651         @Override
 2652         public SequencedMap<OnnxParameter, Object> onnxInputs() {
 2653             return onnxInputs(SCHEMA, List.of(X()));
 2654         }
 2655 
 2656         public Value X() {
 2657             return operands().get(0);
 2658         }
 2659 
 2660         public java.util.Optional<Float> threshold() {
 2661             Float threshold = Attribute.threshold.access(Float.class, onnxAttributes);
 2662             return java.util.Optional.ofNullable(threshold);
 2663         }
 2664 
 2665     }
 2666 
 2667     public static Binarizer Binarizer(TypeElement resultType, Value X, java.util.Optional<Float> threshold) {
 2668         return new Binarizer(resultType, X, threshold);
 2669     }
 2670 
 2671     @OpFactoryHelper.OpDeclaration(BitShift.NAME)
 2672     public static final class BitShift extends OnnxOp {
 2673         public static final String NAME = "BitShift";
 2674 
 2675         public enum Attribute implements OnnxAttribute {
 2676             direction(String.class, false, null),
 2677             ;
 2678 
 2679                 final Class<?> t;
 2680                 final boolean optional;
 2681                 final Object defaultValue;
 2682 
 2683                 Attribute(Class<?> type, boolean optional, Object defaultValue) {
 2684                     this.t = type;
 2685                     this.optional = optional;
 2686                     this.defaultValue = defaultValue;
 2687                     assert optional || defaultValue == null;
 2688                 }
 2689 
 2690                 public Class<?> type() {
 2691                     return t;
 2692                 }
 2693 
 2694                 public boolean isOptional() {
 2695                     return optional;
 2696                 }
 2697 
 2698                 public Object defaultValue() {
 2699                     return defaultValue;
 2700                 }
 2701         }
 2702 
 2703         public enum TypeConstraint implements OnnxTypeConstraint {
 2704             T(new OnnxType.TypeVariable("T", List.of(OnnxType.tensor(OnnxType.uint8()), OnnxType.tensor(OnnxType.uint16()), OnnxType.tensor(OnnxType.uint32()), OnnxType.tensor(OnnxType.uint64())))),
 2705             ;
 2706 
 2707             final OnnxType.TypeVariable typeVariable;
 2708 
 2709             TypeConstraint(OnnxType.TypeVariable typeVariable) {
 2710                 assert typeVariable.name().equals(name());
 2711                 this.typeVariable = typeVariable;
 2712             }
 2713 
 2714             @Override
 2715             public OnnxType.TypeVariable typeVariable() {
 2716                 return typeVariable;
 2717             }
 2718         }
 2719 
 2720         public enum InputParameter implements OnnxParameter {
 2721             X(TypeConstraint.T.typeVariable(), Quantifier.REQUIRED),
 2722             Y(TypeConstraint.T.typeVariable(), Quantifier.REQUIRED),
 2723             ;
 2724 
 2725             final OnnxType type;
 2726             final Quantifier quantifier;
 2727 
 2728             InputParameter(OnnxType type, Quantifier quantifier) {
 2729                 this.type = type;
 2730                 this.quantifier = quantifier;
 2731             }
 2732 
 2733             @Override
 2734             public OnnxType type() {
 2735                 return type;
 2736             }
 2737 
 2738             @Override
 2739             public Quantifier quantifier() {
 2740                 return quantifier;
 2741             }
 2742         }
 2743 
 2744         public enum OutputParameter implements OnnxParameter {
 2745             Z(TypeConstraint.T.typeVariable(), Quantifier.REQUIRED),
 2746             ;
 2747 
 2748             final OnnxType type;
 2749             final Quantifier quantifier;
 2750 
 2751             OutputParameter(OnnxType type, Quantifier quantifier) {
 2752                 this.type = type;
 2753                 this.quantifier = quantifier;
 2754             }
 2755 
 2756             @Override
 2757             public OnnxType type() {
 2758                 return type;
 2759             }
 2760 
 2761             @Override
 2762             public Quantifier quantifier() {
 2763                 return quantifier;
 2764             }
 2765         }
 2766 
 2767         public static final OnnxSchema SCHEMA = new OnnxSchemaRecord(
 2768                 NAME,
 2769                 List.of(Attribute.values()),
 2770                 List.of(TypeConstraint.values()),
 2771                 List.of(InputParameter.values()),
 2772                 List.of(OutputParameter.values())
 2773         );
 2774 
 2775         public BitShift(ExternalizedOp def) {
 2776             super(SCHEMA, def);
 2777         }
 2778 
 2779         BitShift(BitShift that, CopyContext cc) {
 2780             super(that, cc);
 2781         }
 2782 
 2783         @Override
 2784         public BitShift transform(CopyContext cc, OpTransformer ot) {
 2785             return new BitShift(this, cc);
 2786         }
 2787 
 2788         BitShift(TypeElement resultType, Value X, Value Y, String direction) {
 2789             super(SCHEMA, resultType, Set.of(), List.of(X, Y), List.of(direction));
 2790         }
 2791 
 2792         @Override
 2793         public SequencedSet<OnnxParameter> onnxOutputs() {
 2794             return onnxOutputs(SCHEMA);
 2795         }
 2796 
 2797         @Override
 2798         public SequencedMap<OnnxParameter, Object> onnxInputs() {
 2799             return onnxInputs(SCHEMA, List.of(X(), Y()));
 2800         }
 2801 
 2802         public Value X() {
 2803             return operands().get(0);
 2804         }
 2805 
 2806         public Value Y() {
 2807             return operands().get(1);
 2808         }
 2809 
 2810         public String direction() {
 2811             String direction = Attribute.direction.access(String.class, onnxAttributes);
 2812             return direction;
 2813         }
 2814 
 2815     }
 2816 
 2817     public static BitShift BitShift(TypeElement resultType, Value X, Value Y, String direction) {
 2818         return new BitShift(resultType, X, Y, direction);
 2819     }
 2820 
 2821     @OpFactoryHelper.OpDeclaration(BitwiseAnd.NAME)
 2822     public static final class BitwiseAnd extends OnnxOp {
 2823         public static final String NAME = "BitwiseAnd";
 2824 
 2825         public enum Attribute implements OnnxAttribute.None { }
 2826 
 2827         public enum TypeConstraint implements OnnxTypeConstraint {
 2828             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())))),
 2829             ;
 2830 
 2831             final OnnxType.TypeVariable typeVariable;
 2832 
 2833             TypeConstraint(OnnxType.TypeVariable typeVariable) {
 2834                 assert typeVariable.name().equals(name());
 2835                 this.typeVariable = typeVariable;
 2836             }
 2837 
 2838             @Override
 2839             public OnnxType.TypeVariable typeVariable() {
 2840                 return typeVariable;
 2841             }
 2842         }
 2843 
 2844         public enum InputParameter implements OnnxParameter {
 2845             A(TypeConstraint.T.typeVariable(), Quantifier.REQUIRED),
 2846             B(TypeConstraint.T.typeVariable(), Quantifier.REQUIRED),
 2847             ;
 2848 
 2849             final OnnxType type;
 2850             final Quantifier quantifier;
 2851 
 2852             InputParameter(OnnxType type, Quantifier quantifier) {
 2853                 this.type = type;
 2854                 this.quantifier = quantifier;
 2855             }
 2856 
 2857             @Override
 2858             public OnnxType type() {
 2859                 return type;
 2860             }
 2861 
 2862             @Override
 2863             public Quantifier quantifier() {
 2864                 return quantifier;
 2865             }
 2866         }
 2867 
 2868         public enum OutputParameter implements OnnxParameter {
 2869             C(TypeConstraint.T.typeVariable(), Quantifier.REQUIRED),
 2870             ;
 2871 
 2872             final OnnxType type;
 2873             final Quantifier quantifier;
 2874 
 2875             OutputParameter(OnnxType type, Quantifier quantifier) {
 2876                 this.type = type;
 2877                 this.quantifier = quantifier;
 2878             }
 2879 
 2880             @Override
 2881             public OnnxType type() {
 2882                 return type;
 2883             }
 2884 
 2885             @Override
 2886             public Quantifier quantifier() {
 2887                 return quantifier;
 2888             }
 2889         }
 2890 
 2891         public static final OnnxSchema SCHEMA = new OnnxSchemaRecord(
 2892                 NAME,
 2893                 List.of(Attribute.values()),
 2894                 List.of(TypeConstraint.values()),
 2895                 List.of(InputParameter.values()),
 2896                 List.of(OutputParameter.values())
 2897         );
 2898 
 2899         public BitwiseAnd(ExternalizedOp def) {
 2900             super(SCHEMA, def);
 2901         }
 2902 
 2903         BitwiseAnd(BitwiseAnd that, CopyContext cc) {
 2904             super(that, cc);
 2905         }
 2906 
 2907         @Override
 2908         public BitwiseAnd transform(CopyContext cc, OpTransformer ot) {
 2909             return new BitwiseAnd(this, cc);
 2910         }
 2911 
 2912         BitwiseAnd(TypeElement resultType, Value A, Value B) {
 2913             super(SCHEMA, resultType, Set.of(), List.of(A, B), List.of());
 2914         }
 2915 
 2916         @Override
 2917         public SequencedSet<OnnxParameter> onnxOutputs() {
 2918             return onnxOutputs(SCHEMA);
 2919         }
 2920 
 2921         @Override
 2922         public SequencedMap<OnnxParameter, Object> onnxInputs() {
 2923             return onnxInputs(SCHEMA, List.of(A(), B()));
 2924         }
 2925 
 2926         public Value A() {
 2927             return operands().get(0);
 2928         }
 2929 
 2930         public Value B() {
 2931             return operands().get(1);
 2932         }
 2933 
 2934     }
 2935 
 2936     public static BitwiseAnd BitwiseAnd(TypeElement resultType, Value A, Value B) {
 2937         return new BitwiseAnd(resultType, A, B);
 2938     }
 2939 
 2940     @OpFactoryHelper.OpDeclaration(BitwiseNot.NAME)
 2941     public static final class BitwiseNot extends OnnxOp {
 2942         public static final String NAME = "BitwiseNot";
 2943 
 2944         public enum Attribute implements OnnxAttribute.None { }
 2945 
 2946         public enum TypeConstraint implements OnnxTypeConstraint {
 2947             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())))),
 2948             ;
 2949 
 2950             final OnnxType.TypeVariable typeVariable;
 2951 
 2952             TypeConstraint(OnnxType.TypeVariable typeVariable) {
 2953                 assert typeVariable.name().equals(name());
 2954                 this.typeVariable = typeVariable;
 2955             }
 2956 
 2957             @Override
 2958             public OnnxType.TypeVariable typeVariable() {
 2959                 return typeVariable;
 2960             }
 2961         }
 2962 
 2963         public enum InputParameter implements OnnxParameter {
 2964             X(TypeConstraint.T.typeVariable(), Quantifier.REQUIRED),
 2965             ;
 2966 
 2967             final OnnxType type;
 2968             final Quantifier quantifier;
 2969 
 2970             InputParameter(OnnxType type, Quantifier quantifier) {
 2971                 this.type = type;
 2972                 this.quantifier = quantifier;
 2973             }
 2974 
 2975             @Override
 2976             public OnnxType type() {
 2977                 return type;
 2978             }
 2979 
 2980             @Override
 2981             public Quantifier quantifier() {
 2982                 return quantifier;
 2983             }
 2984         }
 2985 
 2986         public enum OutputParameter implements OnnxParameter {
 2987             Y(TypeConstraint.T.typeVariable(), Quantifier.REQUIRED),
 2988             ;
 2989 
 2990             final OnnxType type;
 2991             final Quantifier quantifier;
 2992 
 2993             OutputParameter(OnnxType type, Quantifier quantifier) {
 2994                 this.type = type;
 2995                 this.quantifier = quantifier;
 2996             }
 2997 
 2998             @Override
 2999             public OnnxType type() {
 3000                 return type;
 3001             }
 3002 
 3003             @Override
 3004             public Quantifier quantifier() {
 3005                 return quantifier;
 3006             }
 3007         }
 3008 
 3009         public static final OnnxSchema SCHEMA = new OnnxSchemaRecord(
 3010                 NAME,
 3011                 List.of(Attribute.values()),
 3012                 List.of(TypeConstraint.values()),
 3013                 List.of(InputParameter.values()),
 3014                 List.of(OutputParameter.values())
 3015         );
 3016 
 3017         public BitwiseNot(ExternalizedOp def) {
 3018             super(SCHEMA, def);
 3019         }
 3020 
 3021         BitwiseNot(BitwiseNot that, CopyContext cc) {
 3022             super(that, cc);
 3023         }
 3024 
 3025         @Override
 3026         public BitwiseNot transform(CopyContext cc, OpTransformer ot) {
 3027             return new BitwiseNot(this, cc);
 3028         }
 3029 
 3030         BitwiseNot(TypeElement resultType, Value X) {
 3031             super(SCHEMA, resultType, Set.of(), List.of(X), List.of());
 3032         }
 3033 
 3034         @Override
 3035         public SequencedSet<OnnxParameter> onnxOutputs() {
 3036             return onnxOutputs(SCHEMA);
 3037         }
 3038 
 3039         @Override
 3040         public SequencedMap<OnnxParameter, Object> onnxInputs() {
 3041             return onnxInputs(SCHEMA, List.of(X()));
 3042         }
 3043 
 3044         public Value X() {
 3045             return operands().get(0);
 3046         }
 3047 
 3048     }
 3049 
 3050     public static BitwiseNot BitwiseNot(TypeElement resultType, Value X) {
 3051         return new BitwiseNot(resultType, X);
 3052     }
 3053 
 3054     @OpFactoryHelper.OpDeclaration(BitwiseOr.NAME)
 3055     public static final class BitwiseOr extends OnnxOp {
 3056         public static final String NAME = "BitwiseOr";
 3057 
 3058         public enum Attribute implements OnnxAttribute.None { }
 3059 
 3060         public enum TypeConstraint implements OnnxTypeConstraint {
 3061             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())))),
 3062             ;
 3063 
 3064             final OnnxType.TypeVariable typeVariable;
 3065 
 3066             TypeConstraint(OnnxType.TypeVariable typeVariable) {
 3067                 assert typeVariable.name().equals(name());
 3068                 this.typeVariable = typeVariable;
 3069             }
 3070 
 3071             @Override
 3072             public OnnxType.TypeVariable typeVariable() {
 3073                 return typeVariable;
 3074             }
 3075         }
 3076 
 3077         public enum InputParameter implements OnnxParameter {
 3078             A(TypeConstraint.T.typeVariable(), Quantifier.REQUIRED),
 3079             B(TypeConstraint.T.typeVariable(), Quantifier.REQUIRED),
 3080             ;
 3081 
 3082             final OnnxType type;
 3083             final Quantifier quantifier;
 3084 
 3085             InputParameter(OnnxType type, Quantifier quantifier) {
 3086                 this.type = type;
 3087                 this.quantifier = quantifier;
 3088             }
 3089 
 3090             @Override
 3091             public OnnxType type() {
 3092                 return type;
 3093             }
 3094 
 3095             @Override
 3096             public Quantifier quantifier() {
 3097                 return quantifier;
 3098             }
 3099         }
 3100 
 3101         public enum OutputParameter implements OnnxParameter {
 3102             C(TypeConstraint.T.typeVariable(), Quantifier.REQUIRED),
 3103             ;
 3104 
 3105             final OnnxType type;
 3106             final Quantifier quantifier;
 3107 
 3108             OutputParameter(OnnxType type, Quantifier quantifier) {
 3109                 this.type = type;
 3110                 this.quantifier = quantifier;
 3111             }
 3112 
 3113             @Override
 3114             public OnnxType type() {
 3115                 return type;
 3116             }
 3117 
 3118             @Override
 3119             public Quantifier quantifier() {
 3120                 return quantifier;
 3121             }
 3122         }
 3123 
 3124         public static final OnnxSchema SCHEMA = new OnnxSchemaRecord(
 3125                 NAME,
 3126                 List.of(Attribute.values()),
 3127                 List.of(TypeConstraint.values()),
 3128                 List.of(InputParameter.values()),
 3129                 List.of(OutputParameter.values())
 3130         );
 3131 
 3132         public BitwiseOr(ExternalizedOp def) {
 3133             super(SCHEMA, def);
 3134         }
 3135 
 3136         BitwiseOr(BitwiseOr that, CopyContext cc) {
 3137             super(that, cc);
 3138         }
 3139 
 3140         @Override
 3141         public BitwiseOr transform(CopyContext cc, OpTransformer ot) {
 3142             return new BitwiseOr(this, cc);
 3143         }
 3144 
 3145         BitwiseOr(TypeElement resultType, Value A, Value B) {
 3146             super(SCHEMA, resultType, Set.of(), List.of(A, B), List.of());
 3147         }
 3148 
 3149         @Override
 3150         public SequencedSet<OnnxParameter> onnxOutputs() {
 3151             return onnxOutputs(SCHEMA);
 3152         }
 3153 
 3154         @Override
 3155         public SequencedMap<OnnxParameter, Object> onnxInputs() {
 3156             return onnxInputs(SCHEMA, List.of(A(), B()));
 3157         }
 3158 
 3159         public Value A() {
 3160             return operands().get(0);
 3161         }
 3162 
 3163         public Value B() {
 3164             return operands().get(1);
 3165         }
 3166 
 3167     }
 3168 
 3169     public static BitwiseOr BitwiseOr(TypeElement resultType, Value A, Value B) {
 3170         return new BitwiseOr(resultType, A, B);
 3171     }
 3172 
 3173     @OpFactoryHelper.OpDeclaration(BitwiseXor.NAME)
 3174     public static final class BitwiseXor extends OnnxOp {
 3175         public static final String NAME = "BitwiseXor";
 3176 
 3177         public enum Attribute implements OnnxAttribute.None { }
 3178 
 3179         public enum TypeConstraint implements OnnxTypeConstraint {
 3180             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())))),
 3181             ;
 3182 
 3183             final OnnxType.TypeVariable typeVariable;
 3184 
 3185             TypeConstraint(OnnxType.TypeVariable typeVariable) {
 3186                 assert typeVariable.name().equals(name());
 3187                 this.typeVariable = typeVariable;
 3188             }
 3189 
 3190             @Override
 3191             public OnnxType.TypeVariable typeVariable() {
 3192                 return typeVariable;
 3193             }
 3194         }
 3195 
 3196         public enum InputParameter implements OnnxParameter {
 3197             A(TypeConstraint.T.typeVariable(), Quantifier.REQUIRED),
 3198             B(TypeConstraint.T.typeVariable(), Quantifier.REQUIRED),
 3199             ;
 3200 
 3201             final OnnxType type;
 3202             final Quantifier quantifier;
 3203 
 3204             InputParameter(OnnxType type, Quantifier quantifier) {
 3205                 this.type = type;
 3206                 this.quantifier = quantifier;
 3207             }
 3208 
 3209             @Override
 3210             public OnnxType type() {
 3211                 return type;
 3212             }
 3213 
 3214             @Override
 3215             public Quantifier quantifier() {
 3216                 return quantifier;
 3217             }
 3218         }
 3219 
 3220         public enum OutputParameter implements OnnxParameter {
 3221             C(TypeConstraint.T.typeVariable(), Quantifier.REQUIRED),
 3222             ;
 3223 
 3224             final OnnxType type;
 3225             final Quantifier quantifier;
 3226 
 3227             OutputParameter(OnnxType type, Quantifier quantifier) {
 3228                 this.type = type;
 3229                 this.quantifier = quantifier;
 3230             }
 3231 
 3232             @Override
 3233             public OnnxType type() {
 3234                 return type;
 3235             }
 3236 
 3237             @Override
 3238             public Quantifier quantifier() {
 3239                 return quantifier;
 3240             }
 3241         }
 3242 
 3243         public static final OnnxSchema SCHEMA = new OnnxSchemaRecord(
 3244                 NAME,
 3245                 List.of(Attribute.values()),
 3246                 List.of(TypeConstraint.values()),
 3247                 List.of(InputParameter.values()),
 3248                 List.of(OutputParameter.values())
 3249         );
 3250 
 3251         public BitwiseXor(ExternalizedOp def) {
 3252             super(SCHEMA, def);
 3253         }
 3254 
 3255         BitwiseXor(BitwiseXor that, CopyContext cc) {
 3256             super(that, cc);
 3257         }
 3258 
 3259         @Override
 3260         public BitwiseXor transform(CopyContext cc, OpTransformer ot) {
 3261             return new BitwiseXor(this, cc);
 3262         }
 3263 
 3264         BitwiseXor(TypeElement resultType, Value A, Value B) {
 3265             super(SCHEMA, resultType, Set.of(), List.of(A, B), List.of());
 3266         }
 3267 
 3268         @Override
 3269         public SequencedSet<OnnxParameter> onnxOutputs() {
 3270             return onnxOutputs(SCHEMA);
 3271         }
 3272 
 3273         @Override
 3274         public SequencedMap<OnnxParameter, Object> onnxInputs() {
 3275             return onnxInputs(SCHEMA, List.of(A(), B()));
 3276         }
 3277 
 3278         public Value A() {
 3279             return operands().get(0);
 3280         }
 3281 
 3282         public Value B() {
 3283             return operands().get(1);
 3284         }
 3285 
 3286     }
 3287 
 3288     public static BitwiseXor BitwiseXor(TypeElement resultType, Value A, Value B) {
 3289         return new BitwiseXor(resultType, A, B);
 3290     }
 3291 
 3292     @OpFactoryHelper.OpDeclaration(BlackmanWindow.NAME)
 3293     public static final class BlackmanWindow extends OnnxOp {
 3294         public static final String NAME = "BlackmanWindow";
 3295 
 3296         public enum Attribute implements OnnxAttribute {
 3297             periodic(Long.class, true, 1),
 3298             output_datatype(Long.class, true, 1),
 3299             ;
 3300 
 3301                 final Class<?> t;
 3302                 final boolean optional;
 3303                 final Object defaultValue;
 3304 
 3305                 Attribute(Class<?> type, boolean optional, Object defaultValue) {
 3306                     this.t = type;
 3307                     this.optional = optional;
 3308                     this.defaultValue = defaultValue;
 3309                     assert optional || defaultValue == null;
 3310                 }
 3311 
 3312                 public Class<?> type() {
 3313                     return t;
 3314                 }
 3315 
 3316                 public boolean isOptional() {
 3317                     return optional;
 3318                 }
 3319 
 3320                 public Object defaultValue() {
 3321                     return defaultValue;
 3322                 }
 3323         }
 3324 
 3325         public enum TypeConstraint implements OnnxTypeConstraint {
 3326             T1(new OnnxType.TypeVariable("T1", List.of(OnnxType.tensor(OnnxType.int32()), OnnxType.tensor(OnnxType.int64())))),
 3327             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())))),
 3328             ;
 3329 
 3330             final OnnxType.TypeVariable typeVariable;
 3331 
 3332             TypeConstraint(OnnxType.TypeVariable typeVariable) {
 3333                 assert typeVariable.name().equals(name());
 3334                 this.typeVariable = typeVariable;
 3335             }
 3336 
 3337             @Override
 3338             public OnnxType.TypeVariable typeVariable() {
 3339                 return typeVariable;
 3340             }
 3341         }
 3342 
 3343         public enum InputParameter implements OnnxParameter {
 3344             size(TypeConstraint.T1.typeVariable(), Quantifier.REQUIRED),
 3345             ;
 3346 
 3347             final OnnxType type;
 3348             final Quantifier quantifier;
 3349 
 3350             InputParameter(OnnxType type, Quantifier quantifier) {
 3351                 this.type = type;
 3352                 this.quantifier = quantifier;
 3353             }
 3354 
 3355             @Override
 3356             public OnnxType type() {
 3357                 return type;
 3358             }
 3359 
 3360             @Override
 3361             public Quantifier quantifier() {
 3362                 return quantifier;
 3363             }
 3364         }
 3365 
 3366         public enum OutputParameter implements OnnxParameter {
 3367             output(TypeConstraint.T2.typeVariable(), Quantifier.REQUIRED),
 3368             ;
 3369 
 3370             final OnnxType type;
 3371             final Quantifier quantifier;
 3372 
 3373             OutputParameter(OnnxType type, Quantifier quantifier) {
 3374                 this.type = type;
 3375                 this.quantifier = quantifier;
 3376             }
 3377 
 3378             @Override
 3379             public OnnxType type() {
 3380                 return type;
 3381             }
 3382 
 3383             @Override
 3384             public Quantifier quantifier() {
 3385                 return quantifier;
 3386             }
 3387         }
 3388 
 3389         public static final OnnxSchema SCHEMA = new OnnxSchemaRecord(
 3390                 NAME,
 3391                 List.of(Attribute.values()),
 3392                 List.of(TypeConstraint.values()),
 3393                 List.of(InputParameter.values()),
 3394                 List.of(OutputParameter.values())
 3395         );
 3396 
 3397         public BlackmanWindow(ExternalizedOp def) {
 3398             super(SCHEMA, def);
 3399         }
 3400 
 3401         BlackmanWindow(BlackmanWindow that, CopyContext cc) {
 3402             super(that, cc);
 3403         }
 3404 
 3405         @Override
 3406         public BlackmanWindow transform(CopyContext cc, OpTransformer ot) {
 3407             return new BlackmanWindow(this, cc);
 3408         }
 3409 
 3410         BlackmanWindow(TypeElement resultType, Value size, java.util.Optional<Long> periodic, java.util.Optional<Long> output_datatype) {
 3411             super(SCHEMA, resultType, Set.of(), List.of(size), List.of(periodic, output_datatype));
 3412         }
 3413 
 3414         @Override
 3415         public SequencedSet<OnnxParameter> onnxOutputs() {
 3416             return onnxOutputs(SCHEMA);
 3417         }
 3418 
 3419         @Override
 3420         public SequencedMap<OnnxParameter, Object> onnxInputs() {
 3421             return onnxInputs(SCHEMA, List.of(size()));
 3422         }
 3423 
 3424         public Value size() {
 3425             return operands().get(0);
 3426         }
 3427 
 3428         public java.util.Optional<Long> periodic() {
 3429             Long periodic = Attribute.periodic.access(Long.class, onnxAttributes);
 3430             return java.util.Optional.ofNullable(periodic);
 3431         }
 3432 
 3433         public java.util.Optional<Long> output_datatype() {
 3434             Long output_datatype = Attribute.output_datatype.access(Long.class, onnxAttributes);
 3435             return java.util.Optional.ofNullable(output_datatype);
 3436         }
 3437 
 3438     }
 3439 
 3440     public static BlackmanWindow BlackmanWindow(TypeElement resultType, Value size, java.util.Optional<Long> periodic, java.util.Optional<Long> output_datatype) {
 3441         return new BlackmanWindow(resultType, size, periodic, output_datatype);
 3442     }
 3443 
 3444     @OpFactoryHelper.OpDeclaration(Cast.NAME)
 3445     public static final class Cast extends OnnxOp {
 3446         public static final String NAME = "Cast";
 3447 
 3448         public enum Attribute implements OnnxAttribute {
 3449             saturate(Long.class, true, 1),
 3450             to(Long.class, false, null),
 3451             ;
 3452 
 3453                 final Class<?> t;
 3454                 final boolean optional;
 3455                 final Object defaultValue;
 3456 
 3457                 Attribute(Class<?> type, boolean optional, Object defaultValue) {
 3458                     this.t = type;
 3459                     this.optional = optional;
 3460                     this.defaultValue = defaultValue;
 3461                     assert optional || defaultValue == null;
 3462                 }
 3463 
 3464                 public Class<?> type() {
 3465                     return t;
 3466                 }
 3467 
 3468                 public boolean isOptional() {
 3469                     return optional;
 3470                 }
 3471 
 3472                 public Object defaultValue() {
 3473                     return defaultValue;
 3474                 }
 3475         }
 3476 
 3477         public enum TypeConstraint implements OnnxTypeConstraint {
 3478             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())))),
 3479             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())))),
 3480             ;
 3481 
 3482             final OnnxType.TypeVariable typeVariable;
 3483 
 3484             TypeConstraint(OnnxType.TypeVariable typeVariable) {
 3485                 assert typeVariable.name().equals(name());
 3486                 this.typeVariable = typeVariable;
 3487             }
 3488 
 3489             @Override
 3490             public OnnxType.TypeVariable typeVariable() {
 3491                 return typeVariable;
 3492             }
 3493         }
 3494 
 3495         public enum InputParameter implements OnnxParameter {
 3496             input(TypeConstraint.T1.typeVariable(), Quantifier.REQUIRED),
 3497             ;
 3498 
 3499             final OnnxType type;
 3500             final Quantifier quantifier;
 3501 
 3502             InputParameter(OnnxType type, Quantifier quantifier) {
 3503                 this.type = type;
 3504                 this.quantifier = quantifier;
 3505             }
 3506 
 3507             @Override
 3508             public OnnxType type() {
 3509                 return type;
 3510             }
 3511 
 3512             @Override
 3513             public Quantifier quantifier() {
 3514                 return quantifier;
 3515             }
 3516         }
 3517 
 3518         public enum OutputParameter implements OnnxParameter {
 3519             output(TypeConstraint.T2.typeVariable(), Quantifier.REQUIRED),
 3520             ;
 3521 
 3522             final OnnxType type;
 3523             final Quantifier quantifier;
 3524 
 3525             OutputParameter(OnnxType type, Quantifier quantifier) {
 3526                 this.type = type;
 3527                 this.quantifier = quantifier;
 3528             }
 3529 
 3530             @Override
 3531             public OnnxType type() {
 3532                 return type;
 3533             }
 3534 
 3535             @Override
 3536             public Quantifier quantifier() {
 3537                 return quantifier;
 3538             }
 3539         }
 3540 
 3541         public static final OnnxSchema SCHEMA = new OnnxSchemaRecord(
 3542                 NAME,
 3543                 List.of(Attribute.values()),
 3544                 List.of(TypeConstraint.values()),
 3545                 List.of(InputParameter.values()),
 3546                 List.of(OutputParameter.values())
 3547         );
 3548 
 3549         public Cast(ExternalizedOp def) {
 3550             super(SCHEMA, def);
 3551         }
 3552 
 3553         Cast(Cast that, CopyContext cc) {
 3554             super(that, cc);
 3555         }
 3556 
 3557         @Override
 3558         public Cast transform(CopyContext cc, OpTransformer ot) {
 3559             return new Cast(this, cc);
 3560         }
 3561 
 3562         Cast(TypeElement resultType, Value input, java.util.Optional<Long> saturate, long to) {
 3563             super(SCHEMA, resultType, Set.of(), List.of(input), List.of(saturate, to));
 3564         }
 3565 
 3566         @Override
 3567         public SequencedSet<OnnxParameter> onnxOutputs() {
 3568             return onnxOutputs(SCHEMA);
 3569         }
 3570 
 3571         @Override
 3572         public SequencedMap<OnnxParameter, Object> onnxInputs() {
 3573             return onnxInputs(SCHEMA, List.of(input()));
 3574         }
 3575 
 3576         public Value input() {
 3577             return operands().get(0);
 3578         }
 3579 
 3580         public java.util.Optional<Long> saturate() {
 3581             Long saturate = Attribute.saturate.access(Long.class, onnxAttributes);
 3582             return java.util.Optional.ofNullable(saturate);
 3583         }
 3584 
 3585         public long to() {
 3586             long to = Attribute.to.access(Long.class, onnxAttributes);
 3587             return to;
 3588         }
 3589 
 3590     }
 3591 
 3592     public static Cast Cast(TypeElement resultType, Value input, java.util.Optional<Long> saturate, long to) {
 3593         return new Cast(resultType, input, saturate, to);
 3594     }
 3595 
 3596     @OpFactoryHelper.OpDeclaration(CastLike.NAME)
 3597     public static final class CastLike extends OnnxOp {
 3598         public static final String NAME = "CastLike";
 3599 
 3600         public enum Attribute implements OnnxAttribute {
 3601             saturate(Long.class, true, 1),
 3602             ;
 3603 
 3604                 final Class<?> t;
 3605                 final boolean optional;
 3606                 final Object defaultValue;
 3607 
 3608                 Attribute(Class<?> type, boolean optional, Object defaultValue) {
 3609                     this.t = type;
 3610                     this.optional = optional;
 3611                     this.defaultValue = defaultValue;
 3612                     assert optional || defaultValue == null;
 3613                 }
 3614 
 3615                 public Class<?> type() {
 3616                     return t;
 3617                 }
 3618 
 3619                 public boolean isOptional() {
 3620                     return optional;
 3621                 }
 3622 
 3623                 public Object defaultValue() {
 3624                     return defaultValue;
 3625                 }
 3626         }
 3627 
 3628         public enum TypeConstraint implements OnnxTypeConstraint {
 3629             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())))),
 3630             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())))),
 3631             ;
 3632 
 3633             final OnnxType.TypeVariable typeVariable;
 3634 
 3635             TypeConstraint(OnnxType.TypeVariable typeVariable) {
 3636                 assert typeVariable.name().equals(name());
 3637                 this.typeVariable = typeVariable;
 3638             }
 3639 
 3640             @Override
 3641             public OnnxType.TypeVariable typeVariable() {
 3642                 return typeVariable;
 3643             }
 3644         }
 3645 
 3646         public enum InputParameter implements OnnxParameter {
 3647             input(TypeConstraint.T1.typeVariable(), Quantifier.REQUIRED),
 3648             target_type(TypeConstraint.T2.typeVariable(), Quantifier.REQUIRED),
 3649             ;
 3650 
 3651             final OnnxType type;
 3652             final Quantifier quantifier;
 3653 
 3654             InputParameter(OnnxType type, Quantifier quantifier) {
 3655                 this.type = type;
 3656                 this.quantifier = quantifier;
 3657             }
 3658 
 3659             @Override
 3660             public OnnxType type() {
 3661                 return type;
 3662             }
 3663 
 3664             @Override
 3665             public Quantifier quantifier() {
 3666                 return quantifier;
 3667             }
 3668         }
 3669 
 3670         public enum OutputParameter implements OnnxParameter {
 3671             output(TypeConstraint.T2.typeVariable(), Quantifier.REQUIRED),
 3672             ;
 3673 
 3674             final OnnxType type;
 3675             final Quantifier quantifier;
 3676 
 3677             OutputParameter(OnnxType type, Quantifier quantifier) {
 3678                 this.type = type;
 3679                 this.quantifier = quantifier;
 3680             }
 3681 
 3682             @Override
 3683             public OnnxType type() {
 3684                 return type;
 3685             }
 3686 
 3687             @Override
 3688             public Quantifier quantifier() {
 3689                 return quantifier;
 3690             }
 3691         }
 3692 
 3693         public static final OnnxSchema SCHEMA = new OnnxSchemaRecord(
 3694                 NAME,
 3695                 List.of(Attribute.values()),
 3696                 List.of(TypeConstraint.values()),
 3697                 List.of(InputParameter.values()),
 3698                 List.of(OutputParameter.values())
 3699         );
 3700 
 3701         public CastLike(ExternalizedOp def) {
 3702             super(SCHEMA, def);
 3703         }
 3704 
 3705         CastLike(CastLike that, CopyContext cc) {
 3706             super(that, cc);
 3707         }
 3708 
 3709         @Override
 3710         public CastLike transform(CopyContext cc, OpTransformer ot) {
 3711             return new CastLike(this, cc);
 3712         }
 3713 
 3714         CastLike(TypeElement resultType, Value input, Value target_type, java.util.Optional<Long> saturate) {
 3715             super(SCHEMA, resultType, Set.of(), List.of(input, target_type), List.of(saturate));
 3716         }
 3717 
 3718         @Override
 3719         public SequencedSet<OnnxParameter> onnxOutputs() {
 3720             return onnxOutputs(SCHEMA);
 3721         }
 3722 
 3723         @Override
 3724         public SequencedMap<OnnxParameter, Object> onnxInputs() {
 3725             return onnxInputs(SCHEMA, List.of(input(), target_type()));
 3726         }
 3727 
 3728         public Value input() {
 3729             return operands().get(0);
 3730         }
 3731 
 3732         public Value target_type() {
 3733             return operands().get(1);
 3734         }
 3735 
 3736         public java.util.Optional<Long> saturate() {
 3737             Long saturate = Attribute.saturate.access(Long.class, onnxAttributes);
 3738             return java.util.Optional.ofNullable(saturate);
 3739         }
 3740 
 3741     }
 3742 
 3743     public static CastLike CastLike(TypeElement resultType, Value input, Value target_type, java.util.Optional<Long> saturate) {
 3744         return new CastLike(resultType, input, target_type, saturate);
 3745     }
 3746 
 3747     @OpFactoryHelper.OpDeclaration(CastMap.NAME)
 3748     public static final class CastMap extends OnnxOp {
 3749         public static final String NAME = "CastMap";
 3750 
 3751         public enum Attribute implements OnnxAttribute {
 3752             map_form(String.class, true, "DENSE"),
 3753             cast_to(String.class, true, "TO_FLOAT"),
 3754             max_map(Long.class, true, 1),
 3755             ;
 3756 
 3757                 final Class<?> t;
 3758                 final boolean optional;
 3759                 final Object defaultValue;
 3760 
 3761                 Attribute(Class<?> type, boolean optional, Object defaultValue) {
 3762                     this.t = type;
 3763                     this.optional = optional;
 3764                     this.defaultValue = defaultValue;
 3765                     assert optional || defaultValue == null;
 3766                 }
 3767 
 3768                 public Class<?> type() {
 3769                     return t;
 3770                 }
 3771 
 3772                 public boolean isOptional() {
 3773                     return optional;
 3774                 }
 3775 
 3776                 public Object defaultValue() {
 3777                     return defaultValue;
 3778                 }
 3779         }
 3780 
 3781         public enum TypeConstraint implements OnnxTypeConstraint {
 3782             T1(new OnnxType.TypeVariable("T1", List.of(OnnxType.map(OnnxType.int64(), OnnxType.string()), OnnxType.map(OnnxType.int64(), OnnxType.float32())))),
 3783             T2(new OnnxType.TypeVariable("T2", List.of(OnnxType.tensor(OnnxType.string()), OnnxType.tensor(OnnxType.float32()), OnnxType.tensor(OnnxType.int64())))),
 3784             ;
 3785 
 3786             final OnnxType.TypeVariable typeVariable;
 3787 
 3788             TypeConstraint(OnnxType.TypeVariable typeVariable) {
 3789                 assert typeVariable.name().equals(name());
 3790                 this.typeVariable = typeVariable;
 3791             }
 3792 
 3793             @Override
 3794             public OnnxType.TypeVariable typeVariable() {
 3795                 return typeVariable;
 3796             }
 3797         }
 3798 
 3799         public enum InputParameter implements OnnxParameter {
 3800             X(TypeConstraint.T1.typeVariable(), Quantifier.REQUIRED),
 3801             ;
 3802 
 3803             final OnnxType type;
 3804             final Quantifier quantifier;
 3805 
 3806             InputParameter(OnnxType type, Quantifier quantifier) {
 3807                 this.type = type;
 3808                 this.quantifier = quantifier;
 3809             }
 3810 
 3811             @Override
 3812             public OnnxType type() {
 3813                 return type;
 3814             }
 3815 
 3816             @Override
 3817             public Quantifier quantifier() {
 3818                 return quantifier;
 3819             }
 3820         }
 3821 
 3822         public enum OutputParameter implements OnnxParameter {
 3823             Y(TypeConstraint.T2.typeVariable(), Quantifier.REQUIRED),
 3824             ;
 3825 
 3826             final OnnxType type;
 3827             final Quantifier quantifier;
 3828 
 3829             OutputParameter(OnnxType type, Quantifier quantifier) {
 3830                 this.type = type;
 3831                 this.quantifier = quantifier;
 3832             }
 3833 
 3834             @Override
 3835             public OnnxType type() {
 3836                 return type;
 3837             }
 3838 
 3839             @Override
 3840             public Quantifier quantifier() {
 3841                 return quantifier;
 3842             }
 3843         }
 3844 
 3845         public static final OnnxSchema SCHEMA = new OnnxSchemaRecord(
 3846                 NAME,
 3847                 List.of(Attribute.values()),
 3848                 List.of(TypeConstraint.values()),
 3849                 List.of(InputParameter.values()),
 3850                 List.of(OutputParameter.values())
 3851         );
 3852 
 3853         public CastMap(ExternalizedOp def) {
 3854             super(SCHEMA, def);
 3855         }
 3856 
 3857         CastMap(CastMap that, CopyContext cc) {
 3858             super(that, cc);
 3859         }
 3860 
 3861         @Override
 3862         public CastMap transform(CopyContext cc, OpTransformer ot) {
 3863             return new CastMap(this, cc);
 3864         }
 3865 
 3866         CastMap(TypeElement resultType, Value X, java.util.Optional<String> map_form, java.util.Optional<String> cast_to, java.util.Optional<Long> max_map) {
 3867             super(SCHEMA, resultType, Set.of(), List.of(X), List.of(map_form, cast_to, max_map));
 3868         }
 3869 
 3870         @Override
 3871         public SequencedSet<OnnxParameter> onnxOutputs() {
 3872             return onnxOutputs(SCHEMA);
 3873         }
 3874 
 3875         @Override
 3876         public SequencedMap<OnnxParameter, Object> onnxInputs() {
 3877             return onnxInputs(SCHEMA, List.of(X()));
 3878         }
 3879 
 3880         public Value X() {
 3881             return operands().get(0);
 3882         }
 3883 
 3884         public java.util.Optional<String> map_form() {
 3885             String map_form = Attribute.map_form.access(String.class, onnxAttributes);
 3886             return java.util.Optional.ofNullable(map_form);
 3887         }
 3888 
 3889         public java.util.Optional<String> cast_to() {
 3890             String cast_to = Attribute.cast_to.access(String.class, onnxAttributes);
 3891             return java.util.Optional.ofNullable(cast_to);
 3892         }
 3893 
 3894         public java.util.Optional<Long> max_map() {
 3895             Long max_map = Attribute.max_map.access(Long.class, onnxAttributes);
 3896             return java.util.Optional.ofNullable(max_map);
 3897         }
 3898 
 3899     }
 3900 
 3901     public static CastMap CastMap(TypeElement resultType, Value X, java.util.Optional<String> map_form, java.util.Optional<String> cast_to, java.util.Optional<Long> max_map) {
 3902         return new CastMap(resultType, X, map_form, cast_to, max_map);
 3903     }
 3904 
 3905     @OpFactoryHelper.OpDeclaration(CategoryMapper.NAME)
 3906     public static final class CategoryMapper extends OnnxOp {
 3907         public static final String NAME = "CategoryMapper";
 3908 
 3909         public enum Attribute implements OnnxAttribute {
 3910             cats_int64s(long[].class, true, null),
 3911             cats_strings(String[].class, true, null),
 3912             default_int64(Long.class, true, -1),
 3913             default_string(String.class, true, "_Unused"),
 3914             ;
 3915 
 3916                 final Class<?> t;
 3917                 final boolean optional;
 3918                 final Object defaultValue;
 3919 
 3920                 Attribute(Class<?> type, boolean optional, Object defaultValue) {
 3921                     this.t = type;
 3922                     this.optional = optional;
 3923                     this.defaultValue = defaultValue;
 3924                     assert optional || defaultValue == null;
 3925                 }
 3926 
 3927                 public Class<?> type() {
 3928                     return t;
 3929                 }
 3930 
 3931                 public boolean isOptional() {
 3932                     return optional;
 3933                 }
 3934 
 3935                 public Object defaultValue() {
 3936                     return defaultValue;
 3937                 }
 3938         }
 3939 
 3940         public enum TypeConstraint implements OnnxTypeConstraint {
 3941             T1(new OnnxType.TypeVariable("T1", List.of(OnnxType.tensor(OnnxType.string()), OnnxType.tensor(OnnxType.int64())))),
 3942             T2(new OnnxType.TypeVariable("T2", List.of(OnnxType.tensor(OnnxType.string()), OnnxType.tensor(OnnxType.int64())))),
 3943             ;
 3944 
 3945             final OnnxType.TypeVariable typeVariable;
 3946 
 3947             TypeConstraint(OnnxType.TypeVariable typeVariable) {
 3948                 assert typeVariable.name().equals(name());
 3949                 this.typeVariable = typeVariable;
 3950             }
 3951 
 3952             @Override
 3953             public OnnxType.TypeVariable typeVariable() {
 3954                 return typeVariable;
 3955             }
 3956         }
 3957 
 3958         public enum InputParameter implements OnnxParameter {
 3959             X(TypeConstraint.T1.typeVariable(), Quantifier.REQUIRED),
 3960             ;
 3961 
 3962             final OnnxType type;
 3963             final Quantifier quantifier;
 3964 
 3965             InputParameter(OnnxType type, Quantifier quantifier) {
 3966                 this.type = type;
 3967                 this.quantifier = quantifier;
 3968             }
 3969 
 3970             @Override
 3971             public OnnxType type() {
 3972                 return type;
 3973             }
 3974 
 3975             @Override
 3976             public Quantifier quantifier() {
 3977                 return quantifier;
 3978             }
 3979         }
 3980 
 3981         public enum OutputParameter implements OnnxParameter {
 3982             Y(TypeConstraint.T2.typeVariable(), Quantifier.REQUIRED),
 3983             ;
 3984 
 3985             final OnnxType type;
 3986             final Quantifier quantifier;
 3987 
 3988             OutputParameter(OnnxType type, Quantifier quantifier) {
 3989                 this.type = type;
 3990                 this.quantifier = quantifier;
 3991             }
 3992 
 3993             @Override
 3994             public OnnxType type() {
 3995                 return type;
 3996             }
 3997 
 3998             @Override
 3999             public Quantifier quantifier() {
 4000                 return quantifier;
 4001             }
 4002         }
 4003 
 4004         public static final OnnxSchema SCHEMA = new OnnxSchemaRecord(
 4005                 NAME,
 4006                 List.of(Attribute.values()),
 4007                 List.of(TypeConstraint.values()),
 4008                 List.of(InputParameter.values()),
 4009                 List.of(OutputParameter.values())
 4010         );
 4011 
 4012         public CategoryMapper(ExternalizedOp def) {
 4013             super(SCHEMA, def);
 4014         }
 4015 
 4016         CategoryMapper(CategoryMapper that, CopyContext cc) {
 4017             super(that, cc);
 4018         }
 4019 
 4020         @Override
 4021         public CategoryMapper transform(CopyContext cc, OpTransformer ot) {
 4022             return new CategoryMapper(this, cc);
 4023         }
 4024 
 4025         CategoryMapper(TypeElement resultType, Value X, java.util.Optional<long[]> cats_int64s, java.util.Optional<String[]> cats_strings, java.util.Optional<Long> default_int64, java.util.Optional<String> default_string) {
 4026             super(SCHEMA, resultType, Set.of(), List.of(X), List.of(cats_int64s, cats_strings, default_int64, default_string));
 4027         }
 4028 
 4029         @Override
 4030         public SequencedSet<OnnxParameter> onnxOutputs() {
 4031             return onnxOutputs(SCHEMA);
 4032         }
 4033 
 4034         @Override
 4035         public SequencedMap<OnnxParameter, Object> onnxInputs() {
 4036             return onnxInputs(SCHEMA, List.of(X()));
 4037         }
 4038 
 4039         public Value X() {
 4040             return operands().get(0);
 4041         }
 4042 
 4043         public java.util.Optional<long[]> cats_int64s() {
 4044             long[] cats_int64s = Attribute.cats_int64s.access(long[].class, onnxAttributes);
 4045             return java.util.Optional.ofNullable(cats_int64s).map(long[]::clone);
 4046         }
 4047 
 4048         public java.util.Optional<String[]> cats_strings() {
 4049             String[] cats_strings = Attribute.cats_strings.access(String[].class, onnxAttributes);
 4050             return java.util.Optional.ofNullable(cats_strings).map(String[]::clone);
 4051         }
 4052 
 4053         public java.util.Optional<Long> default_int64() {
 4054             Long default_int64 = Attribute.default_int64.access(Long.class, onnxAttributes);
 4055             return java.util.Optional.ofNullable(default_int64);
 4056         }
 4057 
 4058         public java.util.Optional<String> default_string() {
 4059             String default_string = Attribute.default_string.access(String.class, onnxAttributes);
 4060             return java.util.Optional.ofNullable(default_string);
 4061         }
 4062 
 4063     }
 4064 
 4065     public static CategoryMapper CategoryMapper(TypeElement resultType, Value X, java.util.Optional<long[]> cats_int64s, java.util.Optional<String[]> cats_strings, java.util.Optional<Long> default_int64, java.util.Optional<String> default_string) {
 4066         return new CategoryMapper(resultType, X, cats_int64s, cats_strings, default_int64, default_string);
 4067     }
 4068 
 4069     @OpFactoryHelper.OpDeclaration(Ceil.NAME)
 4070     public static final class Ceil extends OnnxOp {
 4071         public static final String NAME = "Ceil";
 4072 
 4073         public enum Attribute implements OnnxAttribute.None { }
 4074 
 4075         public enum TypeConstraint implements OnnxTypeConstraint {
 4076             T(new OnnxType.TypeVariable("T", List.of(OnnxType.tensor(OnnxType.float16()), OnnxType.tensor(OnnxType.float32()), OnnxType.tensor(OnnxType.float64()), OnnxType.tensor(OnnxType.bfloat16())))),
 4077             ;
 4078 
 4079             final OnnxType.TypeVariable typeVariable;
 4080 
 4081             TypeConstraint(OnnxType.TypeVariable typeVariable) {
 4082                 assert typeVariable.name().equals(name());
 4083                 this.typeVariable = typeVariable;
 4084             }
 4085 
 4086             @Override
 4087             public OnnxType.TypeVariable typeVariable() {
 4088                 return typeVariable;
 4089             }
 4090         }
 4091 
 4092         public enum InputParameter implements OnnxParameter {
 4093             X(TypeConstraint.T.typeVariable(), Quantifier.REQUIRED),
 4094             ;
 4095 
 4096             final OnnxType type;
 4097             final Quantifier quantifier;
 4098 
 4099             InputParameter(OnnxType type, Quantifier quantifier) {
 4100                 this.type = type;
 4101                 this.quantifier = quantifier;
 4102             }
 4103 
 4104             @Override
 4105             public OnnxType type() {
 4106                 return type;
 4107             }
 4108 
 4109             @Override
 4110             public Quantifier quantifier() {
 4111                 return quantifier;
 4112             }
 4113         }
 4114 
 4115         public enum OutputParameter implements OnnxParameter {
 4116             Y(TypeConstraint.T.typeVariable(), Quantifier.REQUIRED),
 4117             ;
 4118 
 4119             final OnnxType type;
 4120             final Quantifier quantifier;
 4121 
 4122             OutputParameter(OnnxType type, Quantifier quantifier) {
 4123                 this.type = type;
 4124                 this.quantifier = quantifier;
 4125             }
 4126 
 4127             @Override
 4128             public OnnxType type() {
 4129                 return type;
 4130             }
 4131 
 4132             @Override
 4133             public Quantifier quantifier() {
 4134                 return quantifier;
 4135             }
 4136         }
 4137 
 4138         public static final OnnxSchema SCHEMA = new OnnxSchemaRecord(
 4139                 NAME,
 4140                 List.of(Attribute.values()),
 4141                 List.of(TypeConstraint.values()),
 4142                 List.of(InputParameter.values()),
 4143                 List.of(OutputParameter.values())
 4144         );
 4145 
 4146         public Ceil(ExternalizedOp def) {
 4147             super(SCHEMA, def);
 4148         }
 4149 
 4150         Ceil(Ceil that, CopyContext cc) {
 4151             super(that, cc);
 4152         }
 4153 
 4154         @Override
 4155         public Ceil transform(CopyContext cc, OpTransformer ot) {
 4156             return new Ceil(this, cc);
 4157         }
 4158 
 4159         Ceil(TypeElement resultType, Value X) {
 4160             super(SCHEMA, resultType, Set.of(), List.of(X), List.of());
 4161         }
 4162 
 4163         @Override
 4164         public SequencedSet<OnnxParameter> onnxOutputs() {
 4165             return onnxOutputs(SCHEMA);
 4166         }
 4167 
 4168         @Override
 4169         public SequencedMap<OnnxParameter, Object> onnxInputs() {
 4170             return onnxInputs(SCHEMA, List.of(X()));
 4171         }
 4172 
 4173         public Value X() {
 4174             return operands().get(0);
 4175         }
 4176 
 4177     }
 4178 
 4179     public static Ceil Ceil(TypeElement resultType, Value X) {
 4180         return new Ceil(resultType, X);
 4181     }
 4182 
 4183     @OpFactoryHelper.OpDeclaration(Celu.NAME)
 4184     public static final class Celu extends OnnxOp {
 4185         public static final String NAME = "Celu";
 4186 
 4187         public enum Attribute implements OnnxAttribute {
 4188             alpha(Float.class, true, 1.0f),
 4189             ;
 4190 
 4191                 final Class<?> t;
 4192                 final boolean optional;
 4193                 final Object defaultValue;
 4194 
 4195                 Attribute(Class<?> type, boolean optional, Object defaultValue) {
 4196                     this.t = type;
 4197                     this.optional = optional;
 4198                     this.defaultValue = defaultValue;
 4199                     assert optional || defaultValue == null;
 4200                 }
 4201 
 4202                 public Class<?> type() {
 4203                     return t;
 4204                 }
 4205 
 4206                 public boolean isOptional() {
 4207                     return optional;
 4208                 }
 4209 
 4210                 public Object defaultValue() {
 4211                     return defaultValue;
 4212                 }
 4213         }
 4214 
 4215         public enum TypeConstraint implements OnnxTypeConstraint {
 4216             T(new OnnxType.TypeVariable("T", List.of(OnnxType.tensor(OnnxType.float32())))),
 4217             ;
 4218 
 4219             final OnnxType.TypeVariable typeVariable;
 4220 
 4221             TypeConstraint(OnnxType.TypeVariable typeVariable) {
 4222                 assert typeVariable.name().equals(name());
 4223                 this.typeVariable = typeVariable;
 4224             }
 4225 
 4226             @Override
 4227             public OnnxType.TypeVariable typeVariable() {
 4228                 return typeVariable;
 4229             }
 4230         }
 4231 
 4232         public enum InputParameter implements OnnxParameter {
 4233             X(TypeConstraint.T.typeVariable(), Quantifier.REQUIRED),
 4234             ;
 4235 
 4236             final OnnxType type;
 4237             final Quantifier quantifier;
 4238 
 4239             InputParameter(OnnxType type, Quantifier quantifier) {
 4240                 this.type = type;
 4241                 this.quantifier = quantifier;
 4242             }
 4243 
 4244             @Override
 4245             public OnnxType type() {
 4246                 return type;
 4247             }
 4248 
 4249             @Override
 4250             public Quantifier quantifier() {
 4251                 return quantifier;
 4252             }
 4253         }
 4254 
 4255         public enum OutputParameter implements OnnxParameter {
 4256             Y(TypeConstraint.T.typeVariable(), Quantifier.REQUIRED),
 4257             ;
 4258 
 4259             final OnnxType type;
 4260             final Quantifier quantifier;
 4261 
 4262             OutputParameter(OnnxType type, Quantifier quantifier) {
 4263                 this.type = type;
 4264                 this.quantifier = quantifier;
 4265             }
 4266 
 4267             @Override
 4268             public OnnxType type() {
 4269                 return type;
 4270             }
 4271 
 4272             @Override
 4273             public Quantifier quantifier() {
 4274                 return quantifier;
 4275             }
 4276         }
 4277 
 4278         public static final OnnxSchema SCHEMA = new OnnxSchemaRecord(
 4279                 NAME,
 4280                 List.of(Attribute.values()),
 4281                 List.of(TypeConstraint.values()),
 4282                 List.of(InputParameter.values()),
 4283                 List.of(OutputParameter.values())
 4284         );
 4285 
 4286         public Celu(ExternalizedOp def) {
 4287             super(SCHEMA, def);
 4288         }
 4289 
 4290         Celu(Celu that, CopyContext cc) {
 4291             super(that, cc);
 4292         }
 4293 
 4294         @Override
 4295         public Celu transform(CopyContext cc, OpTransformer ot) {
 4296             return new Celu(this, cc);
 4297         }
 4298 
 4299         Celu(TypeElement resultType, Value X, java.util.Optional<Float> alpha) {
 4300             super(SCHEMA, resultType, Set.of(), List.of(X), List.of(alpha));
 4301         }
 4302 
 4303         @Override
 4304         public SequencedSet<OnnxParameter> onnxOutputs() {
 4305             return onnxOutputs(SCHEMA);
 4306         }
 4307 
 4308         @Override
 4309         public SequencedMap<OnnxParameter, Object> onnxInputs() {
 4310             return onnxInputs(SCHEMA, List.of(X()));
 4311         }
 4312 
 4313         public Value X() {
 4314             return operands().get(0);
 4315         }
 4316 
 4317         public java.util.Optional<Float> alpha() {
 4318             Float alpha = Attribute.alpha.access(Float.class, onnxAttributes);
 4319             return java.util.Optional.ofNullable(alpha);
 4320         }
 4321 
 4322     }
 4323 
 4324     public static Celu Celu(TypeElement resultType, Value X, java.util.Optional<Float> alpha) {
 4325         return new Celu(resultType, X, alpha);
 4326     }
 4327 
 4328     @OpFactoryHelper.OpDeclaration(CenterCropPad.NAME)
 4329     public static final class CenterCropPad extends OnnxOp {
 4330         public static final String NAME = "CenterCropPad";
 4331 
 4332         public enum Attribute implements OnnxAttribute {
 4333             axes(long[].class, true, null),
 4334             ;
 4335 
 4336                 final Class<?> t;
 4337                 final boolean optional;
 4338                 final Object defaultValue;
 4339 
 4340                 Attribute(Class<?> type, boolean optional, Object defaultValue) {
 4341                     this.t = type;
 4342                     this.optional = optional;
 4343                     this.defaultValue = defaultValue;
 4344                     assert optional || defaultValue == null;
 4345                 }
 4346 
 4347                 public Class<?> type() {
 4348                     return t;
 4349                 }
 4350 
 4351                 public boolean isOptional() {
 4352                     return optional;
 4353                 }
 4354 
 4355                 public Object defaultValue() {
 4356                     return defaultValue;
 4357                 }
 4358         }
 4359 
 4360         public enum TypeConstraint implements OnnxTypeConstraint {
 4361             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())))),
 4362             Tind(new OnnxType.TypeVariable("Tind", List.of(OnnxType.tensor(OnnxType.int32()), OnnxType.tensor(OnnxType.int64())))),
 4363             ;
 4364 
 4365             final OnnxType.TypeVariable typeVariable;
 4366 
 4367             TypeConstraint(OnnxType.TypeVariable typeVariable) {
 4368                 assert typeVariable.name().equals(name());
 4369                 this.typeVariable = typeVariable;
 4370             }
 4371 
 4372             @Override
 4373             public OnnxType.TypeVariable typeVariable() {
 4374                 return typeVariable;
 4375             }
 4376         }
 4377 
 4378         public enum InputParameter implements OnnxParameter {
 4379             input_data(TypeConstraint.T.typeVariable(), Quantifier.REQUIRED),
 4380             shape(TypeConstraint.Tind.typeVariable(), Quantifier.REQUIRED),
 4381             ;
 4382 
 4383             final OnnxType type;
 4384             final Quantifier quantifier;
 4385 
 4386             InputParameter(OnnxType type, Quantifier quantifier) {
 4387                 this.type = type;
 4388                 this.quantifier = quantifier;
 4389             }
 4390 
 4391             @Override
 4392             public OnnxType type() {
 4393                 return type;
 4394             }
 4395 
 4396             @Override
 4397             public Quantifier quantifier() {
 4398                 return quantifier;
 4399             }
 4400         }
 4401 
 4402         public enum OutputParameter implements OnnxParameter {
 4403             output_data(TypeConstraint.T.typeVariable(), Quantifier.REQUIRED),
 4404             ;
 4405 
 4406             final OnnxType type;
 4407             final Quantifier quantifier;
 4408 
 4409             OutputParameter(OnnxType type, Quantifier quantifier) {
 4410                 this.type = type;
 4411                 this.quantifier = quantifier;
 4412             }
 4413 
 4414             @Override
 4415             public OnnxType type() {
 4416                 return type;
 4417             }
 4418 
 4419             @Override
 4420             public Quantifier quantifier() {
 4421                 return quantifier;
 4422             }
 4423         }
 4424 
 4425         public static final OnnxSchema SCHEMA = new OnnxSchemaRecord(
 4426                 NAME,
 4427                 List.of(Attribute.values()),
 4428                 List.of(TypeConstraint.values()),
 4429                 List.of(InputParameter.values()),
 4430                 List.of(OutputParameter.values())
 4431         );
 4432 
 4433         public CenterCropPad(ExternalizedOp def) {
 4434             super(SCHEMA, def);
 4435         }
 4436 
 4437         CenterCropPad(CenterCropPad that, CopyContext cc) {
 4438             super(that, cc);
 4439         }
 4440 
 4441         @Override
 4442         public CenterCropPad transform(CopyContext cc, OpTransformer ot) {
 4443             return new CenterCropPad(this, cc);
 4444         }
 4445 
 4446         CenterCropPad(TypeElement resultType, Value input_data, Value shape, java.util.Optional<long[]> axes) {
 4447             super(SCHEMA, resultType, Set.of(), List.of(input_data, shape), List.of(axes));
 4448         }
 4449 
 4450         @Override
 4451         public SequencedSet<OnnxParameter> onnxOutputs() {
 4452             return onnxOutputs(SCHEMA);
 4453         }
 4454 
 4455         @Override
 4456         public SequencedMap<OnnxParameter, Object> onnxInputs() {
 4457             return onnxInputs(SCHEMA, List.of(input_data(), shape()));
 4458         }
 4459 
 4460         public Value input_data() {
 4461             return operands().get(0);
 4462         }
 4463 
 4464         public Value shape() {
 4465             return operands().get(1);
 4466         }
 4467 
 4468         public java.util.Optional<long[]> axes() {
 4469             long[] axes = Attribute.axes.access(long[].class, onnxAttributes);
 4470             return java.util.Optional.ofNullable(axes).map(long[]::clone);
 4471         }
 4472 
 4473     }
 4474 
 4475     public static CenterCropPad CenterCropPad(TypeElement resultType, Value input_data, Value shape, java.util.Optional<long[]> axes) {
 4476         return new CenterCropPad(resultType, input_data, shape, axes);
 4477     }
 4478 
 4479     @OpFactoryHelper.OpDeclaration(Clip.NAME)
 4480     public static final class Clip extends OnnxOp {
 4481         public static final String NAME = "Clip";
 4482 
 4483         public enum Attribute implements OnnxAttribute.None { }
 4484 
 4485         public enum TypeConstraint implements OnnxTypeConstraint {
 4486             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())))),
 4487             ;
 4488 
 4489             final OnnxType.TypeVariable typeVariable;
 4490 
 4491             TypeConstraint(OnnxType.TypeVariable typeVariable) {
 4492                 assert typeVariable.name().equals(name());
 4493                 this.typeVariable = typeVariable;
 4494             }
 4495 
 4496             @Override
 4497             public OnnxType.TypeVariable typeVariable() {
 4498                 return typeVariable;
 4499             }
 4500         }
 4501 
 4502         public enum InputParameter implements OnnxParameter {
 4503             input(TypeConstraint.T.typeVariable(), Quantifier.REQUIRED),
 4504             min(TypeConstraint.T.typeVariable(), Quantifier.OPTIONAL),
 4505             max(TypeConstraint.T.typeVariable(), Quantifier.OPTIONAL),
 4506             ;
 4507 
 4508             final OnnxType type;
 4509             final Quantifier quantifier;
 4510 
 4511             InputParameter(OnnxType type, Quantifier quantifier) {
 4512                 this.type = type;
 4513                 this.quantifier = quantifier;
 4514             }
 4515 
 4516             @Override
 4517             public OnnxType type() {
 4518                 return type;
 4519             }
 4520 
 4521             @Override
 4522             public Quantifier quantifier() {
 4523                 return quantifier;
 4524             }
 4525         }
 4526 
 4527         public enum OutputParameter implements OnnxParameter {
 4528             output(TypeConstraint.T.typeVariable(), Quantifier.REQUIRED),
 4529             ;
 4530 
 4531             final OnnxType type;
 4532             final Quantifier quantifier;
 4533 
 4534             OutputParameter(OnnxType type, Quantifier quantifier) {
 4535                 this.type = type;
 4536                 this.quantifier = quantifier;
 4537             }
 4538 
 4539             @Override
 4540             public OnnxType type() {
 4541                 return type;
 4542             }
 4543 
 4544             @Override
 4545             public Quantifier quantifier() {
 4546                 return quantifier;
 4547             }
 4548         }
 4549 
 4550         public static final OnnxSchema SCHEMA = new OnnxSchemaRecord(
 4551                 NAME,
 4552                 List.of(Attribute.values()),
 4553                 List.of(TypeConstraint.values()),
 4554                 List.of(InputParameter.values()),
 4555                 List.of(OutputParameter.values())
 4556         );
 4557 
 4558         public Clip(ExternalizedOp def) {
 4559             super(SCHEMA, def);
 4560         }
 4561 
 4562         Clip(Clip that, CopyContext cc) {
 4563             super(that, cc);
 4564         }
 4565 
 4566         @Override
 4567         public Clip transform(CopyContext cc, OpTransformer ot) {
 4568             return new Clip(this, cc);
 4569         }
 4570 
 4571         Clip(TypeElement resultType, Value input, java.util.Optional<Value> min, java.util.Optional<Value> max) {
 4572             super(SCHEMA, resultType, Set.of(), List.of(input, min, max), List.of());
 4573         }
 4574 
 4575         @Override
 4576         public SequencedSet<OnnxParameter> onnxOutputs() {
 4577             return onnxOutputs(SCHEMA);
 4578         }
 4579 
 4580         @Override
 4581         public SequencedMap<OnnxParameter, Object> onnxInputs() {
 4582             return onnxInputs(SCHEMA, List.of(input(), min(), max()));
 4583         }
 4584 
 4585         public Value input() {
 4586             return operands().get(0);
 4587         }
 4588 
 4589         public java.util.Optional<Value> min() {
 4590             int i = optionalInputArguments.indexOf(InputParameter.min);
 4591             return i != -1 ? java.util.Optional.of(operands().get(1 + i)) : java.util.Optional.empty();
 4592         }
 4593 
 4594         public java.util.Optional<Value> max() {
 4595             int i = optionalInputArguments.indexOf(InputParameter.max);
 4596             return i != -1 ? java.util.Optional.of(operands().get(1 + i)) : java.util.Optional.empty();
 4597         }
 4598 
 4599     }
 4600 
 4601     public static Clip Clip(TypeElement resultType, Value input, java.util.Optional<Value> min, java.util.Optional<Value> max) {
 4602         return new Clip(resultType, input, min, max);
 4603     }
 4604 
 4605     @OpFactoryHelper.OpDeclaration(Col2Im.NAME)
 4606     public static final class Col2Im extends OnnxOp {
 4607         public static final String NAME = "Col2Im";
 4608 
 4609         public enum Attribute implements OnnxAttribute {
 4610             pads(long[].class, true, null),
 4611             dilations(long[].class, true, null),
 4612             strides(long[].class, true, null),
 4613             ;
 4614 
 4615                 final Class<?> t;
 4616                 final boolean optional;
 4617                 final Object defaultValue;
 4618 
 4619                 Attribute(Class<?> type, boolean optional, Object defaultValue) {
 4620                     this.t = type;
 4621                     this.optional = optional;
 4622                     this.defaultValue = defaultValue;
 4623                     assert optional || defaultValue == null;
 4624                 }
 4625 
 4626                 public Class<?> type() {
 4627                     return t;
 4628                 }
 4629 
 4630                 public boolean isOptional() {
 4631                     return optional;
 4632                 }
 4633 
 4634                 public Object defaultValue() {
 4635                     return defaultValue;
 4636                 }
 4637         }
 4638 
 4639         public enum TypeConstraint implements OnnxTypeConstraint {
 4640             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())))),
 4641             ;
 4642 
 4643             final OnnxType.TypeVariable typeVariable;
 4644 
 4645             TypeConstraint(OnnxType.TypeVariable typeVariable) {
 4646                 assert typeVariable.name().equals(name());
 4647                 this.typeVariable = typeVariable;
 4648             }
 4649 
 4650             @Override
 4651             public OnnxType.TypeVariable typeVariable() {
 4652                 return typeVariable;
 4653             }
 4654         }
 4655 
 4656         public enum InputParameter implements OnnxParameter {
 4657             input(TypeConstraint.T.typeVariable(), Quantifier.REQUIRED),
 4658             image_shape(OnnxType.tensor(OnnxType.int64()), Quantifier.REQUIRED),
 4659             block_shape(OnnxType.tensor(OnnxType.int64()), Quantifier.REQUIRED),
 4660             ;
 4661 
 4662             final OnnxType type;
 4663             final Quantifier quantifier;
 4664 
 4665             InputParameter(OnnxType type, Quantifier quantifier) {
 4666                 this.type = type;
 4667                 this.quantifier = quantifier;
 4668             }
 4669 
 4670             @Override
 4671             public OnnxType type() {
 4672                 return type;
 4673             }
 4674 
 4675             @Override
 4676             public Quantifier quantifier() {
 4677                 return quantifier;
 4678             }
 4679         }
 4680 
 4681         public enum OutputParameter implements OnnxParameter {
 4682             output(TypeConstraint.T.typeVariable(), Quantifier.REQUIRED),
 4683             ;
 4684 
 4685             final OnnxType type;
 4686             final Quantifier quantifier;
 4687 
 4688             OutputParameter(OnnxType type, Quantifier quantifier) {
 4689                 this.type = type;
 4690                 this.quantifier = quantifier;
 4691             }
 4692 
 4693             @Override
 4694             public OnnxType type() {
 4695                 return type;
 4696             }
 4697 
 4698             @Override
 4699             public Quantifier quantifier() {
 4700                 return quantifier;
 4701             }
 4702         }
 4703 
 4704         public static final OnnxSchema SCHEMA = new OnnxSchemaRecord(
 4705                 NAME,
 4706                 List.of(Attribute.values()),
 4707                 List.of(TypeConstraint.values()),
 4708                 List.of(InputParameter.values()),
 4709                 List.of(OutputParameter.values())
 4710         );
 4711 
 4712         public Col2Im(ExternalizedOp def) {
 4713             super(SCHEMA, def);
 4714         }
 4715 
 4716         Col2Im(Col2Im that, CopyContext cc) {
 4717             super(that, cc);
 4718         }
 4719 
 4720         @Override
 4721         public Col2Im transform(CopyContext cc, OpTransformer ot) {
 4722             return new Col2Im(this, cc);
 4723         }
 4724 
 4725         Col2Im(TypeElement resultType, Value input, Value image_shape, Value block_shape, java.util.Optional<long[]> pads, java.util.Optional<long[]> dilations, java.util.Optional<long[]> strides) {
 4726             super(SCHEMA, resultType, Set.of(), List.of(input, image_shape, block_shape), List.of(pads, dilations, strides));
 4727         }
 4728 
 4729         @Override
 4730         public SequencedSet<OnnxParameter> onnxOutputs() {
 4731             return onnxOutputs(SCHEMA);
 4732         }
 4733 
 4734         @Override
 4735         public SequencedMap<OnnxParameter, Object> onnxInputs() {
 4736             return onnxInputs(SCHEMA, List.of(input(), image_shape(), block_shape()));
 4737         }
 4738 
 4739         public Value input() {
 4740             return operands().get(0);
 4741         }
 4742 
 4743         public Value image_shape() {
 4744             return operands().get(1);
 4745         }
 4746 
 4747         public Value block_shape() {
 4748             return operands().get(2);
 4749         }
 4750 
 4751         public java.util.Optional<long[]> pads() {
 4752             long[] pads = Attribute.pads.access(long[].class, onnxAttributes);
 4753             return java.util.Optional.ofNullable(pads).map(long[]::clone);
 4754         }
 4755 
 4756         public java.util.Optional<long[]> dilations() {
 4757             long[] dilations = Attribute.dilations.access(long[].class, onnxAttributes);
 4758             return java.util.Optional.ofNullable(dilations).map(long[]::clone);
 4759         }
 4760 
 4761         public java.util.Optional<long[]> strides() {
 4762             long[] strides = Attribute.strides.access(long[].class, onnxAttributes);
 4763             return java.util.Optional.ofNullable(strides).map(long[]::clone);
 4764         }
 4765 
 4766     }
 4767 
 4768     public static Col2Im Col2Im(TypeElement resultType, Value input, Value image_shape, Value block_shape, java.util.Optional<long[]> pads, java.util.Optional<long[]> dilations, java.util.Optional<long[]> strides) {
 4769         return new Col2Im(resultType, input, image_shape, block_shape, pads, dilations, strides);
 4770     }
 4771 
 4772     @OpFactoryHelper.OpDeclaration(Compress.NAME)
 4773     public static final class Compress extends OnnxOp {
 4774         public static final String NAME = "Compress";
 4775 
 4776         public enum Attribute implements OnnxAttribute {
 4777             axis(Long.class, true, null),
 4778             ;
 4779 
 4780                 final Class<?> t;
 4781                 final boolean optional;
 4782                 final Object defaultValue;
 4783 
 4784                 Attribute(Class<?> type, boolean optional, Object defaultValue) {
 4785                     this.t = type;
 4786                     this.optional = optional;
 4787                     this.defaultValue = defaultValue;
 4788                     assert optional || defaultValue == null;
 4789                 }
 4790 
 4791                 public Class<?> type() {
 4792                     return t;
 4793                 }
 4794 
 4795                 public boolean isOptional() {
 4796                     return optional;
 4797                 }
 4798 
 4799                 public Object defaultValue() {
 4800                     return defaultValue;
 4801                 }
 4802         }
 4803 
 4804         public enum TypeConstraint implements OnnxTypeConstraint {
 4805             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())))),
 4806             T1(new OnnxType.TypeVariable("T1", List.of(OnnxType.tensor(OnnxType.bool())))),
 4807             ;
 4808 
 4809             final OnnxType.TypeVariable typeVariable;
 4810 
 4811             TypeConstraint(OnnxType.TypeVariable typeVariable) {
 4812                 assert typeVariable.name().equals(name());
 4813                 this.typeVariable = typeVariable;
 4814             }
 4815 
 4816             @Override
 4817             public OnnxType.TypeVariable typeVariable() {
 4818                 return typeVariable;
 4819             }
 4820         }
 4821 
 4822         public enum InputParameter implements OnnxParameter {
 4823             input(TypeConstraint.T.typeVariable(), Quantifier.REQUIRED),
 4824             condition(TypeConstraint.T1.typeVariable(), Quantifier.REQUIRED),
 4825             ;
 4826 
 4827             final OnnxType type;
 4828             final Quantifier quantifier;
 4829 
 4830             InputParameter(OnnxType type, Quantifier quantifier) {
 4831                 this.type = type;
 4832                 this.quantifier = quantifier;
 4833             }
 4834 
 4835             @Override
 4836             public OnnxType type() {
 4837                 return type;
 4838             }
 4839 
 4840             @Override
 4841             public Quantifier quantifier() {
 4842                 return quantifier;
 4843             }
 4844         }
 4845 
 4846         public enum OutputParameter implements OnnxParameter {
 4847             output(TypeConstraint.T.typeVariable(), Quantifier.REQUIRED),
 4848             ;
 4849 
 4850             final OnnxType type;
 4851             final Quantifier quantifier;
 4852 
 4853             OutputParameter(OnnxType type, Quantifier quantifier) {
 4854                 this.type = type;
 4855                 this.quantifier = quantifier;
 4856             }
 4857 
 4858             @Override
 4859             public OnnxType type() {
 4860                 return type;
 4861             }
 4862 
 4863             @Override
 4864             public Quantifier quantifier() {
 4865                 return quantifier;
 4866             }
 4867         }
 4868 
 4869         public static final OnnxSchema SCHEMA = new OnnxSchemaRecord(
 4870                 NAME,
 4871                 List.of(Attribute.values()),
 4872                 List.of(TypeConstraint.values()),
 4873                 List.of(InputParameter.values()),
 4874                 List.of(OutputParameter.values())
 4875         );
 4876 
 4877         public Compress(ExternalizedOp def) {
 4878             super(SCHEMA, def);
 4879         }
 4880 
 4881         Compress(Compress that, CopyContext cc) {
 4882             super(that, cc);
 4883         }
 4884 
 4885         @Override
 4886         public Compress transform(CopyContext cc, OpTransformer ot) {
 4887             return new Compress(this, cc);
 4888         }
 4889 
 4890         Compress(TypeElement resultType, Value input, Value condition, java.util.Optional<Long> axis) {
 4891             super(SCHEMA, resultType, Set.of(), List.of(input, condition), List.of(axis));
 4892         }
 4893 
 4894         @Override
 4895         public SequencedSet<OnnxParameter> onnxOutputs() {
 4896             return onnxOutputs(SCHEMA);
 4897         }
 4898 
 4899         @Override
 4900         public SequencedMap<OnnxParameter, Object> onnxInputs() {
 4901             return onnxInputs(SCHEMA, List.of(input(), condition()));
 4902         }
 4903 
 4904         public Value input() {
 4905             return operands().get(0);
 4906         }
 4907 
 4908         public Value condition() {
 4909             return operands().get(1);
 4910         }
 4911 
 4912         public java.util.Optional<Long> axis() {
 4913             Long axis = Attribute.axis.access(Long.class, onnxAttributes);
 4914             return java.util.Optional.ofNullable(axis);
 4915         }
 4916 
 4917     }
 4918 
 4919     public static Compress Compress(TypeElement resultType, Value input, Value condition, java.util.Optional<Long> axis) {
 4920         return new Compress(resultType, input, condition, axis);
 4921     }
 4922 
 4923     @OpFactoryHelper.OpDeclaration(Concat.NAME)
 4924     public static final class Concat extends OnnxOp {
 4925         public static final String NAME = "Concat";
 4926 
 4927         public enum Attribute implements OnnxAttribute {
 4928             axis(Long.class, false, null),
 4929             ;
 4930 
 4931                 final Class<?> t;
 4932                 final boolean optional;
 4933                 final Object defaultValue;
 4934 
 4935                 Attribute(Class<?> type, boolean optional, Object defaultValue) {
 4936                     this.t = type;
 4937                     this.optional = optional;
 4938                     this.defaultValue = defaultValue;
 4939                     assert optional || defaultValue == null;
 4940                 }
 4941 
 4942                 public Class<?> type() {
 4943                     return t;
 4944                 }
 4945 
 4946                 public boolean isOptional() {
 4947                     return optional;
 4948                 }
 4949 
 4950                 public Object defaultValue() {
 4951                     return defaultValue;
 4952                 }
 4953         }
 4954 
 4955         public enum TypeConstraint implements OnnxTypeConstraint {
 4956             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())))),
 4957             ;
 4958 
 4959             final OnnxType.TypeVariable typeVariable;
 4960 
 4961             TypeConstraint(OnnxType.TypeVariable typeVariable) {
 4962                 assert typeVariable.name().equals(name());
 4963                 this.typeVariable = typeVariable;
 4964             }
 4965 
 4966             @Override
 4967             public OnnxType.TypeVariable typeVariable() {
 4968                 return typeVariable;
 4969             }
 4970         }
 4971 
 4972         public enum InputParameter implements OnnxParameter {
 4973             inputs(TypeConstraint.T.typeVariable(), Quantifier.VARIADIC),
 4974             ;
 4975 
 4976             final OnnxType type;
 4977             final Quantifier quantifier;
 4978 
 4979             InputParameter(OnnxType type, Quantifier quantifier) {
 4980                 this.type = type;
 4981                 this.quantifier = quantifier;
 4982             }
 4983 
 4984             @Override
 4985             public OnnxType type() {
 4986                 return type;
 4987             }
 4988 
 4989             @Override
 4990             public Quantifier quantifier() {
 4991                 return quantifier;
 4992             }
 4993         }
 4994 
 4995         public enum OutputParameter implements OnnxParameter {
 4996             concat_result(TypeConstraint.T.typeVariable(), Quantifier.REQUIRED),
 4997             ;
 4998 
 4999             final OnnxType type;
 5000             final Quantifier quantifier;
 5001 
 5002             OutputParameter(OnnxType type, Quantifier quantifier) {
 5003                 this.type = type;
 5004                 this.quantifier = quantifier;
 5005             }
 5006 
 5007             @Override
 5008             public OnnxType type() {
 5009                 return type;
 5010             }
 5011 
 5012             @Override
 5013             public Quantifier quantifier() {
 5014                 return quantifier;
 5015             }
 5016         }
 5017 
 5018         public static final OnnxSchema SCHEMA = new OnnxSchemaRecord(
 5019                 NAME,
 5020                 List.of(Attribute.values()),
 5021                 List.of(TypeConstraint.values()),
 5022                 List.of(InputParameter.values()),
 5023                 List.of(OutputParameter.values())
 5024         );
 5025 
 5026         public Concat(ExternalizedOp def) {
 5027             super(SCHEMA, def);
 5028         }
 5029 
 5030         Concat(Concat that, CopyContext cc) {
 5031             super(that, cc);
 5032         }
 5033 
 5034         @Override
 5035         public Concat transform(CopyContext cc, OpTransformer ot) {
 5036             return new Concat(this, cc);
 5037         }
 5038 
 5039         Concat(TypeElement resultType, List<Value> inputs, long axis) {
 5040             super(SCHEMA, resultType, Set.of(), List.of(inputs), List.of(axis));
 5041         }
 5042 
 5043         @Override
 5044         public SequencedSet<OnnxParameter> onnxOutputs() {
 5045             return onnxOutputs(SCHEMA);
 5046         }
 5047 
 5048         @Override
 5049         public SequencedMap<OnnxParameter, Object> onnxInputs() {
 5050             return onnxInputs(SCHEMA, List.of(inputs()));
 5051         }
 5052 
 5053         public List<Value> inputs() {
 5054             return operands();
 5055         }
 5056 
 5057         public long axis() {
 5058             long axis = Attribute.axis.access(Long.class, onnxAttributes);
 5059             return axis;
 5060         }
 5061 
 5062     }
 5063 
 5064     public static Concat Concat(TypeElement resultType, List<Value> inputs, long axis) {
 5065         return new Concat(resultType, inputs, axis);
 5066     }
 5067 
 5068     @OpFactoryHelper.OpDeclaration(ConcatFromSequence.NAME)
 5069     public static final class ConcatFromSequence extends OnnxOp {
 5070         public static final String NAME = "ConcatFromSequence";
 5071 
 5072         public enum Attribute implements OnnxAttribute {
 5073             axis(Long.class, false, null),
 5074             new_axis(Long.class, true, 0),
 5075             ;
 5076 
 5077                 final Class<?> t;
 5078                 final boolean optional;
 5079                 final Object defaultValue;
 5080 
 5081                 Attribute(Class<?> type, boolean optional, Object defaultValue) {
 5082                     this.t = type;
 5083                     this.optional = optional;
 5084                     this.defaultValue = defaultValue;
 5085                     assert optional || defaultValue == null;
 5086                 }
 5087 
 5088                 public Class<?> type() {
 5089                     return t;
 5090                 }
 5091 
 5092                 public boolean isOptional() {
 5093                     return optional;
 5094                 }
 5095 
 5096                 public Object defaultValue() {
 5097                     return defaultValue;
 5098                 }
 5099         }
 5100 
 5101         public enum TypeConstraint implements OnnxTypeConstraint {
 5102             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()))))),
 5103             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())))),
 5104             ;
 5105 
 5106             final OnnxType.TypeVariable typeVariable;
 5107 
 5108             TypeConstraint(OnnxType.TypeVariable typeVariable) {
 5109                 assert typeVariable.name().equals(name());
 5110                 this.typeVariable = typeVariable;
 5111             }
 5112 
 5113             @Override
 5114             public OnnxType.TypeVariable typeVariable() {
 5115                 return typeVariable;
 5116             }
 5117         }
 5118 
 5119         public enum InputParameter implements OnnxParameter {
 5120             input_sequence(TypeConstraint.S.typeVariable(), Quantifier.REQUIRED),
 5121             ;
 5122 
 5123             final OnnxType type;
 5124             final Quantifier quantifier;
 5125 
 5126             InputParameter(OnnxType type, Quantifier quantifier) {
 5127                 this.type = type;
 5128                 this.quantifier = quantifier;
 5129             }
 5130 
 5131             @Override
 5132             public OnnxType type() {
 5133                 return type;
 5134             }
 5135 
 5136             @Override
 5137             public Quantifier quantifier() {
 5138                 return quantifier;
 5139             }
 5140         }
 5141 
 5142         public enum OutputParameter implements OnnxParameter {
 5143             concat_result(TypeConstraint.T.typeVariable(), Quantifier.REQUIRED),
 5144             ;
 5145 
 5146             final OnnxType type;
 5147             final Quantifier quantifier;
 5148 
 5149             OutputParameter(OnnxType type, Quantifier quantifier) {
 5150                 this.type = type;
 5151                 this.quantifier = quantifier;
 5152             }
 5153 
 5154             @Override
 5155             public OnnxType type() {
 5156                 return type;
 5157             }
 5158 
 5159             @Override
 5160             public Quantifier quantifier() {
 5161                 return quantifier;
 5162             }
 5163         }
 5164 
 5165         public static final OnnxSchema SCHEMA = new OnnxSchemaRecord(
 5166                 NAME,
 5167                 List.of(Attribute.values()),
 5168                 List.of(TypeConstraint.values()),
 5169                 List.of(InputParameter.values()),
 5170                 List.of(OutputParameter.values())
 5171         );
 5172 
 5173         public ConcatFromSequence(ExternalizedOp def) {
 5174             super(SCHEMA, def);
 5175         }
 5176 
 5177         ConcatFromSequence(ConcatFromSequence that, CopyContext cc) {
 5178             super(that, cc);
 5179         }
 5180 
 5181         @Override
 5182         public ConcatFromSequence transform(CopyContext cc, OpTransformer ot) {
 5183             return new ConcatFromSequence(this, cc);
 5184         }
 5185 
 5186         ConcatFromSequence(TypeElement resultType, Value input_sequence, long axis, java.util.Optional<Long> new_axis) {
 5187             super(SCHEMA, resultType, Set.of(), List.of(input_sequence), List.of(axis, new_axis));
 5188         }
 5189 
 5190         @Override
 5191         public SequencedSet<OnnxParameter> onnxOutputs() {
 5192             return onnxOutputs(SCHEMA);
 5193         }
 5194 
 5195         @Override
 5196         public SequencedMap<OnnxParameter, Object> onnxInputs() {
 5197             return onnxInputs(SCHEMA, List.of(input_sequence()));
 5198         }
 5199 
 5200         public Value input_sequence() {
 5201             return operands().get(0);
 5202         }
 5203 
 5204         public long axis() {
 5205             long axis = Attribute.axis.access(Long.class, onnxAttributes);
 5206             return axis;
 5207         }
 5208 
 5209         public java.util.Optional<Long> new_axis() {
 5210             Long new_axis = Attribute.new_axis.access(Long.class, onnxAttributes);
 5211             return java.util.Optional.ofNullable(new_axis);
 5212         }
 5213 
 5214     }
 5215 
 5216     public static ConcatFromSequence ConcatFromSequence(TypeElement resultType, Value input_sequence, long axis, java.util.Optional<Long> new_axis) {
 5217         return new ConcatFromSequence(resultType, input_sequence, axis, new_axis);
 5218     }
 5219 
 5220     @OpFactoryHelper.OpDeclaration(Constant.NAME)
 5221     public static final class Constant extends OnnxOp {
 5222         public static final String NAME = "Constant";
 5223 
 5224         public enum Attribute implements OnnxAttribute {
 5225             value_int(Long.class, true, null),
 5226             value_floats(float[].class, true, null),
 5227             value_strings(String[].class, true, null),
 5228             value_float(Float.class, true, null),
 5229             value_string(String.class, true, null),
 5230             value_ints(long[].class, true, null),
 5231             sparse_value(byte[].class, true, null),
 5232             value(Tensor.class, true, null),
 5233             ;
 5234 
 5235                 final Class<?> t;
 5236                 final boolean optional;
 5237                 final Object defaultValue;
 5238 
 5239                 Attribute(Class<?> type, boolean optional, Object defaultValue) {
 5240                     this.t = type;
 5241                     this.optional = optional;
 5242                     this.defaultValue = defaultValue;
 5243                     assert optional || defaultValue == null;
 5244                 }
 5245 
 5246                 public Class<?> type() {
 5247                     return t;
 5248                 }
 5249 
 5250                 public boolean isOptional() {
 5251                     return optional;
 5252                 }
 5253 
 5254                 public Object defaultValue() {
 5255                     return defaultValue;
 5256                 }
 5257         }
 5258 
 5259         public enum TypeConstraint implements OnnxTypeConstraint {
 5260             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())))),
 5261             ;
 5262 
 5263             final OnnxType.TypeVariable typeVariable;
 5264 
 5265             TypeConstraint(OnnxType.TypeVariable typeVariable) {
 5266                 assert typeVariable.name().equals(name());
 5267                 this.typeVariable = typeVariable;
 5268             }
 5269 
 5270             @Override
 5271             public OnnxType.TypeVariable typeVariable() {
 5272                 return typeVariable;
 5273             }
 5274         }
 5275 
 5276         public enum InputParameter implements OnnxParameter.None { }
 5277 
 5278         public enum OutputParameter implements OnnxParameter {
 5279             output(TypeConstraint.T.typeVariable(), Quantifier.REQUIRED),
 5280             ;
 5281 
 5282             final OnnxType type;
 5283             final Quantifier quantifier;
 5284 
 5285             OutputParameter(OnnxType type, Quantifier quantifier) {
 5286                 this.type = type;
 5287                 this.quantifier = quantifier;
 5288             }
 5289 
 5290             @Override
 5291             public OnnxType type() {
 5292                 return type;
 5293             }
 5294 
 5295             @Override
 5296             public Quantifier quantifier() {
 5297                 return quantifier;
 5298             }
 5299         }
 5300 
 5301         public static final OnnxSchema SCHEMA = new OnnxSchemaRecord(
 5302                 NAME,
 5303                 List.of(Attribute.values()),
 5304                 List.of(TypeConstraint.values()),
 5305                 List.of(InputParameter.values()),
 5306                 List.of(OutputParameter.values())
 5307         );
 5308 
 5309         public Constant(ExternalizedOp def) {
 5310             super(SCHEMA, def);
 5311         }
 5312 
 5313         Constant(Constant that, CopyContext cc) {
 5314             super(that, cc);
 5315         }
 5316 
 5317         @Override
 5318         public Constant transform(CopyContext cc, OpTransformer ot) {
 5319             return new Constant(this, cc);
 5320         }
 5321 
 5322         Constant(TypeElement resultType, java.util.Optional<Long> 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<long[]> value_ints, java.util.Optional<byte[]> sparse_value, java.util.Optional<Tensor> value) {
 5323             super(SCHEMA, resultType, Set.of(), List.of(), List.of(value_int, value_floats, value_strings, value_float, value_string, value_ints, sparse_value, value));
 5324         }
 5325 
 5326         @Override
 5327         public SequencedSet<OnnxParameter> onnxOutputs() {
 5328             return onnxOutputs(SCHEMA);
 5329         }
 5330 
 5331         @Override
 5332         public SequencedMap<OnnxParameter, Object> onnxInputs() {
 5333             return onnxInputs(SCHEMA, List.of());
 5334         }
 5335 
 5336         public java.util.Optional<Long> value_int() {
 5337             Long value_int = Attribute.value_int.access(Long.class, onnxAttributes);
 5338             return java.util.Optional.ofNullable(value_int);
 5339         }
 5340 
 5341         public java.util.Optional<float[]> value_floats() {
 5342             float[] value_floats = Attribute.value_floats.access(float[].class, onnxAttributes);
 5343             return java.util.Optional.ofNullable(value_floats).map(float[]::clone);
 5344         }
 5345 
 5346         public java.util.Optional<String[]> value_strings() {
 5347             String[] value_strings = Attribute.value_strings.access(String[].class, onnxAttributes);
 5348             return java.util.Optional.ofNullable(value_strings).map(String[]::clone);
 5349         }
 5350 
 5351         public java.util.Optional<Float> value_float() {
 5352             Float value_float = Attribute.value_float.access(Float.class, onnxAttributes);
 5353             return java.util.Optional.ofNullable(value_float);
 5354         }
 5355 
 5356         public java.util.Optional<String> value_string() {
 5357             String value_string = Attribute.value_string.access(String.class, onnxAttributes);
 5358             return java.util.Optional.ofNullable(value_string);
 5359         }
 5360 
 5361         public java.util.Optional<long[]> value_ints() {
 5362             long[] value_ints = Attribute.value_ints.access(long[].class, onnxAttributes);
 5363             return java.util.Optional.ofNullable(value_ints).map(long[]::clone);
 5364         }
 5365 
 5366         public java.util.Optional<byte[]> sparse_value() {
 5367             byte[] sparse_value = Attribute.sparse_value.access(byte[].class, onnxAttributes);
 5368             return java.util.Optional.ofNullable(sparse_value).map(byte[]::clone);
 5369         }
 5370 
 5371         public java.util.Optional<Tensor> value() {
 5372             Tensor value = Attribute.value.access(Tensor.class, onnxAttributes);
 5373             return java.util.Optional.ofNullable(value);
 5374         }
 5375 
 5376     }
 5377 
 5378     public static Constant Constant(TypeElement resultType, java.util.Optional<Long> 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<long[]> value_ints, java.util.Optional<byte[]> sparse_value, java.util.Optional<Tensor> value) {
 5379         return new Constant(resultType, value_int, value_floats, value_strings, value_float, value_string, value_ints, sparse_value, value);
 5380     }
 5381 
 5382     @OpFactoryHelper.OpDeclaration(ConstantOfShape.NAME)
 5383     public static final class ConstantOfShape extends OnnxOp {
 5384         public static final String NAME = "ConstantOfShape";
 5385 
 5386         public enum Attribute implements OnnxAttribute {
 5387             value(Tensor.class, true, null),
 5388             ;
 5389 
 5390                 final Class<?> t;
 5391                 final boolean optional;
 5392                 final Object defaultValue;
 5393 
 5394                 Attribute(Class<?> type, boolean optional, Object defaultValue) {
 5395                     this.t = type;
 5396                     this.optional = optional;
 5397                     this.defaultValue = defaultValue;
 5398                     assert optional || defaultValue == null;
 5399                 }
 5400 
 5401                 public Class<?> type() {
 5402                     return t;
 5403                 }
 5404 
 5405                 public boolean isOptional() {
 5406                     return optional;
 5407                 }
 5408 
 5409                 public Object defaultValue() {
 5410                     return defaultValue;
 5411                 }
 5412         }
 5413 
 5414         public enum TypeConstraint implements OnnxTypeConstraint {
 5415             T1(new OnnxType.TypeVariable("T1", List.of(OnnxType.tensor(OnnxType.int64())))),
 5416             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())))),
 5417             ;
 5418 
 5419             final OnnxType.TypeVariable typeVariable;
 5420 
 5421             TypeConstraint(OnnxType.TypeVariable typeVariable) {
 5422                 assert typeVariable.name().equals(name());
 5423                 this.typeVariable = typeVariable;
 5424             }
 5425 
 5426             @Override
 5427             public OnnxType.TypeVariable typeVariable() {
 5428                 return typeVariable;
 5429             }
 5430         }
 5431 
 5432         public enum InputParameter implements OnnxParameter {
 5433             input(TypeConstraint.T1.typeVariable(), Quantifier.REQUIRED),
 5434             ;
 5435 
 5436             final OnnxType type;
 5437             final Quantifier quantifier;
 5438 
 5439             InputParameter(OnnxType type, Quantifier quantifier) {
 5440                 this.type = type;
 5441                 this.quantifier = quantifier;
 5442             }
 5443 
 5444             @Override
 5445             public OnnxType type() {
 5446                 return type;
 5447             }
 5448 
 5449             @Override
 5450             public Quantifier quantifier() {
 5451                 return quantifier;
 5452             }
 5453         }
 5454 
 5455         public enum OutputParameter implements OnnxParameter {
 5456             output(TypeConstraint.T2.typeVariable(), Quantifier.REQUIRED),
 5457             ;
 5458 
 5459             final OnnxType type;
 5460             final Quantifier quantifier;
 5461 
 5462             OutputParameter(OnnxType type, Quantifier quantifier) {
 5463                 this.type = type;
 5464                 this.quantifier = quantifier;
 5465             }
 5466 
 5467             @Override
 5468             public OnnxType type() {
 5469                 return type;
 5470             }
 5471 
 5472             @Override
 5473             public Quantifier quantifier() {
 5474                 return quantifier;
 5475             }
 5476         }
 5477 
 5478         public static final OnnxSchema SCHEMA = new OnnxSchemaRecord(
 5479                 NAME,
 5480                 List.of(Attribute.values()),
 5481                 List.of(TypeConstraint.values()),
 5482                 List.of(InputParameter.values()),
 5483                 List.of(OutputParameter.values())
 5484         );
 5485 
 5486         public ConstantOfShape(ExternalizedOp def) {
 5487             super(SCHEMA, def);
 5488         }
 5489 
 5490         ConstantOfShape(ConstantOfShape that, CopyContext cc) {
 5491             super(that, cc);
 5492         }
 5493 
 5494         @Override
 5495         public ConstantOfShape transform(CopyContext cc, OpTransformer ot) {
 5496             return new ConstantOfShape(this, cc);
 5497         }
 5498 
 5499         ConstantOfShape(TypeElement resultType, Value input, java.util.Optional<Tensor> value) {
 5500             super(SCHEMA, resultType, Set.of(), List.of(input), List.of(value));
 5501         }
 5502 
 5503         @Override
 5504         public SequencedSet<OnnxParameter> onnxOutputs() {
 5505             return onnxOutputs(SCHEMA);
 5506         }
 5507 
 5508         @Override
 5509         public SequencedMap<OnnxParameter, Object> onnxInputs() {
 5510             return onnxInputs(SCHEMA, List.of(input()));
 5511         }
 5512 
 5513         public Value input() {
 5514             return operands().get(0);
 5515         }
 5516 
 5517         public java.util.Optional<Tensor> value() {
 5518             Tensor value = Attribute.value.access(Tensor.class, onnxAttributes);
 5519             return java.util.Optional.ofNullable(value);
 5520         }
 5521 
 5522     }
 5523 
 5524     public static ConstantOfShape ConstantOfShape(TypeElement resultType, Value input, java.util.Optional<Tensor> value) {
 5525         return new ConstantOfShape(resultType, input, value);
 5526     }
 5527 
 5528     @OpFactoryHelper.OpDeclaration(Conv.NAME)
 5529     public static final class Conv extends OnnxOp {
 5530         public static final String NAME = "Conv";
 5531 
 5532         public enum Attribute implements OnnxAttribute {
 5533             pads(long[].class, true, null),
 5534             dilations(long[].class, true, null),
 5535             auto_pad(String.class, true, "NOTSET"),
 5536             strides(long[].class, true, null),
 5537             group(Long.class, true, 1),
 5538             kernel_shape(long[].class, true, null),
 5539             ;
 5540 
 5541                 final Class<?> t;
 5542                 final boolean optional;
 5543                 final Object defaultValue;
 5544 
 5545                 Attribute(Class<?> type, boolean optional, Object defaultValue) {
 5546                     this.t = type;
 5547                     this.optional = optional;
 5548                     this.defaultValue = defaultValue;
 5549                     assert optional || defaultValue == null;
 5550                 }
 5551 
 5552                 public Class<?> type() {
 5553                     return t;
 5554                 }
 5555 
 5556                 public boolean isOptional() {
 5557                     return optional;
 5558                 }
 5559 
 5560                 public Object defaultValue() {
 5561                     return defaultValue;
 5562                 }
 5563         }
 5564 
 5565         public enum TypeConstraint implements OnnxTypeConstraint {
 5566             T(new OnnxType.TypeVariable("T", List.of(OnnxType.tensor(OnnxType.bfloat16()), OnnxType.tensor(OnnxType.float16()), OnnxType.tensor(OnnxType.float32()), OnnxType.tensor(OnnxType.float64())))),
 5567             ;
 5568 
 5569             final OnnxType.TypeVariable typeVariable;
 5570 
 5571             TypeConstraint(OnnxType.TypeVariable typeVariable) {
 5572                 assert typeVariable.name().equals(name());
 5573                 this.typeVariable = typeVariable;
 5574             }
 5575 
 5576             @Override
 5577             public OnnxType.TypeVariable typeVariable() {
 5578                 return typeVariable;
 5579             }
 5580         }
 5581 
 5582         public enum InputParameter implements OnnxParameter {
 5583             X(TypeConstraint.T.typeVariable(), Quantifier.REQUIRED),
 5584             W(TypeConstraint.T.typeVariable(), Quantifier.REQUIRED),
 5585             B(TypeConstraint.T.typeVariable(), Quantifier.OPTIONAL),
 5586             ;
 5587 
 5588             final OnnxType type;
 5589             final Quantifier quantifier;
 5590 
 5591             InputParameter(OnnxType type, Quantifier quantifier) {
 5592                 this.type = type;
 5593                 this.quantifier = quantifier;
 5594             }
 5595 
 5596             @Override
 5597             public OnnxType type() {
 5598                 return type;
 5599             }
 5600 
 5601             @Override
 5602             public Quantifier quantifier() {
 5603                 return quantifier;
 5604             }
 5605         }
 5606 
 5607         public enum OutputParameter implements OnnxParameter {
 5608             Y(TypeConstraint.T.typeVariable(), Quantifier.REQUIRED),
 5609             ;
 5610 
 5611             final OnnxType type;
 5612             final Quantifier quantifier;
 5613 
 5614             OutputParameter(OnnxType type, Quantifier quantifier) {
 5615                 this.type = type;
 5616                 this.quantifier = quantifier;
 5617             }
 5618 
 5619             @Override
 5620             public OnnxType type() {
 5621                 return type;
 5622             }
 5623 
 5624             @Override
 5625             public Quantifier quantifier() {
 5626                 return quantifier;
 5627             }
 5628         }
 5629 
 5630         public static final OnnxSchema SCHEMA = new OnnxSchemaRecord(
 5631                 NAME,
 5632                 List.of(Attribute.values()),
 5633                 List.of(TypeConstraint.values()),
 5634                 List.of(InputParameter.values()),
 5635                 List.of(OutputParameter.values())
 5636         );
 5637 
 5638         public Conv(ExternalizedOp def) {
 5639             super(SCHEMA, def);
 5640         }
 5641 
 5642         Conv(Conv that, CopyContext cc) {
 5643             super(that, cc);
 5644         }
 5645 
 5646         @Override
 5647         public Conv transform(CopyContext cc, OpTransformer ot) {
 5648             return new Conv(this, cc);
 5649         }
 5650 
 5651         Conv(TypeElement resultType, Value X, Value W, java.util.Optional<Value> B, java.util.Optional<long[]> pads, java.util.Optional<long[]> dilations, java.util.Optional<String> auto_pad, java.util.Optional<long[]> strides, java.util.Optional<Long> group, java.util.Optional<long[]> kernel_shape) {
 5652             super(SCHEMA, resultType, Set.of(), List.of(X, W, B), List.of(pads, dilations, auto_pad, strides, group, kernel_shape));
 5653         }
 5654 
 5655         @Override
 5656         public SequencedSet<OnnxParameter> onnxOutputs() {
 5657             return onnxOutputs(SCHEMA);
 5658         }
 5659 
 5660         @Override
 5661         public SequencedMap<OnnxParameter, Object> onnxInputs() {
 5662             return onnxInputs(SCHEMA, List.of(X(), W(), B()));
 5663         }
 5664 
 5665         public Value X() {
 5666             return operands().get(0);
 5667         }
 5668 
 5669         public Value W() {
 5670             return operands().get(1);
 5671         }
 5672 
 5673         public java.util.Optional<Value> B() {
 5674             int i = optionalInputArguments.indexOf(InputParameter.B);
 5675             return i != -1 ? java.util.Optional.of(operands().get(2 + i)) : java.util.Optional.empty();
 5676         }
 5677 
 5678         public java.util.Optional<long[]> pads() {
 5679             long[] pads = Attribute.pads.access(long[].class, onnxAttributes);
 5680             return java.util.Optional.ofNullable(pads).map(long[]::clone);
 5681         }
 5682 
 5683         public java.util.Optional<long[]> dilations() {
 5684             long[] dilations = Attribute.dilations.access(long[].class, onnxAttributes);
 5685             return java.util.Optional.ofNullable(dilations).map(long[]::clone);
 5686         }
 5687 
 5688         public java.util.Optional<String> auto_pad() {
 5689             String auto_pad = Attribute.auto_pad.access(String.class, onnxAttributes);
 5690             return java.util.Optional.ofNullable(auto_pad);
 5691         }
 5692 
 5693         public java.util.Optional<long[]> strides() {
 5694             long[] strides = Attribute.strides.access(long[].class, onnxAttributes);
 5695             return java.util.Optional.ofNullable(strides).map(long[]::clone);
 5696         }
 5697 
 5698         public java.util.Optional<Long> group() {
 5699             Long group = Attribute.group.access(Long.class, onnxAttributes);
 5700             return java.util.Optional.ofNullable(group);
 5701         }
 5702 
 5703         public java.util.Optional<long[]> kernel_shape() {
 5704             long[] kernel_shape = Attribute.kernel_shape.access(long[].class, onnxAttributes);
 5705             return java.util.Optional.ofNullable(kernel_shape).map(long[]::clone);
 5706         }
 5707 
 5708     }
 5709 
 5710     public static Conv Conv(TypeElement resultType, Value X, Value W, java.util.Optional<Value> B, java.util.Optional<long[]> pads, java.util.Optional<long[]> dilations, java.util.Optional<String> auto_pad, java.util.Optional<long[]> strides, java.util.Optional<Long> group, java.util.Optional<long[]> kernel_shape) {
 5711         return new Conv(resultType, X, W, B, pads, dilations, auto_pad, strides, group, kernel_shape);
 5712     }
 5713 
 5714     @OpFactoryHelper.OpDeclaration(ConvInteger.NAME)
 5715     public static final class ConvInteger extends OnnxOp {
 5716         public static final String NAME = "ConvInteger";
 5717 
 5718         public enum Attribute implements OnnxAttribute {
 5719             pads(long[].class, true, null),
 5720             dilations(long[].class, true, null),
 5721             auto_pad(String.class, true, "NOTSET"),
 5722             strides(long[].class, true, null),
 5723             group(Long.class, true, 1),
 5724             kernel_shape(long[].class, true, null),
 5725             ;
 5726 
 5727                 final Class<?> t;
 5728                 final boolean optional;
 5729                 final Object defaultValue;
 5730 
 5731                 Attribute(Class<?> type, boolean optional, Object defaultValue) {
 5732                     this.t = type;
 5733                     this.optional = optional;
 5734                     this.defaultValue = defaultValue;
 5735                     assert optional || defaultValue == null;
 5736                 }
 5737 
 5738                 public Class<?> type() {
 5739                     return t;
 5740                 }
 5741 
 5742                 public boolean isOptional() {
 5743                     return optional;
 5744                 }
 5745 
 5746                 public Object defaultValue() {
 5747                     return defaultValue;
 5748                 }
 5749         }
 5750 
 5751         public enum TypeConstraint implements OnnxTypeConstraint {
 5752             T1(new OnnxType.TypeVariable("T1", List.of(OnnxType.tensor(OnnxType.int8()), OnnxType.tensor(OnnxType.uint8())))),
 5753             T2(new OnnxType.TypeVariable("T2", List.of(OnnxType.tensor(OnnxType.int8()), OnnxType.tensor(OnnxType.uint8())))),
 5754             T3(new OnnxType.TypeVariable("T3", List.of(OnnxType.tensor(OnnxType.int32())))),
 5755             ;
 5756 
 5757             final OnnxType.TypeVariable typeVariable;
 5758 
 5759             TypeConstraint(OnnxType.TypeVariable typeVariable) {
 5760                 assert typeVariable.name().equals(name());
 5761                 this.typeVariable = typeVariable;
 5762             }
 5763 
 5764             @Override
 5765             public OnnxType.TypeVariable typeVariable() {
 5766                 return typeVariable;
 5767             }
 5768         }
 5769 
 5770         public enum InputParameter implements OnnxParameter {
 5771             x(TypeConstraint.T1.typeVariable(), Quantifier.REQUIRED),
 5772             w(TypeConstraint.T2.typeVariable(), Quantifier.REQUIRED),
 5773             x_zero_point(TypeConstraint.T1.typeVariable(), Quantifier.OPTIONAL),
 5774             w_zero_point(TypeConstraint.T2.typeVariable(), Quantifier.OPTIONAL),
 5775             ;
 5776 
 5777             final OnnxType type;
 5778             final Quantifier quantifier;
 5779 
 5780             InputParameter(OnnxType type, Quantifier quantifier) {
 5781                 this.type = type;
 5782                 this.quantifier = quantifier;
 5783             }
 5784 
 5785             @Override
 5786             public OnnxType type() {
 5787                 return type;
 5788             }
 5789 
 5790             @Override
 5791             public Quantifier quantifier() {
 5792                 return quantifier;
 5793             }
 5794         }
 5795 
 5796         public enum OutputParameter implements OnnxParameter {
 5797             y(TypeConstraint.T3.typeVariable(), Quantifier.REQUIRED),
 5798             ;
 5799 
 5800             final OnnxType type;
 5801             final Quantifier quantifier;
 5802 
 5803             OutputParameter(OnnxType type, Quantifier quantifier) {
 5804                 this.type = type;
 5805                 this.quantifier = quantifier;
 5806             }
 5807 
 5808             @Override
 5809             public OnnxType type() {
 5810                 return type;
 5811             }
 5812 
 5813             @Override
 5814             public Quantifier quantifier() {
 5815                 return quantifier;
 5816             }
 5817         }
 5818 
 5819         public static final OnnxSchema SCHEMA = new OnnxSchemaRecord(
 5820                 NAME,
 5821                 List.of(Attribute.values()),
 5822                 List.of(TypeConstraint.values()),
 5823                 List.of(InputParameter.values()),
 5824                 List.of(OutputParameter.values())
 5825         );
 5826 
 5827         public ConvInteger(ExternalizedOp def) {
 5828             super(SCHEMA, def);
 5829         }
 5830 
 5831         ConvInteger(ConvInteger that, CopyContext cc) {
 5832             super(that, cc);
 5833         }
 5834 
 5835         @Override
 5836         public ConvInteger transform(CopyContext cc, OpTransformer ot) {
 5837             return new ConvInteger(this, cc);
 5838         }
 5839 
 5840         ConvInteger(TypeElement resultType, Value x, Value w, java.util.Optional<Value> x_zero_point, java.util.Optional<Value> w_zero_point, java.util.Optional<long[]> pads, java.util.Optional<long[]> dilations, java.util.Optional<String> auto_pad, java.util.Optional<long[]> strides, java.util.Optional<Long> group, java.util.Optional<long[]> kernel_shape) {
 5841             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));
 5842         }
 5843 
 5844         @Override
 5845         public SequencedSet<OnnxParameter> onnxOutputs() {
 5846             return onnxOutputs(SCHEMA);
 5847         }
 5848 
 5849         @Override
 5850         public SequencedMap<OnnxParameter, Object> onnxInputs() {
 5851             return onnxInputs(SCHEMA, List.of(x(), w(), x_zero_point(), w_zero_point()));
 5852         }
 5853 
 5854         public Value x() {
 5855             return operands().get(0);
 5856         }
 5857 
 5858         public Value w() {
 5859             return operands().get(1);
 5860         }
 5861 
 5862         public java.util.Optional<Value> x_zero_point() {
 5863             int i = optionalInputArguments.indexOf(InputParameter.x_zero_point);
 5864             return i != -1 ? java.util.Optional.of(operands().get(2 + i)) : java.util.Optional.empty();
 5865         }
 5866 
 5867         public java.util.Optional<Value> w_zero_point() {
 5868             int i = optionalInputArguments.indexOf(InputParameter.w_zero_point);
 5869             return i != -1 ? java.util.Optional.of(operands().get(2 + i)) : java.util.Optional.empty();
 5870         }
 5871 
 5872         public java.util.Optional<long[]> pads() {
 5873             long[] pads = Attribute.pads.access(long[].class, onnxAttributes);
 5874             return java.util.Optional.ofNullable(pads).map(long[]::clone);
 5875         }
 5876 
 5877         public java.util.Optional<long[]> dilations() {
 5878             long[] dilations = Attribute.dilations.access(long[].class, onnxAttributes);
 5879             return java.util.Optional.ofNullable(dilations).map(long[]::clone);
 5880         }
 5881 
 5882         public java.util.Optional<String> auto_pad() {
 5883             String auto_pad = Attribute.auto_pad.access(String.class, onnxAttributes);
 5884             return java.util.Optional.ofNullable(auto_pad);
 5885         }
 5886 
 5887         public java.util.Optional<long[]> strides() {
 5888             long[] strides = Attribute.strides.access(long[].class, onnxAttributes);
 5889             return java.util.Optional.ofNullable(strides).map(long[]::clone);
 5890         }
 5891 
 5892         public java.util.Optional<Long> group() {
 5893             Long group = Attribute.group.access(Long.class, onnxAttributes);
 5894             return java.util.Optional.ofNullable(group);
 5895         }
 5896 
 5897         public java.util.Optional<long[]> kernel_shape() {
 5898             long[] kernel_shape = Attribute.kernel_shape.access(long[].class, onnxAttributes);
 5899             return java.util.Optional.ofNullable(kernel_shape).map(long[]::clone);
 5900         }
 5901 
 5902     }
 5903 
 5904     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<long[]> pads, java.util.Optional<long[]> dilations, java.util.Optional<String> auto_pad, java.util.Optional<long[]> strides, java.util.Optional<Long> group, java.util.Optional<long[]> kernel_shape) {
 5905         return new ConvInteger(resultType, x, w, x_zero_point, w_zero_point, pads, dilations, auto_pad, strides, group, kernel_shape);
 5906     }
 5907 
 5908     @OpFactoryHelper.OpDeclaration(ConvTranspose.NAME)
 5909     public static final class ConvTranspose extends OnnxOp {
 5910         public static final String NAME = "ConvTranspose";
 5911 
 5912         public enum Attribute implements OnnxAttribute {
 5913             output_shape(long[].class, true, null),
 5914             pads(long[].class, true, null),
 5915             dilations(long[].class, true, null),
 5916             auto_pad(String.class, true, "NOTSET"),
 5917             strides(long[].class, true, null),
 5918             group(Long.class, true, 1),
 5919             kernel_shape(long[].class, true, null),
 5920             output_padding(long[].class, true, null),
 5921             ;
 5922 
 5923                 final Class<?> t;
 5924                 final boolean optional;
 5925                 final Object defaultValue;
 5926 
 5927                 Attribute(Class<?> type, boolean optional, Object defaultValue) {
 5928                     this.t = type;
 5929                     this.optional = optional;
 5930                     this.defaultValue = defaultValue;
 5931                     assert optional || defaultValue == null;
 5932                 }
 5933 
 5934                 public Class<?> type() {
 5935                     return t;
 5936                 }
 5937 
 5938                 public boolean isOptional() {
 5939                     return optional;
 5940                 }
 5941 
 5942                 public Object defaultValue() {
 5943                     return defaultValue;
 5944                 }
 5945         }
 5946 
 5947         public enum TypeConstraint implements OnnxTypeConstraint {
 5948             T(new OnnxType.TypeVariable("T", List.of(OnnxType.tensor(OnnxType.bfloat16()), OnnxType.tensor(OnnxType.float16()), OnnxType.tensor(OnnxType.float32()), OnnxType.tensor(OnnxType.float64())))),
 5949             ;
 5950 
 5951             final OnnxType.TypeVariable typeVariable;
 5952 
 5953             TypeConstraint(OnnxType.TypeVariable typeVariable) {
 5954                 assert typeVariable.name().equals(name());
 5955                 this.typeVariable = typeVariable;
 5956             }
 5957 
 5958             @Override
 5959             public OnnxType.TypeVariable typeVariable() {
 5960                 return typeVariable;
 5961             }
 5962         }
 5963 
 5964         public enum InputParameter implements OnnxParameter {
 5965             X(TypeConstraint.T.typeVariable(), Quantifier.REQUIRED),
 5966             W(TypeConstraint.T.typeVariable(), Quantifier.REQUIRED),
 5967             B(TypeConstraint.T.typeVariable(), Quantifier.OPTIONAL),
 5968             ;
 5969 
 5970             final OnnxType type;
 5971             final Quantifier quantifier;
 5972 
 5973             InputParameter(OnnxType type, Quantifier quantifier) {
 5974                 this.type = type;
 5975                 this.quantifier = quantifier;
 5976             }
 5977 
 5978             @Override
 5979             public OnnxType type() {
 5980                 return type;
 5981             }
 5982 
 5983             @Override
 5984             public Quantifier quantifier() {
 5985                 return quantifier;
 5986             }
 5987         }
 5988 
 5989         public enum OutputParameter implements OnnxParameter {
 5990             Y(TypeConstraint.T.typeVariable(), Quantifier.REQUIRED),
 5991             ;
 5992 
 5993             final OnnxType type;
 5994             final Quantifier quantifier;
 5995 
 5996             OutputParameter(OnnxType type, Quantifier quantifier) {
 5997                 this.type = type;
 5998                 this.quantifier = quantifier;
 5999             }
 6000 
 6001             @Override
 6002             public OnnxType type() {
 6003                 return type;
 6004             }
 6005 
 6006             @Override
 6007             public Quantifier quantifier() {
 6008                 return quantifier;
 6009             }
 6010         }
 6011 
 6012         public static final OnnxSchema SCHEMA = new OnnxSchemaRecord(
 6013                 NAME,
 6014                 List.of(Attribute.values()),
 6015                 List.of(TypeConstraint.values()),
 6016                 List.of(InputParameter.values()),
 6017                 List.of(OutputParameter.values())
 6018         );
 6019 
 6020         public ConvTranspose(ExternalizedOp def) {
 6021             super(SCHEMA, def);
 6022         }
 6023 
 6024         ConvTranspose(ConvTranspose that, CopyContext cc) {
 6025             super(that, cc);
 6026         }
 6027 
 6028         @Override
 6029         public ConvTranspose transform(CopyContext cc, OpTransformer ot) {
 6030             return new ConvTranspose(this, cc);
 6031         }
 6032 
 6033         ConvTranspose(TypeElement resultType, Value X, Value W, java.util.Optional<Value> B, java.util.Optional<long[]> output_shape, java.util.Optional<long[]> pads, java.util.Optional<long[]> dilations, java.util.Optional<String> auto_pad, java.util.Optional<long[]> strides, java.util.Optional<Long> group, java.util.Optional<long[]> kernel_shape, java.util.Optional<long[]> output_padding) {
 6034             super(SCHEMA, resultType, Set.of(), List.of(X, W, B), List.of(output_shape, pads, dilations, auto_pad, strides, group, kernel_shape, output_padding));
 6035         }
 6036 
 6037         @Override
 6038         public SequencedSet<OnnxParameter> onnxOutputs() {
 6039             return onnxOutputs(SCHEMA);
 6040         }
 6041 
 6042         @Override
 6043         public SequencedMap<OnnxParameter, Object> onnxInputs() {
 6044             return onnxInputs(SCHEMA, List.of(X(), W(), B()));
 6045         }
 6046 
 6047         public Value X() {
 6048             return operands().get(0);
 6049         }
 6050 
 6051         public Value W() {
 6052             return operands().get(1);
 6053         }
 6054 
 6055         public java.util.Optional<Value> B() {
 6056             int i = optionalInputArguments.indexOf(InputParameter.B);
 6057             return i != -1 ? java.util.Optional.of(operands().get(2 + i)) : java.util.Optional.empty();
 6058         }
 6059 
 6060         public java.util.Optional<long[]> output_shape() {
 6061             long[] output_shape = Attribute.output_shape.access(long[].class, onnxAttributes);
 6062             return java.util.Optional.ofNullable(output_shape).map(long[]::clone);
 6063         }
 6064 
 6065         public java.util.Optional<long[]> pads() {
 6066             long[] pads = Attribute.pads.access(long[].class, onnxAttributes);
 6067             return java.util.Optional.ofNullable(pads).map(long[]::clone);
 6068         }
 6069 
 6070         public java.util.Optional<long[]> dilations() {
 6071             long[] dilations = Attribute.dilations.access(long[].class, onnxAttributes);
 6072             return java.util.Optional.ofNullable(dilations).map(long[]::clone);
 6073         }
 6074 
 6075         public java.util.Optional<String> auto_pad() {
 6076             String auto_pad = Attribute.auto_pad.access(String.class, onnxAttributes);
 6077             return java.util.Optional.ofNullable(auto_pad);
 6078         }
 6079 
 6080         public java.util.Optional<long[]> strides() {
 6081             long[] strides = Attribute.strides.access(long[].class, onnxAttributes);
 6082             return java.util.Optional.ofNullable(strides).map(long[]::clone);
 6083         }
 6084 
 6085         public java.util.Optional<Long> group() {
 6086             Long group = Attribute.group.access(Long.class, onnxAttributes);
 6087             return java.util.Optional.ofNullable(group);
 6088         }
 6089 
 6090         public java.util.Optional<long[]> kernel_shape() {
 6091             long[] kernel_shape = Attribute.kernel_shape.access(long[].class, onnxAttributes);
 6092             return java.util.Optional.ofNullable(kernel_shape).map(long[]::clone);
 6093         }
 6094 
 6095         public java.util.Optional<long[]> output_padding() {
 6096             long[] output_padding = Attribute.output_padding.access(long[].class, onnxAttributes);
 6097             return java.util.Optional.ofNullable(output_padding).map(long[]::clone);
 6098         }
 6099 
 6100     }
 6101 
 6102     public static ConvTranspose ConvTranspose(TypeElement resultType, Value X, Value W, java.util.Optional<Value> B, java.util.Optional<long[]> output_shape, java.util.Optional<long[]> pads, java.util.Optional<long[]> dilations, java.util.Optional<String> auto_pad, java.util.Optional<long[]> strides, java.util.Optional<Long> group, java.util.Optional<long[]> kernel_shape, java.util.Optional<long[]> output_padding) {
 6103         return new ConvTranspose(resultType, X, W, B, output_shape, pads, dilations, auto_pad, strides, group, kernel_shape, output_padding);
 6104     }
 6105 
 6106     @OpFactoryHelper.OpDeclaration(Cos.NAME)
 6107     public static final class Cos extends OnnxOp {
 6108         public static final String NAME = "Cos";
 6109 
 6110         public enum Attribute implements OnnxAttribute.None { }
 6111 
 6112         public enum TypeConstraint implements OnnxTypeConstraint {
 6113             T(new OnnxType.TypeVariable("T", List.of(OnnxType.tensor(OnnxType.bfloat16()), OnnxType.tensor(OnnxType.float16()), OnnxType.tensor(OnnxType.float32()), OnnxType.tensor(OnnxType.float64())))),
 6114             ;
 6115 
 6116             final OnnxType.TypeVariable typeVariable;
 6117 
 6118             TypeConstraint(OnnxType.TypeVariable typeVariable) {
 6119                 assert typeVariable.name().equals(name());
 6120                 this.typeVariable = typeVariable;
 6121             }
 6122 
 6123             @Override
 6124             public OnnxType.TypeVariable typeVariable() {
 6125                 return typeVariable;
 6126             }
 6127         }
 6128 
 6129         public enum InputParameter implements OnnxParameter {
 6130             input(TypeConstraint.T.typeVariable(), Quantifier.REQUIRED),
 6131             ;
 6132 
 6133             final OnnxType type;
 6134             final Quantifier quantifier;
 6135 
 6136             InputParameter(OnnxType type, Quantifier quantifier) {
 6137                 this.type = type;
 6138                 this.quantifier = quantifier;
 6139             }
 6140 
 6141             @Override
 6142             public OnnxType type() {
 6143                 return type;
 6144             }
 6145 
 6146             @Override
 6147             public Quantifier quantifier() {
 6148                 return quantifier;
 6149             }
 6150         }
 6151 
 6152         public enum OutputParameter implements OnnxParameter {
 6153             output(TypeConstraint.T.typeVariable(), Quantifier.REQUIRED),
 6154             ;
 6155 
 6156             final OnnxType type;
 6157             final Quantifier quantifier;
 6158 
 6159             OutputParameter(OnnxType type, Quantifier quantifier) {
 6160                 this.type = type;
 6161                 this.quantifier = quantifier;
 6162             }
 6163 
 6164             @Override
 6165             public OnnxType type() {
 6166                 return type;
 6167             }
 6168 
 6169             @Override
 6170             public Quantifier quantifier() {
 6171                 return quantifier;
 6172             }
 6173         }
 6174 
 6175         public static final OnnxSchema SCHEMA = new OnnxSchemaRecord(
 6176                 NAME,
 6177                 List.of(Attribute.values()),
 6178                 List.of(TypeConstraint.values()),
 6179                 List.of(InputParameter.values()),
 6180                 List.of(OutputParameter.values())
 6181         );
 6182 
 6183         public Cos(ExternalizedOp def) {
 6184             super(SCHEMA, def);
 6185         }
 6186 
 6187         Cos(Cos that, CopyContext cc) {
 6188             super(that, cc);
 6189         }
 6190 
 6191         @Override
 6192         public Cos transform(CopyContext cc, OpTransformer ot) {
 6193             return new Cos(this, cc);
 6194         }
 6195 
 6196         Cos(TypeElement resultType, Value input) {
 6197             super(SCHEMA, resultType, Set.of(), List.of(input), List.of());
 6198         }
 6199 
 6200         @Override
 6201         public SequencedSet<OnnxParameter> onnxOutputs() {
 6202             return onnxOutputs(SCHEMA);
 6203         }
 6204 
 6205         @Override
 6206         public SequencedMap<OnnxParameter, Object> onnxInputs() {
 6207             return onnxInputs(SCHEMA, List.of(input()));
 6208         }
 6209 
 6210         public Value input() {
 6211             return operands().get(0);
 6212         }
 6213 
 6214     }
 6215 
 6216     public static Cos Cos(TypeElement resultType, Value input) {
 6217         return new Cos(resultType, input);
 6218     }
 6219 
 6220     @OpFactoryHelper.OpDeclaration(Cosh.NAME)
 6221     public static final class Cosh extends OnnxOp {
 6222         public static final String NAME = "Cosh";
 6223 
 6224         public enum Attribute implements OnnxAttribute.None { }
 6225 
 6226         public enum TypeConstraint implements OnnxTypeConstraint {
 6227             T(new OnnxType.TypeVariable("T", List.of(OnnxType.tensor(OnnxType.bfloat16()), OnnxType.tensor(OnnxType.float16()), OnnxType.tensor(OnnxType.float32()), OnnxType.tensor(OnnxType.float64())))),
 6228             ;
 6229 
 6230             final OnnxType.TypeVariable typeVariable;
 6231 
 6232             TypeConstraint(OnnxType.TypeVariable typeVariable) {
 6233                 assert typeVariable.name().equals(name());
 6234                 this.typeVariable = typeVariable;
 6235             }
 6236 
 6237             @Override
 6238             public OnnxType.TypeVariable typeVariable() {
 6239                 return typeVariable;
 6240             }
 6241         }
 6242 
 6243         public enum InputParameter implements OnnxParameter {
 6244             input(TypeConstraint.T.typeVariable(), Quantifier.REQUIRED),
 6245             ;
 6246 
 6247             final OnnxType type;
 6248             final Quantifier quantifier;
 6249 
 6250             InputParameter(OnnxType type, Quantifier quantifier) {
 6251                 this.type = type;
 6252                 this.quantifier = quantifier;
 6253             }
 6254 
 6255             @Override
 6256             public OnnxType type() {
 6257                 return type;
 6258             }
 6259 
 6260             @Override
 6261             public Quantifier quantifier() {
 6262                 return quantifier;
 6263             }
 6264         }
 6265 
 6266         public enum OutputParameter implements OnnxParameter {
 6267             output(TypeConstraint.T.typeVariable(), Quantifier.REQUIRED),
 6268             ;
 6269 
 6270             final OnnxType type;
 6271             final Quantifier quantifier;
 6272 
 6273             OutputParameter(OnnxType type, Quantifier quantifier) {
 6274                 this.type = type;
 6275                 this.quantifier = quantifier;
 6276             }
 6277 
 6278             @Override
 6279             public OnnxType type() {
 6280                 return type;
 6281             }
 6282 
 6283             @Override
 6284             public Quantifier quantifier() {
 6285                 return quantifier;
 6286             }
 6287         }
 6288 
 6289         public static final OnnxSchema SCHEMA = new OnnxSchemaRecord(
 6290                 NAME,
 6291                 List.of(Attribute.values()),
 6292                 List.of(TypeConstraint.values()),
 6293                 List.of(InputParameter.values()),
 6294                 List.of(OutputParameter.values())
 6295         );
 6296 
 6297         public Cosh(ExternalizedOp def) {
 6298             super(SCHEMA, def);
 6299         }
 6300 
 6301         Cosh(Cosh that, CopyContext cc) {
 6302             super(that, cc);
 6303         }
 6304 
 6305         @Override
 6306         public Cosh transform(CopyContext cc, OpTransformer ot) {
 6307             return new Cosh(this, cc);
 6308         }
 6309 
 6310         Cosh(TypeElement resultType, Value input) {
 6311             super(SCHEMA, resultType, Set.of(), List.of(input), List.of());
 6312         }
 6313 
 6314         @Override
 6315         public SequencedSet<OnnxParameter> onnxOutputs() {
 6316             return onnxOutputs(SCHEMA);
 6317         }
 6318 
 6319         @Override
 6320         public SequencedMap<OnnxParameter, Object> onnxInputs() {
 6321             return onnxInputs(SCHEMA, List.of(input()));
 6322         }
 6323 
 6324         public Value input() {
 6325             return operands().get(0);
 6326         }
 6327 
 6328     }
 6329 
 6330     public static Cosh Cosh(TypeElement resultType, Value input) {
 6331         return new Cosh(resultType, input);
 6332     }
 6333 
 6334     @OpFactoryHelper.OpDeclaration(CumSum.NAME)
 6335     public static final class CumSum extends OnnxOp {
 6336         public static final String NAME = "CumSum";
 6337 
 6338         public enum Attribute implements OnnxAttribute {
 6339             exclusive(Long.class, true, 0),
 6340             reverse(Long.class, true, 0),
 6341             ;
 6342 
 6343                 final Class<?> t;
 6344                 final boolean optional;
 6345                 final Object defaultValue;
 6346 
 6347                 Attribute(Class<?> type, boolean optional, Object defaultValue) {
 6348                     this.t = type;
 6349                     this.optional = optional;
 6350                     this.defaultValue = defaultValue;
 6351                     assert optional || defaultValue == null;
 6352                 }
 6353 
 6354                 public Class<?> type() {
 6355                     return t;
 6356                 }
 6357 
 6358                 public boolean isOptional() {
 6359                     return optional;
 6360                 }
 6361 
 6362                 public Object defaultValue() {
 6363                     return defaultValue;
 6364                 }
 6365         }
 6366 
 6367         public enum TypeConstraint implements OnnxTypeConstraint {
 6368             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())))),
 6369             T2(new OnnxType.TypeVariable("T2", List.of(OnnxType.tensor(OnnxType.int32()), OnnxType.tensor(OnnxType.int64())))),
 6370             ;
 6371 
 6372             final OnnxType.TypeVariable typeVariable;
 6373 
 6374             TypeConstraint(OnnxType.TypeVariable typeVariable) {
 6375                 assert typeVariable.name().equals(name());
 6376                 this.typeVariable = typeVariable;
 6377             }
 6378 
 6379             @Override
 6380             public OnnxType.TypeVariable typeVariable() {
 6381                 return typeVariable;
 6382             }
 6383         }
 6384 
 6385         public enum InputParameter implements OnnxParameter {
 6386             x(TypeConstraint.T.typeVariable(), Quantifier.REQUIRED),
 6387             axis(TypeConstraint.T2.typeVariable(), Quantifier.REQUIRED),
 6388             ;
 6389 
 6390             final OnnxType type;
 6391             final Quantifier quantifier;
 6392 
 6393             InputParameter(OnnxType type, Quantifier quantifier) {
 6394                 this.type = type;
 6395                 this.quantifier = quantifier;
 6396             }
 6397 
 6398             @Override
 6399             public OnnxType type() {
 6400                 return type;
 6401             }
 6402 
 6403             @Override
 6404             public Quantifier quantifier() {
 6405                 return quantifier;
 6406             }
 6407         }
 6408 
 6409         public enum OutputParameter implements OnnxParameter {
 6410             y(TypeConstraint.T.typeVariable(), Quantifier.REQUIRED),
 6411             ;
 6412 
 6413             final OnnxType type;
 6414             final Quantifier quantifier;
 6415 
 6416             OutputParameter(OnnxType type, Quantifier quantifier) {
 6417                 this.type = type;
 6418                 this.quantifier = quantifier;
 6419             }
 6420 
 6421             @Override
 6422             public OnnxType type() {
 6423                 return type;
 6424             }
 6425 
 6426             @Override
 6427             public Quantifier quantifier() {
 6428                 return quantifier;
 6429             }
 6430         }
 6431 
 6432         public static final OnnxSchema SCHEMA = new OnnxSchemaRecord(
 6433                 NAME,
 6434                 List.of(Attribute.values()),
 6435                 List.of(TypeConstraint.values()),
 6436                 List.of(InputParameter.values()),
 6437                 List.of(OutputParameter.values())
 6438         );
 6439 
 6440         public CumSum(ExternalizedOp def) {
 6441             super(SCHEMA, def);
 6442         }
 6443 
 6444         CumSum(CumSum that, CopyContext cc) {
 6445             super(that, cc);
 6446         }
 6447 
 6448         @Override
 6449         public CumSum transform(CopyContext cc, OpTransformer ot) {
 6450             return new CumSum(this, cc);
 6451         }
 6452 
 6453         CumSum(TypeElement resultType, Value x, Value axis, java.util.Optional<Long> exclusive, java.util.Optional<Long> reverse) {
 6454             super(SCHEMA, resultType, Set.of(), List.of(x, axis), List.of(exclusive, reverse));
 6455         }
 6456 
 6457         @Override
 6458         public SequencedSet<OnnxParameter> onnxOutputs() {
 6459             return onnxOutputs(SCHEMA);
 6460         }
 6461 
 6462         @Override
 6463         public SequencedMap<OnnxParameter, Object> onnxInputs() {
 6464             return onnxInputs(SCHEMA, List.of(x(), axis()));
 6465         }
 6466 
 6467         public Value x() {
 6468             return operands().get(0);
 6469         }
 6470 
 6471         public Value axis() {
 6472             return operands().get(1);
 6473         }
 6474 
 6475         public java.util.Optional<Long> exclusive() {
 6476             Long exclusive = Attribute.exclusive.access(Long.class, onnxAttributes);
 6477             return java.util.Optional.ofNullable(exclusive);
 6478         }
 6479 
 6480         public java.util.Optional<Long> reverse() {
 6481             Long reverse = Attribute.reverse.access(Long.class, onnxAttributes);
 6482             return java.util.Optional.ofNullable(reverse);
 6483         }
 6484 
 6485     }
 6486 
 6487     public static CumSum CumSum(TypeElement resultType, Value x, Value axis, java.util.Optional<Long> exclusive, java.util.Optional<Long> reverse) {
 6488         return new CumSum(resultType, x, axis, exclusive, reverse);
 6489     }
 6490 
 6491     @OpFactoryHelper.OpDeclaration(DFT.NAME)
 6492     public static final class DFT extends OnnxOp {
 6493         public static final String NAME = "DFT";
 6494 
 6495         public enum Attribute implements OnnxAttribute {
 6496             inverse(Long.class, true, 0),
 6497             onesided(Long.class, true, 0),
 6498             ;
 6499 
 6500                 final Class<?> t;
 6501                 final boolean optional;
 6502                 final Object defaultValue;
 6503 
 6504                 Attribute(Class<?> type, boolean optional, Object defaultValue) {
 6505                     this.t = type;
 6506                     this.optional = optional;
 6507                     this.defaultValue = defaultValue;
 6508                     assert optional || defaultValue == null;
 6509                 }
 6510 
 6511                 public Class<?> type() {
 6512                     return t;
 6513                 }
 6514 
 6515                 public boolean isOptional() {
 6516                     return optional;
 6517                 }
 6518 
 6519                 public Object defaultValue() {
 6520                     return defaultValue;
 6521                 }
 6522         }
 6523 
 6524         public enum TypeConstraint implements OnnxTypeConstraint {
 6525             T1(new OnnxType.TypeVariable("T1", List.of(OnnxType.tensor(OnnxType.bfloat16()), OnnxType.tensor(OnnxType.float16()), OnnxType.tensor(OnnxType.float32()), OnnxType.tensor(OnnxType.float64())))),
 6526             T2(new OnnxType.TypeVariable("T2", List.of(OnnxType.tensor(OnnxType.int32()), OnnxType.tensor(OnnxType.int64())))),
 6527             ;
 6528 
 6529             final OnnxType.TypeVariable typeVariable;
 6530 
 6531             TypeConstraint(OnnxType.TypeVariable typeVariable) {
 6532                 assert typeVariable.name().equals(name());
 6533                 this.typeVariable = typeVariable;
 6534             }
 6535 
 6536             @Override
 6537             public OnnxType.TypeVariable typeVariable() {
 6538                 return typeVariable;
 6539             }
 6540         }
 6541 
 6542         public enum InputParameter implements OnnxParameter {
 6543             input(TypeConstraint.T1.typeVariable(), Quantifier.REQUIRED),
 6544             dft_length(TypeConstraint.T2.typeVariable(), Quantifier.OPTIONAL),
 6545             axis(OnnxType.tensor(OnnxType.int64()), Quantifier.OPTIONAL),
 6546             ;
 6547 
 6548             final OnnxType type;
 6549             final Quantifier quantifier;
 6550 
 6551             InputParameter(OnnxType type, Quantifier quantifier) {
 6552                 this.type = type;
 6553                 this.quantifier = quantifier;
 6554             }
 6555 
 6556             @Override
 6557             public OnnxType type() {
 6558                 return type;
 6559             }
 6560 
 6561             @Override
 6562             public Quantifier quantifier() {
 6563                 return quantifier;
 6564             }
 6565         }
 6566 
 6567         public enum OutputParameter implements OnnxParameter {
 6568             output(TypeConstraint.T1.typeVariable(), Quantifier.REQUIRED),
 6569             ;
 6570 
 6571             final OnnxType type;
 6572             final Quantifier quantifier;
 6573 
 6574             OutputParameter(OnnxType type, Quantifier quantifier) {
 6575                 this.type = type;
 6576                 this.quantifier = quantifier;
 6577             }
 6578 
 6579             @Override
 6580             public OnnxType type() {
 6581                 return type;
 6582             }
 6583 
 6584             @Override
 6585             public Quantifier quantifier() {
 6586                 return quantifier;
 6587             }
 6588         }
 6589 
 6590         public static final OnnxSchema SCHEMA = new OnnxSchemaRecord(
 6591                 NAME,
 6592                 List.of(Attribute.values()),
 6593                 List.of(TypeConstraint.values()),
 6594                 List.of(InputParameter.values()),
 6595                 List.of(OutputParameter.values())
 6596         );
 6597 
 6598         public DFT(ExternalizedOp def) {
 6599             super(SCHEMA, def);
 6600         }
 6601 
 6602         DFT(DFT that, CopyContext cc) {
 6603             super(that, cc);
 6604         }
 6605 
 6606         @Override
 6607         public DFT transform(CopyContext cc, OpTransformer ot) {
 6608             return new DFT(this, cc);
 6609         }
 6610 
 6611         DFT(TypeElement resultType, Value input, java.util.Optional<Value> dft_length, java.util.Optional<Value> axis, java.util.Optional<Long> inverse, java.util.Optional<Long> onesided) {
 6612             super(SCHEMA, resultType, Set.of(), List.of(input, dft_length, axis), List.of(inverse, onesided));
 6613         }
 6614 
 6615         @Override
 6616         public SequencedSet<OnnxParameter> onnxOutputs() {
 6617             return onnxOutputs(SCHEMA);
 6618         }
 6619 
 6620         @Override
 6621         public SequencedMap<OnnxParameter, Object> onnxInputs() {
 6622             return onnxInputs(SCHEMA, List.of(input(), dft_length(), axis()));
 6623         }
 6624 
 6625         public Value input() {
 6626             return operands().get(0);
 6627         }
 6628 
 6629         public java.util.Optional<Value> dft_length() {
 6630             int i = optionalInputArguments.indexOf(InputParameter.dft_length);
 6631             return i != -1 ? java.util.Optional.of(operands().get(1 + i)) : java.util.Optional.empty();
 6632         }
 6633 
 6634         public java.util.Optional<Value> axis() {
 6635             int i = optionalInputArguments.indexOf(InputParameter.axis);
 6636             return i != -1 ? java.util.Optional.of(operands().get(1 + i)) : java.util.Optional.empty();
 6637         }
 6638 
 6639         public java.util.Optional<Long> inverse() {
 6640             Long inverse = Attribute.inverse.access(Long.class, onnxAttributes);
 6641             return java.util.Optional.ofNullable(inverse);
 6642         }
 6643 
 6644         public java.util.Optional<Long> onesided() {
 6645             Long onesided = Attribute.onesided.access(Long.class, onnxAttributes);
 6646             return java.util.Optional.ofNullable(onesided);
 6647         }
 6648 
 6649     }
 6650 
 6651     public static DFT DFT(TypeElement resultType, Value input, java.util.Optional<Value> dft_length, java.util.Optional<Value> axis, java.util.Optional<Long> inverse, java.util.Optional<Long> onesided) {
 6652         return new DFT(resultType, input, dft_length, axis, inverse, onesided);
 6653     }
 6654 
 6655     @OpFactoryHelper.OpDeclaration(DeformConv.NAME)
 6656     public static final class DeformConv extends OnnxOp {
 6657         public static final String NAME = "DeformConv";
 6658 
 6659         public enum Attribute implements OnnxAttribute {
 6660             pads(long[].class, true, null),
 6661             dilations(long[].class, true, null),
 6662             strides(long[].class, true, null),
 6663             offset_group(Long.class, true, 1),
 6664             group(Long.class, true, 1),
 6665             kernel_shape(long[].class, true, null),
 6666             ;
 6667 
 6668                 final Class<?> t;
 6669                 final boolean optional;
 6670                 final Object defaultValue;
 6671 
 6672                 Attribute(Class<?> type, boolean optional, Object defaultValue) {
 6673                     this.t = type;
 6674                     this.optional = optional;
 6675                     this.defaultValue = defaultValue;
 6676                     assert optional || defaultValue == null;
 6677                 }
 6678 
 6679                 public Class<?> type() {
 6680                     return t;
 6681                 }
 6682 
 6683                 public boolean isOptional() {
 6684                     return optional;
 6685                 }
 6686 
 6687                 public Object defaultValue() {
 6688                     return defaultValue;
 6689                 }
 6690         }
 6691 
 6692         public enum TypeConstraint implements OnnxTypeConstraint {
 6693             T(new OnnxType.TypeVariable("T", List.of(OnnxType.tensor(OnnxType.bfloat16()), OnnxType.tensor(OnnxType.float16()), OnnxType.tensor(OnnxType.float32()), OnnxType.tensor(OnnxType.float64())))),
 6694             ;
 6695 
 6696             final OnnxType.TypeVariable typeVariable;
 6697 
 6698             TypeConstraint(OnnxType.TypeVariable typeVariable) {
 6699                 assert typeVariable.name().equals(name());
 6700                 this.typeVariable = typeVariable;
 6701             }
 6702 
 6703             @Override
 6704             public OnnxType.TypeVariable typeVariable() {
 6705                 return typeVariable;
 6706             }
 6707         }
 6708 
 6709         public enum InputParameter implements OnnxParameter {
 6710             X(TypeConstraint.T.typeVariable(), Quantifier.REQUIRED),
 6711             W(TypeConstraint.T.typeVariable(), Quantifier.REQUIRED),
 6712             offset(TypeConstraint.T.typeVariable(), Quantifier.REQUIRED),
 6713             B(TypeConstraint.T.typeVariable(), Quantifier.OPTIONAL),
 6714             mask(TypeConstraint.T.typeVariable(), Quantifier.OPTIONAL),
 6715             ;
 6716 
 6717             final OnnxType type;
 6718             final Quantifier quantifier;
 6719 
 6720             InputParameter(OnnxType type, Quantifier quantifier) {
 6721                 this.type = type;
 6722                 this.quantifier = quantifier;
 6723             }
 6724 
 6725             @Override
 6726             public OnnxType type() {
 6727                 return type;
 6728             }
 6729 
 6730             @Override
 6731             public Quantifier quantifier() {
 6732                 return quantifier;
 6733             }
 6734         }
 6735 
 6736         public enum OutputParameter implements OnnxParameter {
 6737             Y(TypeConstraint.T.typeVariable(), Quantifier.REQUIRED),
 6738             ;
 6739 
 6740             final OnnxType type;
 6741             final Quantifier quantifier;
 6742 
 6743             OutputParameter(OnnxType type, Quantifier quantifier) {
 6744                 this.type = type;
 6745                 this.quantifier = quantifier;
 6746             }
 6747 
 6748             @Override
 6749             public OnnxType type() {
 6750                 return type;
 6751             }
 6752 
 6753             @Override
 6754             public Quantifier quantifier() {
 6755                 return quantifier;
 6756             }
 6757         }
 6758 
 6759         public static final OnnxSchema SCHEMA = new OnnxSchemaRecord(
 6760                 NAME,
 6761                 List.of(Attribute.values()),
 6762                 List.of(TypeConstraint.values()),
 6763                 List.of(InputParameter.values()),
 6764                 List.of(OutputParameter.values())
 6765         );
 6766 
 6767         public DeformConv(ExternalizedOp def) {
 6768             super(SCHEMA, def);
 6769         }
 6770 
 6771         DeformConv(DeformConv that, CopyContext cc) {
 6772             super(that, cc);
 6773         }
 6774 
 6775         @Override
 6776         public DeformConv transform(CopyContext cc, OpTransformer ot) {
 6777             return new DeformConv(this, cc);
 6778         }
 6779 
 6780         DeformConv(TypeElement resultType, Value X, Value W, Value offset, java.util.Optional<Value> B, java.util.Optional<Value> mask, java.util.Optional<long[]> pads, java.util.Optional<long[]> dilations, java.util.Optional<long[]> strides, java.util.Optional<Long> offset_group, java.util.Optional<Long> group, java.util.Optional<long[]> kernel_shape) {
 6781             super(SCHEMA, resultType, Set.of(), List.of(X, W, offset, B, mask), List.of(pads, dilations, strides, offset_group, group, kernel_shape));
 6782         }
 6783 
 6784         @Override
 6785         public SequencedSet<OnnxParameter> onnxOutputs() {
 6786             return onnxOutputs(SCHEMA);
 6787         }
 6788 
 6789         @Override
 6790         public SequencedMap<OnnxParameter, Object> onnxInputs() {
 6791             return onnxInputs(SCHEMA, List.of(X(), W(), offset(), B(), mask()));
 6792         }
 6793 
 6794         public Value X() {
 6795             return operands().get(0);
 6796         }
 6797 
 6798         public Value W() {
 6799             return operands().get(1);
 6800         }
 6801 
 6802         public Value offset() {
 6803             return operands().get(2);
 6804         }
 6805 
 6806         public java.util.Optional<Value> B() {
 6807             int i = optionalInputArguments.indexOf(InputParameter.B);
 6808             return i != -1 ? java.util.Optional.of(operands().get(3 + i)) : java.util.Optional.empty();
 6809         }
 6810 
 6811         public java.util.Optional<Value> mask() {
 6812             int i = optionalInputArguments.indexOf(InputParameter.mask);
 6813             return i != -1 ? java.util.Optional.of(operands().get(3 + i)) : java.util.Optional.empty();
 6814         }
 6815 
 6816         public java.util.Optional<long[]> pads() {
 6817             long[] pads = Attribute.pads.access(long[].class, onnxAttributes);
 6818             return java.util.Optional.ofNullable(pads).map(long[]::clone);
 6819         }
 6820 
 6821         public java.util.Optional<long[]> dilations() {
 6822             long[] dilations = Attribute.dilations.access(long[].class, onnxAttributes);
 6823             return java.util.Optional.ofNullable(dilations).map(long[]::clone);
 6824         }
 6825 
 6826         public java.util.Optional<long[]> strides() {
 6827             long[] strides = Attribute.strides.access(long[].class, onnxAttributes);
 6828             return java.util.Optional.ofNullable(strides).map(long[]::clone);
 6829         }
 6830 
 6831         public java.util.Optional<Long> offset_group() {
 6832             Long offset_group = Attribute.offset_group.access(Long.class, onnxAttributes);
 6833             return java.util.Optional.ofNullable(offset_group);
 6834         }
 6835 
 6836         public java.util.Optional<Long> group() {
 6837             Long group = Attribute.group.access(Long.class, onnxAttributes);
 6838             return java.util.Optional.ofNullable(group);
 6839         }
 6840 
 6841         public java.util.Optional<long[]> kernel_shape() {
 6842             long[] kernel_shape = Attribute.kernel_shape.access(long[].class, onnxAttributes);
 6843             return java.util.Optional.ofNullable(kernel_shape).map(long[]::clone);
 6844         }
 6845 
 6846     }
 6847 
 6848     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<long[]> pads, java.util.Optional<long[]> dilations, java.util.Optional<long[]> strides, java.util.Optional<Long> offset_group, java.util.Optional<Long> group, java.util.Optional<long[]> kernel_shape) {
 6849         return new DeformConv(resultType, X, W, offset, B, mask, pads, dilations, strides, offset_group, group, kernel_shape);
 6850     }
 6851 
 6852     @OpFactoryHelper.OpDeclaration(DepthToSpace.NAME)
 6853     public static final class DepthToSpace extends OnnxOp {
 6854         public static final String NAME = "DepthToSpace";
 6855 
 6856         public enum Attribute implements OnnxAttribute {
 6857             mode(String.class, true, "DCR"),
 6858             blocksize(Long.class, false, null),
 6859             ;
 6860 
 6861                 final Class<?> t;
 6862                 final boolean optional;
 6863                 final Object defaultValue;
 6864 
 6865                 Attribute(Class<?> type, boolean optional, Object defaultValue) {
 6866                     this.t = type;
 6867                     this.optional = optional;
 6868                     this.defaultValue = defaultValue;
 6869                     assert optional || defaultValue == null;
 6870                 }
 6871 
 6872                 public Class<?> type() {
 6873                     return t;
 6874                 }
 6875 
 6876                 public boolean isOptional() {
 6877                     return optional;
 6878                 }
 6879 
 6880                 public Object defaultValue() {
 6881                     return defaultValue;
 6882                 }
 6883         }
 6884 
 6885         public enum TypeConstraint implements OnnxTypeConstraint {
 6886             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())))),
 6887             ;
 6888 
 6889             final OnnxType.TypeVariable typeVariable;
 6890 
 6891             TypeConstraint(OnnxType.TypeVariable typeVariable) {
 6892                 assert typeVariable.name().equals(name());
 6893                 this.typeVariable = typeVariable;
 6894             }
 6895 
 6896             @Override
 6897             public OnnxType.TypeVariable typeVariable() {
 6898                 return typeVariable;
 6899             }
 6900         }
 6901 
 6902         public enum InputParameter implements OnnxParameter {
 6903             input(TypeConstraint.T.typeVariable(), Quantifier.REQUIRED),
 6904             ;
 6905 
 6906             final OnnxType type;
 6907             final Quantifier quantifier;
 6908 
 6909             InputParameter(OnnxType type, Quantifier quantifier) {
 6910                 this.type = type;
 6911                 this.quantifier = quantifier;
 6912             }
 6913 
 6914             @Override
 6915             public OnnxType type() {
 6916                 return type;
 6917             }
 6918 
 6919             @Override
 6920             public Quantifier quantifier() {
 6921                 return quantifier;
 6922             }
 6923         }
 6924 
 6925         public enum OutputParameter implements OnnxParameter {
 6926             output(TypeConstraint.T.typeVariable(), Quantifier.REQUIRED),
 6927             ;
 6928 
 6929             final OnnxType type;
 6930             final Quantifier quantifier;
 6931 
 6932             OutputParameter(OnnxType type, Quantifier quantifier) {
 6933                 this.type = type;
 6934                 this.quantifier = quantifier;
 6935             }
 6936 
 6937             @Override
 6938             public OnnxType type() {
 6939                 return type;
 6940             }
 6941 
 6942             @Override
 6943             public Quantifier quantifier() {
 6944                 return quantifier;
 6945             }
 6946         }
 6947 
 6948         public static final OnnxSchema SCHEMA = new OnnxSchemaRecord(
 6949                 NAME,
 6950                 List.of(Attribute.values()),
 6951                 List.of(TypeConstraint.values()),
 6952                 List.of(InputParameter.values()),
 6953                 List.of(OutputParameter.values())
 6954         );
 6955 
 6956         public DepthToSpace(ExternalizedOp def) {
 6957             super(SCHEMA, def);
 6958         }
 6959 
 6960         DepthToSpace(DepthToSpace that, CopyContext cc) {
 6961             super(that, cc);
 6962         }
 6963 
 6964         @Override
 6965         public DepthToSpace transform(CopyContext cc, OpTransformer ot) {
 6966             return new DepthToSpace(this, cc);
 6967         }
 6968 
 6969         DepthToSpace(TypeElement resultType, Value input, java.util.Optional<String> mode, long blocksize) {
 6970             super(SCHEMA, resultType, Set.of(), List.of(input), List.of(mode, blocksize));
 6971         }
 6972 
 6973         @Override
 6974         public SequencedSet<OnnxParameter> onnxOutputs() {
 6975             return onnxOutputs(SCHEMA);
 6976         }
 6977 
 6978         @Override
 6979         public SequencedMap<OnnxParameter, Object> onnxInputs() {
 6980             return onnxInputs(SCHEMA, List.of(input()));
 6981         }
 6982 
 6983         public Value input() {
 6984             return operands().get(0);
 6985         }
 6986 
 6987         public java.util.Optional<String> mode() {
 6988             String mode = Attribute.mode.access(String.class, onnxAttributes);
 6989             return java.util.Optional.ofNullable(mode);
 6990         }
 6991 
 6992         public long blocksize() {
 6993             long blocksize = Attribute.blocksize.access(Long.class, onnxAttributes);
 6994             return blocksize;
 6995         }
 6996 
 6997     }
 6998 
 6999     public static DepthToSpace DepthToSpace(TypeElement resultType, Value input, java.util.Optional<String> mode, long blocksize) {
 7000         return new DepthToSpace(resultType, input, mode, blocksize);
 7001     }
 7002 
 7003     @OpFactoryHelper.OpDeclaration(DequantizeLinear.NAME)
 7004     public static final class DequantizeLinear extends OnnxOp {
 7005         public static final String NAME = "DequantizeLinear";
 7006 
 7007         public enum Attribute implements OnnxAttribute {
 7008             axis(Long.class, true, 1),
 7009             block_size(Long.class, true, 0),
 7010             ;
 7011 
 7012                 final Class<?> t;
 7013                 final boolean optional;
 7014                 final Object defaultValue;
 7015 
 7016                 Attribute(Class<?> type, boolean optional, Object defaultValue) {
 7017                     this.t = type;
 7018                     this.optional = optional;
 7019                     this.defaultValue = defaultValue;
 7020                     assert optional || defaultValue == null;
 7021                 }
 7022 
 7023                 public Class<?> type() {
 7024                     return t;
 7025                 }
 7026 
 7027                 public boolean isOptional() {
 7028                     return optional;
 7029                 }
 7030 
 7031                 public Object defaultValue() {
 7032                     return defaultValue;
 7033                 }
 7034         }
 7035 
 7036         public enum TypeConstraint implements OnnxTypeConstraint {
 7037             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())))),
 7038             T2(new OnnxType.TypeVariable("T2", List.of(OnnxType.tensor(OnnxType.float32()), OnnxType.tensor(OnnxType.float16()), OnnxType.tensor(OnnxType.bfloat16())))),
 7039             ;
 7040 
 7041             final OnnxType.TypeVariable typeVariable;
 7042 
 7043             TypeConstraint(OnnxType.TypeVariable typeVariable) {
 7044                 assert typeVariable.name().equals(name());
 7045                 this.typeVariable = typeVariable;
 7046             }
 7047 
 7048             @Override
 7049             public OnnxType.TypeVariable typeVariable() {
 7050                 return typeVariable;
 7051             }
 7052         }
 7053 
 7054         public enum InputParameter implements OnnxParameter {
 7055             x(TypeConstraint.T1.typeVariable(), Quantifier.REQUIRED),
 7056             x_scale(TypeConstraint.T2.typeVariable(), Quantifier.REQUIRED),
 7057             x_zero_point(TypeConstraint.T1.typeVariable(), Quantifier.OPTIONAL),
 7058             ;
 7059 
 7060             final OnnxType type;
 7061             final Quantifier quantifier;
 7062 
 7063             InputParameter(OnnxType type, Quantifier quantifier) {
 7064                 this.type = type;
 7065                 this.quantifier = quantifier;
 7066             }
 7067 
 7068             @Override
 7069             public OnnxType type() {
 7070                 return type;
 7071             }
 7072 
 7073             @Override
 7074             public Quantifier quantifier() {
 7075                 return quantifier;
 7076             }
 7077         }
 7078 
 7079         public enum OutputParameter implements OnnxParameter {
 7080             y(TypeConstraint.T2.typeVariable(), Quantifier.REQUIRED),
 7081             ;
 7082 
 7083             final OnnxType type;
 7084             final Quantifier quantifier;
 7085 
 7086             OutputParameter(OnnxType type, Quantifier quantifier) {
 7087                 this.type = type;
 7088                 this.quantifier = quantifier;
 7089             }
 7090 
 7091             @Override
 7092             public OnnxType type() {
 7093                 return type;
 7094             }
 7095 
 7096             @Override
 7097             public Quantifier quantifier() {
 7098                 return quantifier;
 7099             }
 7100         }
 7101 
 7102         public static final OnnxSchema SCHEMA = new OnnxSchemaRecord(
 7103                 NAME,
 7104                 List.of(Attribute.values()),
 7105                 List.of(TypeConstraint.values()),
 7106                 List.of(InputParameter.values()),
 7107                 List.of(OutputParameter.values())
 7108         );
 7109 
 7110         public DequantizeLinear(ExternalizedOp def) {
 7111             super(SCHEMA, def);
 7112         }
 7113 
 7114         DequantizeLinear(DequantizeLinear that, CopyContext cc) {
 7115             super(that, cc);
 7116         }
 7117 
 7118         @Override
 7119         public DequantizeLinear transform(CopyContext cc, OpTransformer ot) {
 7120             return new DequantizeLinear(this, cc);
 7121         }
 7122 
 7123         DequantizeLinear(TypeElement resultType, Value x, Value x_scale, java.util.Optional<Value> x_zero_point, java.util.Optional<Long> axis, java.util.Optional<Long> block_size) {
 7124             super(SCHEMA, resultType, Set.of(), List.of(x, x_scale, x_zero_point), List.of(axis, block_size));
 7125         }
 7126 
 7127         @Override
 7128         public SequencedSet<OnnxParameter> onnxOutputs() {
 7129             return onnxOutputs(SCHEMA);
 7130         }
 7131 
 7132         @Override
 7133         public SequencedMap<OnnxParameter, Object> onnxInputs() {
 7134             return onnxInputs(SCHEMA, List.of(x(), x_scale(), x_zero_point()));
 7135         }
 7136 
 7137         public Value x() {
 7138             return operands().get(0);
 7139         }
 7140 
 7141         public Value x_scale() {
 7142             return operands().get(1);
 7143         }
 7144 
 7145         public java.util.Optional<Value> x_zero_point() {
 7146             int i = optionalInputArguments.indexOf(InputParameter.x_zero_point);
 7147             return i != -1 ? java.util.Optional.of(operands().get(2 + i)) : java.util.Optional.empty();
 7148         }
 7149 
 7150         public java.util.Optional<Long> axis() {
 7151             Long axis = Attribute.axis.access(Long.class, onnxAttributes);
 7152             return java.util.Optional.ofNullable(axis);
 7153         }
 7154 
 7155         public java.util.Optional<Long> block_size() {
 7156             Long block_size = Attribute.block_size.access(Long.class, onnxAttributes);
 7157             return java.util.Optional.ofNullable(block_size);
 7158         }
 7159 
 7160     }
 7161 
 7162     public static DequantizeLinear DequantizeLinear(TypeElement resultType, Value x, Value x_scale, java.util.Optional<Value> x_zero_point, java.util.Optional<Long> axis, java.util.Optional<Long> block_size) {
 7163         return new DequantizeLinear(resultType, x, x_scale, x_zero_point, axis, block_size);
 7164     }
 7165 
 7166     @OpFactoryHelper.OpDeclaration(Det.NAME)
 7167     public static final class Det extends OnnxOp {
 7168         public static final String NAME = "Det";
 7169 
 7170         public enum Attribute implements OnnxAttribute.None { }
 7171 
 7172         public enum TypeConstraint implements OnnxTypeConstraint {
 7173             T(new OnnxType.TypeVariable("T", List.of(OnnxType.tensor(OnnxType.bfloat16()), OnnxType.tensor(OnnxType.float16()), OnnxType.tensor(OnnxType.float32()), OnnxType.tensor(OnnxType.float64())))),
 7174             ;
 7175 
 7176             final OnnxType.TypeVariable typeVariable;
 7177 
 7178             TypeConstraint(OnnxType.TypeVariable typeVariable) {
 7179                 assert typeVariable.name().equals(name());
 7180                 this.typeVariable = typeVariable;
 7181             }
 7182 
 7183             @Override
 7184             public OnnxType.TypeVariable typeVariable() {
 7185                 return typeVariable;
 7186             }
 7187         }
 7188 
 7189         public enum InputParameter implements OnnxParameter {
 7190             X(TypeConstraint.T.typeVariable(), Quantifier.REQUIRED),
 7191             ;
 7192 
 7193             final OnnxType type;
 7194             final Quantifier quantifier;
 7195 
 7196             InputParameter(OnnxType type, Quantifier quantifier) {
 7197                 this.type = type;
 7198                 this.quantifier = quantifier;
 7199             }
 7200 
 7201             @Override
 7202             public OnnxType type() {
 7203                 return type;
 7204             }
 7205 
 7206             @Override
 7207             public Quantifier quantifier() {
 7208                 return quantifier;
 7209             }
 7210         }
 7211 
 7212         public enum OutputParameter implements OnnxParameter {
 7213             Y(TypeConstraint.T.typeVariable(), Quantifier.REQUIRED),
 7214             ;
 7215 
 7216             final OnnxType type;
 7217             final Quantifier quantifier;
 7218 
 7219             OutputParameter(OnnxType type, Quantifier quantifier) {
 7220                 this.type = type;
 7221                 this.quantifier = quantifier;
 7222             }
 7223 
 7224             @Override
 7225             public OnnxType type() {
 7226                 return type;
 7227             }
 7228 
 7229             @Override
 7230             public Quantifier quantifier() {
 7231                 return quantifier;
 7232             }
 7233         }
 7234 
 7235         public static final OnnxSchema SCHEMA = new OnnxSchemaRecord(
 7236                 NAME,
 7237                 List.of(Attribute.values()),
 7238                 List.of(TypeConstraint.values()),
 7239                 List.of(InputParameter.values()),
 7240                 List.of(OutputParameter.values())
 7241         );
 7242 
 7243         public Det(ExternalizedOp def) {
 7244             super(SCHEMA, def);
 7245         }
 7246 
 7247         Det(Det that, CopyContext cc) {
 7248             super(that, cc);
 7249         }
 7250 
 7251         @Override
 7252         public Det transform(CopyContext cc, OpTransformer ot) {
 7253             return new Det(this, cc);
 7254         }
 7255 
 7256         Det(TypeElement resultType, Value X) {
 7257             super(SCHEMA, resultType, Set.of(), List.of(X), List.of());
 7258         }
 7259 
 7260         @Override
 7261         public SequencedSet<OnnxParameter> onnxOutputs() {
 7262             return onnxOutputs(SCHEMA);
 7263         }
 7264 
 7265         @Override
 7266         public SequencedMap<OnnxParameter, Object> onnxInputs() {
 7267             return onnxInputs(SCHEMA, List.of(X()));
 7268         }
 7269 
 7270         public Value X() {
 7271             return operands().get(0);
 7272         }
 7273 
 7274     }
 7275 
 7276     public static Det Det(TypeElement resultType, Value X) {
 7277         return new Det(resultType, X);
 7278     }
 7279 
 7280     @OpFactoryHelper.OpDeclaration(DictVectorizer.NAME)
 7281     public static final class DictVectorizer extends OnnxOp {
 7282         public static final String NAME = "DictVectorizer";
 7283 
 7284         public enum Attribute implements OnnxAttribute {
 7285             string_vocabulary(String[].class, true, null),
 7286             int64_vocabulary(long[].class, true, null),
 7287             ;
 7288 
 7289                 final Class<?> t;
 7290                 final boolean optional;
 7291                 final Object defaultValue;
 7292 
 7293                 Attribute(Class<?> type, boolean optional, Object defaultValue) {
 7294                     this.t = type;
 7295                     this.optional = optional;
 7296                     this.defaultValue = defaultValue;
 7297                     assert optional || defaultValue == null;
 7298                 }
 7299 
 7300                 public Class<?> type() {
 7301                     return t;
 7302                 }
 7303 
 7304                 public boolean isOptional() {
 7305                     return optional;
 7306                 }
 7307 
 7308                 public Object defaultValue() {
 7309                     return defaultValue;
 7310                 }
 7311         }
 7312 
 7313         public enum TypeConstraint implements OnnxTypeConstraint {
 7314             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())))),
 7315             T2(new OnnxType.TypeVariable("T2", List.of(OnnxType.tensor(OnnxType.int64()), OnnxType.tensor(OnnxType.float32()), OnnxType.tensor(OnnxType.float64()), OnnxType.tensor(OnnxType.string())))),
 7316             ;
 7317 
 7318             final OnnxType.TypeVariable typeVariable;
 7319 
 7320             TypeConstraint(OnnxType.TypeVariable typeVariable) {
 7321                 assert typeVariable.name().equals(name());
 7322                 this.typeVariable = typeVariable;
 7323             }
 7324 
 7325             @Override
 7326             public OnnxType.TypeVariable typeVariable() {
 7327                 return typeVariable;
 7328             }
 7329         }
 7330 
 7331         public enum InputParameter implements OnnxParameter {
 7332             X(TypeConstraint.T1.typeVariable(), Quantifier.REQUIRED),
 7333             ;
 7334 
 7335             final OnnxType type;
 7336             final Quantifier quantifier;
 7337 
 7338             InputParameter(OnnxType type, Quantifier quantifier) {
 7339                 this.type = type;
 7340                 this.quantifier = quantifier;
 7341             }
 7342 
 7343             @Override
 7344             public OnnxType type() {
 7345                 return type;
 7346             }
 7347 
 7348             @Override
 7349             public Quantifier quantifier() {
 7350                 return quantifier;
 7351             }
 7352         }
 7353 
 7354         public enum OutputParameter implements OnnxParameter {
 7355             Y(TypeConstraint.T2.typeVariable(), Quantifier.REQUIRED),
 7356             ;
 7357 
 7358             final OnnxType type;
 7359             final Quantifier quantifier;
 7360 
 7361             OutputParameter(OnnxType type, Quantifier quantifier) {
 7362                 this.type = type;
 7363                 this.quantifier = quantifier;
 7364             }
 7365 
 7366             @Override
 7367             public OnnxType type() {
 7368                 return type;
 7369             }
 7370 
 7371             @Override
 7372             public Quantifier quantifier() {
 7373                 return quantifier;
 7374             }
 7375         }
 7376 
 7377         public static final OnnxSchema SCHEMA = new OnnxSchemaRecord(
 7378                 NAME,
 7379                 List.of(Attribute.values()),
 7380                 List.of(TypeConstraint.values()),
 7381                 List.of(InputParameter.values()),
 7382                 List.of(OutputParameter.values())
 7383         );
 7384 
 7385         public DictVectorizer(ExternalizedOp def) {
 7386             super(SCHEMA, def);
 7387         }
 7388 
 7389         DictVectorizer(DictVectorizer that, CopyContext cc) {
 7390             super(that, cc);
 7391         }
 7392 
 7393         @Override
 7394         public DictVectorizer transform(CopyContext cc, OpTransformer ot) {
 7395             return new DictVectorizer(this, cc);
 7396         }
 7397 
 7398         DictVectorizer(TypeElement resultType, Value X, java.util.Optional<String[]> string_vocabulary, java.util.Optional<long[]> int64_vocabulary) {
 7399             super(SCHEMA, resultType, Set.of(), List.of(X), List.of(string_vocabulary, int64_vocabulary));
 7400         }
 7401 
 7402         @Override
 7403         public SequencedSet<OnnxParameter> onnxOutputs() {
 7404             return onnxOutputs(SCHEMA);
 7405         }
 7406 
 7407         @Override
 7408         public SequencedMap<OnnxParameter, Object> onnxInputs() {
 7409             return onnxInputs(SCHEMA, List.of(X()));
 7410         }
 7411 
 7412         public Value X() {
 7413             return operands().get(0);
 7414         }
 7415 
 7416         public java.util.Optional<String[]> string_vocabulary() {
 7417             String[] string_vocabulary = Attribute.string_vocabulary.access(String[].class, onnxAttributes);
 7418             return java.util.Optional.ofNullable(string_vocabulary).map(String[]::clone);
 7419         }
 7420 
 7421         public java.util.Optional<long[]> int64_vocabulary() {
 7422             long[] int64_vocabulary = Attribute.int64_vocabulary.access(long[].class, onnxAttributes);
 7423             return java.util.Optional.ofNullable(int64_vocabulary).map(long[]::clone);
 7424         }
 7425 
 7426     }
 7427 
 7428     public static DictVectorizer DictVectorizer(TypeElement resultType, Value X, java.util.Optional<String[]> string_vocabulary, java.util.Optional<long[]> int64_vocabulary) {
 7429         return new DictVectorizer(resultType, X, string_vocabulary, int64_vocabulary);
 7430     }
 7431 
 7432     @OpFactoryHelper.OpDeclaration(Div.NAME)
 7433     public static final class Div extends OnnxOp {
 7434         public static final String NAME = "Div";
 7435 
 7436         public enum Attribute implements OnnxAttribute.None { }
 7437 
 7438         public enum TypeConstraint implements OnnxTypeConstraint {
 7439             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())))),
 7440             ;
 7441 
 7442             final OnnxType.TypeVariable typeVariable;
 7443 
 7444             TypeConstraint(OnnxType.TypeVariable typeVariable) {
 7445                 assert typeVariable.name().equals(name());
 7446                 this.typeVariable = typeVariable;
 7447             }
 7448 
 7449             @Override
 7450             public OnnxType.TypeVariable typeVariable() {
 7451                 return typeVariable;
 7452             }
 7453         }
 7454 
 7455         public enum InputParameter implements OnnxParameter {
 7456             A(TypeConstraint.T.typeVariable(), Quantifier.REQUIRED),
 7457             B(TypeConstraint.T.typeVariable(), Quantifier.REQUIRED),
 7458             ;
 7459 
 7460             final OnnxType type;
 7461             final Quantifier quantifier;
 7462 
 7463             InputParameter(OnnxType type, Quantifier quantifier) {
 7464                 this.type = type;
 7465                 this.quantifier = quantifier;
 7466             }
 7467 
 7468             @Override
 7469             public OnnxType type() {
 7470                 return type;
 7471             }
 7472 
 7473             @Override
 7474             public Quantifier quantifier() {
 7475                 return quantifier;
 7476             }
 7477         }
 7478 
 7479         public enum OutputParameter implements OnnxParameter {
 7480             C(TypeConstraint.T.typeVariable(), Quantifier.REQUIRED),
 7481             ;
 7482 
 7483             final OnnxType type;
 7484             final Quantifier quantifier;
 7485 
 7486             OutputParameter(OnnxType type, Quantifier quantifier) {
 7487                 this.type = type;
 7488                 this.quantifier = quantifier;
 7489             }
 7490 
 7491             @Override
 7492             public OnnxType type() {
 7493                 return type;
 7494             }
 7495 
 7496             @Override
 7497             public Quantifier quantifier() {
 7498                 return quantifier;
 7499             }
 7500         }
 7501 
 7502         public static final OnnxSchema SCHEMA = new OnnxSchemaRecord(
 7503                 NAME,
 7504                 List.of(Attribute.values()),
 7505                 List.of(TypeConstraint.values()),
 7506                 List.of(InputParameter.values()),
 7507                 List.of(OutputParameter.values())
 7508         );
 7509 
 7510         public Div(ExternalizedOp def) {
 7511             super(SCHEMA, def);
 7512         }
 7513 
 7514         Div(Div that, CopyContext cc) {
 7515             super(that, cc);
 7516         }
 7517 
 7518         @Override
 7519         public Div transform(CopyContext cc, OpTransformer ot) {
 7520             return new Div(this, cc);
 7521         }
 7522 
 7523         Div(TypeElement resultType, Value A, Value B) {
 7524             super(SCHEMA, resultType, Set.of(), List.of(A, B), List.of());
 7525         }
 7526 
 7527         @Override
 7528         public SequencedSet<OnnxParameter> onnxOutputs() {
 7529             return onnxOutputs(SCHEMA);
 7530         }
 7531 
 7532         @Override
 7533         public SequencedMap<OnnxParameter, Object> onnxInputs() {
 7534             return onnxInputs(SCHEMA, List.of(A(), B()));
 7535         }
 7536 
 7537         public Value A() {
 7538             return operands().get(0);
 7539         }
 7540 
 7541         public Value B() {
 7542             return operands().get(1);
 7543         }
 7544 
 7545     }
 7546 
 7547     public static Div Div(TypeElement resultType, Value A, Value B) {
 7548         return new Div(resultType, A, B);
 7549     }
 7550 
 7551     @OpFactoryHelper.OpDeclaration(Dropout.NAME)
 7552     public static final class Dropout extends OnnxOp {
 7553         public static final String NAME = "Dropout";
 7554 
 7555         public enum Attribute implements OnnxAttribute {
 7556             seed(Long.class, true, null),
 7557             ;
 7558 
 7559                 final Class<?> t;
 7560                 final boolean optional;
 7561                 final Object defaultValue;
 7562 
 7563                 Attribute(Class<?> type, boolean optional, Object defaultValue) {
 7564                     this.t = type;
 7565                     this.optional = optional;
 7566                     this.defaultValue = defaultValue;
 7567                     assert optional || defaultValue == null;
 7568                 }
 7569 
 7570                 public Class<?> type() {
 7571                     return t;
 7572                 }
 7573 
 7574                 public boolean isOptional() {
 7575                     return optional;
 7576                 }
 7577 
 7578                 public Object defaultValue() {
 7579                     return defaultValue;
 7580                 }
 7581         }
 7582 
 7583         public enum TypeConstraint implements OnnxTypeConstraint {
 7584             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())))),
 7585             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())))),
 7586             T2(new OnnxType.TypeVariable("T2", List.of(OnnxType.tensor(OnnxType.bool())))),
 7587             ;
 7588 
 7589             final OnnxType.TypeVariable typeVariable;
 7590 
 7591             TypeConstraint(OnnxType.TypeVariable typeVariable) {
 7592                 assert typeVariable.name().equals(name());
 7593                 this.typeVariable = typeVariable;
 7594             }
 7595 
 7596             @Override
 7597             public OnnxType.TypeVariable typeVariable() {
 7598                 return typeVariable;
 7599             }
 7600         }
 7601 
 7602         public enum InputParameter implements OnnxParameter {
 7603             data(TypeConstraint.T.typeVariable(), Quantifier.REQUIRED),
 7604             ratio(TypeConstraint.T1.typeVariable(), Quantifier.OPTIONAL),
 7605             training_mode(TypeConstraint.T2.typeVariable(), Quantifier.OPTIONAL),
 7606             ;
 7607 
 7608             final OnnxType type;
 7609             final Quantifier quantifier;
 7610 
 7611             InputParameter(OnnxType type, Quantifier quantifier) {
 7612                 this.type = type;
 7613                 this.quantifier = quantifier;
 7614             }
 7615 
 7616             @Override
 7617             public OnnxType type() {
 7618                 return type;
 7619             }
 7620 
 7621             @Override
 7622             public Quantifier quantifier() {
 7623                 return quantifier;
 7624             }
 7625         }
 7626 
 7627         public enum OutputParameter implements OnnxParameter {
 7628             output(TypeConstraint.T.typeVariable(), Quantifier.REQUIRED),
 7629             mask(TypeConstraint.T2.typeVariable(), Quantifier.OPTIONAL),
 7630             ;
 7631 
 7632             final OnnxType type;
 7633             final Quantifier quantifier;
 7634 
 7635             OutputParameter(OnnxType type, Quantifier quantifier) {
 7636                 this.type = type;
 7637                 this.quantifier = quantifier;
 7638             }
 7639 
 7640             @Override
 7641             public OnnxType type() {
 7642                 return type;
 7643             }
 7644 
 7645             @Override
 7646             public Quantifier quantifier() {
 7647                 return quantifier;
 7648             }
 7649         }
 7650 
 7651         public static final OnnxSchema SCHEMA = new OnnxSchemaRecord(
 7652                 NAME,
 7653                 List.of(Attribute.values()),
 7654                 List.of(TypeConstraint.values()),
 7655                 List.of(InputParameter.values()),
 7656                 List.of(OutputParameter.values())
 7657         );
 7658 
 7659         public Dropout(ExternalizedOp def) {
 7660             super(SCHEMA, def);
 7661         }
 7662 
 7663         Dropout(Dropout that, CopyContext cc) {
 7664             super(that, cc);
 7665         }
 7666 
 7667         @Override
 7668         public Dropout transform(CopyContext cc, OpTransformer ot) {
 7669             return new Dropout(this, cc);
 7670         }
 7671 
 7672         Dropout(TypeElement resultType, Set<OutputParameter> optionalOutputs, Value data, java.util.Optional<Value> ratio, java.util.Optional<Value> training_mode, java.util.Optional<Long> seed) {
 7673             super(SCHEMA, resultType, optionalOutputs, List.of(data, ratio, training_mode), List.of(seed));
 7674         }
 7675 
 7676         @Override
 7677         public SequencedSet<OnnxParameter> onnxOutputs() {
 7678             return onnxOutputs(SCHEMA);
 7679         }
 7680 
 7681         @Override
 7682         public SequencedMap<OnnxParameter, Object> onnxInputs() {
 7683             return onnxInputs(SCHEMA, List.of(data(), ratio(), training_mode()));
 7684         }
 7685 
 7686         public Value data() {
 7687             return operands().get(0);
 7688         }
 7689 
 7690         public java.util.Optional<Value> ratio() {
 7691             int i = optionalInputArguments.indexOf(InputParameter.ratio);
 7692             return i != -1 ? java.util.Optional.of(operands().get(1 + i)) : java.util.Optional.empty();
 7693         }
 7694 
 7695         public java.util.Optional<Value> training_mode() {
 7696             int i = optionalInputArguments.indexOf(InputParameter.training_mode);
 7697             return i != -1 ? java.util.Optional.of(operands().get(1 + i)) : java.util.Optional.empty();
 7698         }
 7699 
 7700         public java.util.Optional<Long> seed() {
 7701             Long seed = Attribute.seed.access(Long.class, onnxAttributes);
 7702             return java.util.Optional.ofNullable(seed);
 7703         }
 7704 
 7705     }
 7706 
 7707     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<Long> seed) {
 7708         return new Dropout(resultType, optionalOutputs, data, ratio, training_mode, seed);
 7709     }
 7710 
 7711     @OpFactoryHelper.OpDeclaration(DynamicQuantizeLinear.NAME)
 7712     public static final class DynamicQuantizeLinear extends OnnxOp {
 7713         public static final String NAME = "DynamicQuantizeLinear";
 7714 
 7715         public enum Attribute implements OnnxAttribute.None { }
 7716 
 7717         public enum TypeConstraint implements OnnxTypeConstraint {
 7718             T1(new OnnxType.TypeVariable("T1", List.of(OnnxType.tensor(OnnxType.float32())))),
 7719             T2(new OnnxType.TypeVariable("T2", List.of(OnnxType.tensor(OnnxType.uint8())))),
 7720             ;
 7721 
 7722             final OnnxType.TypeVariable typeVariable;
 7723 
 7724             TypeConstraint(OnnxType.TypeVariable typeVariable) {
 7725                 assert typeVariable.name().equals(name());
 7726                 this.typeVariable = typeVariable;
 7727             }
 7728 
 7729             @Override
 7730             public OnnxType.TypeVariable typeVariable() {
 7731                 return typeVariable;
 7732             }
 7733         }
 7734 
 7735         public enum InputParameter implements OnnxParameter {
 7736             x(TypeConstraint.T1.typeVariable(), Quantifier.REQUIRED),
 7737             ;
 7738 
 7739             final OnnxType type;
 7740             final Quantifier quantifier;
 7741 
 7742             InputParameter(OnnxType type, Quantifier quantifier) {
 7743                 this.type = type;
 7744                 this.quantifier = quantifier;
 7745             }
 7746 
 7747             @Override
 7748             public OnnxType type() {
 7749                 return type;
 7750             }
 7751 
 7752             @Override
 7753             public Quantifier quantifier() {
 7754                 return quantifier;
 7755             }
 7756         }
 7757 
 7758         public enum OutputParameter implements OnnxParameter {
 7759             y(TypeConstraint.T2.typeVariable(), Quantifier.REQUIRED),
 7760             y_scale(OnnxType.tensor(OnnxType.float32()), Quantifier.REQUIRED),
 7761             y_zero_point(TypeConstraint.T2.typeVariable(), Quantifier.REQUIRED),
 7762             ;
 7763 
 7764             final OnnxType type;
 7765             final Quantifier quantifier;
 7766 
 7767             OutputParameter(OnnxType type, Quantifier quantifier) {
 7768                 this.type = type;
 7769                 this.quantifier = quantifier;
 7770             }
 7771 
 7772             @Override
 7773             public OnnxType type() {
 7774                 return type;
 7775             }
 7776 
 7777             @Override
 7778             public Quantifier quantifier() {
 7779                 return quantifier;
 7780             }
 7781         }
 7782 
 7783         public static final OnnxSchema SCHEMA = new OnnxSchemaRecord(
 7784                 NAME,
 7785                 List.of(Attribute.values()),
 7786                 List.of(TypeConstraint.values()),
 7787                 List.of(InputParameter.values()),
 7788                 List.of(OutputParameter.values())
 7789         );
 7790 
 7791         public DynamicQuantizeLinear(ExternalizedOp def) {
 7792             super(SCHEMA, def);
 7793         }
 7794 
 7795         DynamicQuantizeLinear(DynamicQuantizeLinear that, CopyContext cc) {
 7796             super(that, cc);
 7797         }
 7798 
 7799         @Override
 7800         public DynamicQuantizeLinear transform(CopyContext cc, OpTransformer ot) {
 7801             return new DynamicQuantizeLinear(this, cc);
 7802         }
 7803 
 7804         DynamicQuantizeLinear(TypeElement resultType, Value x) {
 7805             super(SCHEMA, resultType, Set.of(), List.of(x), List.of());
 7806         }
 7807 
 7808         @Override
 7809         public SequencedSet<OnnxParameter> onnxOutputs() {
 7810             return onnxOutputs(SCHEMA);
 7811         }
 7812 
 7813         @Override
 7814         public SequencedMap<OnnxParameter, Object> onnxInputs() {
 7815             return onnxInputs(SCHEMA, List.of(x()));
 7816         }
 7817 
 7818         public Value x() {
 7819             return operands().get(0);
 7820         }
 7821 
 7822     }
 7823 
 7824     public static DynamicQuantizeLinear DynamicQuantizeLinear(TypeElement resultType, Value x) {
 7825         return new DynamicQuantizeLinear(resultType, x);
 7826     }
 7827 
 7828     @OpFactoryHelper.OpDeclaration(Einsum.NAME)
 7829     public static final class Einsum extends OnnxOp {
 7830         public static final String NAME = "Einsum";
 7831 
 7832         public enum Attribute implements OnnxAttribute {
 7833             equation(String.class, false, null),
 7834             ;
 7835 
 7836                 final Class<?> t;
 7837                 final boolean optional;
 7838                 final Object defaultValue;
 7839 
 7840                 Attribute(Class<?> type, boolean optional, Object defaultValue) {
 7841                     this.t = type;
 7842                     this.optional = optional;
 7843                     this.defaultValue = defaultValue;
 7844                     assert optional || defaultValue == null;
 7845                 }
 7846 
 7847                 public Class<?> type() {
 7848                     return t;
 7849                 }
 7850 
 7851                 public boolean isOptional() {
 7852                     return optional;
 7853                 }
 7854 
 7855                 public Object defaultValue() {
 7856                     return defaultValue;
 7857                 }
 7858         }
 7859 
 7860         public enum TypeConstraint implements OnnxTypeConstraint {
 7861             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())))),
 7862             ;
 7863 
 7864             final OnnxType.TypeVariable typeVariable;
 7865 
 7866             TypeConstraint(OnnxType.TypeVariable typeVariable) {
 7867                 assert typeVariable.name().equals(name());
 7868                 this.typeVariable = typeVariable;
 7869             }
 7870 
 7871             @Override
 7872             public OnnxType.TypeVariable typeVariable() {
 7873                 return typeVariable;
 7874             }
 7875         }
 7876 
 7877         public enum InputParameter implements OnnxParameter {
 7878             Inputs(TypeConstraint.T.typeVariable(), Quantifier.VARIADIC),
 7879             ;
 7880 
 7881             final OnnxType type;
 7882             final Quantifier quantifier;
 7883 
 7884             InputParameter(OnnxType type, Quantifier quantifier) {
 7885                 this.type = type;
 7886                 this.quantifier = quantifier;
 7887             }
 7888 
 7889             @Override
 7890             public OnnxType type() {
 7891                 return type;
 7892             }
 7893 
 7894             @Override
 7895             public Quantifier quantifier() {
 7896                 return quantifier;
 7897             }
 7898         }
 7899 
 7900         public enum OutputParameter implements OnnxParameter {
 7901             Output(TypeConstraint.T.typeVariable(), Quantifier.REQUIRED),
 7902             ;
 7903 
 7904             final OnnxType type;
 7905             final Quantifier quantifier;
 7906 
 7907             OutputParameter(OnnxType type, Quantifier quantifier) {
 7908                 this.type = type;
 7909                 this.quantifier = quantifier;
 7910             }
 7911 
 7912             @Override
 7913             public OnnxType type() {
 7914                 return type;
 7915             }
 7916 
 7917             @Override
 7918             public Quantifier quantifier() {
 7919                 return quantifier;
 7920             }
 7921         }
 7922 
 7923         public static final OnnxSchema SCHEMA = new OnnxSchemaRecord(
 7924                 NAME,
 7925                 List.of(Attribute.values()),
 7926                 List.of(TypeConstraint.values()),
 7927                 List.of(InputParameter.values()),
 7928                 List.of(OutputParameter.values())
 7929         );
 7930 
 7931         public Einsum(ExternalizedOp def) {
 7932             super(SCHEMA, def);
 7933         }
 7934 
 7935         Einsum(Einsum that, CopyContext cc) {
 7936             super(that, cc);
 7937         }
 7938 
 7939         @Override
 7940         public Einsum transform(CopyContext cc, OpTransformer ot) {
 7941             return new Einsum(this, cc);
 7942         }
 7943 
 7944         Einsum(TypeElement resultType, List<Value> Inputs, String equation) {
 7945             super(SCHEMA, resultType, Set.of(), List.of(Inputs), List.of(equation));
 7946         }
 7947 
 7948         @Override
 7949         public SequencedSet<OnnxParameter> onnxOutputs() {
 7950             return onnxOutputs(SCHEMA);
 7951         }
 7952 
 7953         @Override
 7954         public SequencedMap<OnnxParameter, Object> onnxInputs() {
 7955             return onnxInputs(SCHEMA, List.of(Inputs()));
 7956         }
 7957 
 7958         public List<Value> Inputs() {
 7959             return operands();
 7960         }
 7961 
 7962         public String equation() {
 7963             String equation = Attribute.equation.access(String.class, onnxAttributes);
 7964             return equation;
 7965         }
 7966 
 7967     }
 7968 
 7969     public static Einsum Einsum(TypeElement resultType, List<Value> Inputs, String equation) {
 7970         return new Einsum(resultType, Inputs, equation);
 7971     }
 7972 
 7973     @OpFactoryHelper.OpDeclaration(Elu.NAME)
 7974     public static final class Elu extends OnnxOp {
 7975         public static final String NAME = "Elu";
 7976 
 7977         public enum Attribute implements OnnxAttribute {
 7978             alpha(Float.class, true, 1.0f),
 7979             ;
 7980 
 7981                 final Class<?> t;
 7982                 final boolean optional;
 7983                 final Object defaultValue;
 7984 
 7985                 Attribute(Class<?> type, boolean optional, Object defaultValue) {
 7986                     this.t = type;
 7987                     this.optional = optional;
 7988                     this.defaultValue = defaultValue;
 7989                     assert optional || defaultValue == null;
 7990                 }
 7991 
 7992                 public Class<?> type() {
 7993                     return t;
 7994                 }
 7995 
 7996                 public boolean isOptional() {
 7997                     return optional;
 7998                 }
 7999 
 8000                 public Object defaultValue() {
 8001                     return defaultValue;
 8002                 }
 8003         }
 8004 
 8005         public enum TypeConstraint implements OnnxTypeConstraint {
 8006             T(new OnnxType.TypeVariable("T", List.of(OnnxType.tensor(OnnxType.bfloat16()), OnnxType.tensor(OnnxType.float16()), OnnxType.tensor(OnnxType.float32()), OnnxType.tensor(OnnxType.float64())))),
 8007             ;
 8008 
 8009             final OnnxType.TypeVariable typeVariable;
 8010 
 8011             TypeConstraint(OnnxType.TypeVariable typeVariable) {
 8012                 assert typeVariable.name().equals(name());
 8013                 this.typeVariable = typeVariable;
 8014             }
 8015 
 8016             @Override
 8017             public OnnxType.TypeVariable typeVariable() {
 8018                 return typeVariable;
 8019             }
 8020         }
 8021 
 8022         public enum InputParameter implements OnnxParameter {
 8023             X(TypeConstraint.T.typeVariable(), Quantifier.REQUIRED),
 8024             ;
 8025 
 8026             final OnnxType type;
 8027             final Quantifier quantifier;
 8028 
 8029             InputParameter(OnnxType type, Quantifier quantifier) {
 8030                 this.type = type;
 8031                 this.quantifier = quantifier;
 8032             }
 8033 
 8034             @Override
 8035             public OnnxType type() {
 8036                 return type;
 8037             }
 8038 
 8039             @Override
 8040             public Quantifier quantifier() {
 8041                 return quantifier;
 8042             }
 8043         }
 8044 
 8045         public enum OutputParameter implements OnnxParameter {
 8046             Y(TypeConstraint.T.typeVariable(), Quantifier.REQUIRED),
 8047             ;
 8048 
 8049             final OnnxType type;
 8050             final Quantifier quantifier;
 8051 
 8052             OutputParameter(OnnxType type, Quantifier quantifier) {
 8053                 this.type = type;
 8054                 this.quantifier = quantifier;
 8055             }
 8056 
 8057             @Override
 8058             public OnnxType type() {
 8059                 return type;
 8060             }
 8061 
 8062             @Override
 8063             public Quantifier quantifier() {
 8064                 return quantifier;
 8065             }
 8066         }
 8067 
 8068         public static final OnnxSchema SCHEMA = new OnnxSchemaRecord(
 8069                 NAME,
 8070                 List.of(Attribute.values()),
 8071                 List.of(TypeConstraint.values()),
 8072                 List.of(InputParameter.values()),
 8073                 List.of(OutputParameter.values())
 8074         );
 8075 
 8076         public Elu(ExternalizedOp def) {
 8077             super(SCHEMA, def);
 8078         }
 8079 
 8080         Elu(Elu that, CopyContext cc) {
 8081             super(that, cc);
 8082         }
 8083 
 8084         @Override
 8085         public Elu transform(CopyContext cc, OpTransformer ot) {
 8086             return new Elu(this, cc);
 8087         }
 8088 
 8089         Elu(TypeElement resultType, Value X, java.util.Optional<Float> alpha) {
 8090             super(SCHEMA, resultType, Set.of(), List.of(X), List.of(alpha));
 8091         }
 8092 
 8093         @Override
 8094         public SequencedSet<OnnxParameter> onnxOutputs() {
 8095             return onnxOutputs(SCHEMA);
 8096         }
 8097 
 8098         @Override
 8099         public SequencedMap<OnnxParameter, Object> onnxInputs() {
 8100             return onnxInputs(SCHEMA, List.of(X()));
 8101         }
 8102 
 8103         public Value X() {
 8104             return operands().get(0);
 8105         }
 8106 
 8107         public java.util.Optional<Float> alpha() {
 8108             Float alpha = Attribute.alpha.access(Float.class, onnxAttributes);
 8109             return java.util.Optional.ofNullable(alpha);
 8110         }
 8111 
 8112     }
 8113 
 8114     public static Elu Elu(TypeElement resultType, Value X, java.util.Optional<Float> alpha) {
 8115         return new Elu(resultType, X, alpha);
 8116     }
 8117 
 8118     @OpFactoryHelper.OpDeclaration(Equal.NAME)
 8119     public static final class Equal extends OnnxOp {
 8120         public static final String NAME = "Equal";
 8121 
 8122         public enum Attribute implements OnnxAttribute.None { }
 8123 
 8124         public enum TypeConstraint implements OnnxTypeConstraint {
 8125             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())))),
 8126             T1(new OnnxType.TypeVariable("T1", List.of(OnnxType.tensor(OnnxType.bool())))),
 8127             ;
 8128 
 8129             final OnnxType.TypeVariable typeVariable;
 8130 
 8131             TypeConstraint(OnnxType.TypeVariable typeVariable) {
 8132                 assert typeVariable.name().equals(name());
 8133                 this.typeVariable = typeVariable;
 8134             }
 8135 
 8136             @Override
 8137             public OnnxType.TypeVariable typeVariable() {
 8138                 return typeVariable;
 8139             }
 8140         }
 8141 
 8142         public enum InputParameter implements OnnxParameter {
 8143             A(TypeConstraint.T.typeVariable(), Quantifier.REQUIRED),
 8144             B(TypeConstraint.T.typeVariable(), Quantifier.REQUIRED),
 8145             ;
 8146 
 8147             final OnnxType type;
 8148             final Quantifier quantifier;
 8149 
 8150             InputParameter(OnnxType type, Quantifier quantifier) {
 8151                 this.type = type;
 8152                 this.quantifier = quantifier;
 8153             }
 8154 
 8155             @Override
 8156             public OnnxType type() {
 8157                 return type;
 8158             }
 8159 
 8160             @Override
 8161             public Quantifier quantifier() {
 8162                 return quantifier;
 8163             }
 8164         }
 8165 
 8166         public enum OutputParameter implements OnnxParameter {
 8167             C(TypeConstraint.T1.typeVariable(), Quantifier.REQUIRED),
 8168             ;
 8169 
 8170             final OnnxType type;
 8171             final Quantifier quantifier;
 8172 
 8173             OutputParameter(OnnxType type, Quantifier quantifier) {
 8174                 this.type = type;
 8175                 this.quantifier = quantifier;
 8176             }
 8177 
 8178             @Override
 8179             public OnnxType type() {
 8180                 return type;
 8181             }
 8182 
 8183             @Override
 8184             public Quantifier quantifier() {
 8185                 return quantifier;
 8186             }
 8187         }
 8188 
 8189         public static final OnnxSchema SCHEMA = new OnnxSchemaRecord(
 8190                 NAME,
 8191                 List.of(Attribute.values()),
 8192                 List.of(TypeConstraint.values()),
 8193                 List.of(InputParameter.values()),
 8194                 List.of(OutputParameter.values())
 8195         );
 8196 
 8197         public Equal(ExternalizedOp def) {
 8198             super(SCHEMA, def);
 8199         }
 8200 
 8201         Equal(Equal that, CopyContext cc) {
 8202             super(that, cc);
 8203         }
 8204 
 8205         @Override
 8206         public Equal transform(CopyContext cc, OpTransformer ot) {
 8207             return new Equal(this, cc);
 8208         }
 8209 
 8210         Equal(TypeElement resultType, Value A, Value B) {
 8211             super(SCHEMA, resultType, Set.of(), List.of(A, B), List.of());
 8212         }
 8213 
 8214         @Override
 8215         public SequencedSet<OnnxParameter> onnxOutputs() {
 8216             return onnxOutputs(SCHEMA);
 8217         }
 8218 
 8219         @Override
 8220         public SequencedMap<OnnxParameter, Object> onnxInputs() {
 8221             return onnxInputs(SCHEMA, List.of(A(), B()));
 8222         }
 8223 
 8224         public Value A() {
 8225             return operands().get(0);
 8226         }
 8227 
 8228         public Value B() {
 8229             return operands().get(1);
 8230         }
 8231 
 8232     }
 8233 
 8234     public static Equal Equal(TypeElement resultType, Value A, Value B) {
 8235         return new Equal(resultType, A, B);
 8236     }
 8237 
 8238     @OpFactoryHelper.OpDeclaration(Erf.NAME)
 8239     public static final class Erf extends OnnxOp {
 8240         public static final String NAME = "Erf";
 8241 
 8242         public enum Attribute implements OnnxAttribute.None { }
 8243 
 8244         public enum TypeConstraint implements OnnxTypeConstraint {
 8245             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())))),
 8246             ;
 8247 
 8248             final OnnxType.TypeVariable typeVariable;
 8249 
 8250             TypeConstraint(OnnxType.TypeVariable typeVariable) {
 8251                 assert typeVariable.name().equals(name());
 8252                 this.typeVariable = typeVariable;
 8253             }
 8254 
 8255             @Override
 8256             public OnnxType.TypeVariable typeVariable() {
 8257                 return typeVariable;
 8258             }
 8259         }
 8260 
 8261         public enum InputParameter implements OnnxParameter {
 8262             input(TypeConstraint.T.typeVariable(), Quantifier.REQUIRED),
 8263             ;
 8264 
 8265             final OnnxType type;
 8266             final Quantifier quantifier;
 8267 
 8268             InputParameter(OnnxType type, Quantifier quantifier) {
 8269                 this.type = type;
 8270                 this.quantifier = quantifier;
 8271             }
 8272 
 8273             @Override
 8274             public OnnxType type() {
 8275                 return type;
 8276             }
 8277 
 8278             @Override
 8279             public Quantifier quantifier() {
 8280                 return quantifier;
 8281             }
 8282         }
 8283 
 8284         public enum OutputParameter implements OnnxParameter {
 8285             output(TypeConstraint.T.typeVariable(), Quantifier.REQUIRED),
 8286             ;
 8287 
 8288             final OnnxType type;
 8289             final Quantifier quantifier;
 8290 
 8291             OutputParameter(OnnxType type, Quantifier quantifier) {
 8292                 this.type = type;
 8293                 this.quantifier = quantifier;
 8294             }
 8295 
 8296             @Override
 8297             public OnnxType type() {
 8298                 return type;
 8299             }
 8300 
 8301             @Override
 8302             public Quantifier quantifier() {
 8303                 return quantifier;
 8304             }
 8305         }
 8306 
 8307         public static final OnnxSchema SCHEMA = new OnnxSchemaRecord(
 8308                 NAME,
 8309                 List.of(Attribute.values()),
 8310                 List.of(TypeConstraint.values()),
 8311                 List.of(InputParameter.values()),
 8312                 List.of(OutputParameter.values())
 8313         );
 8314 
 8315         public Erf(ExternalizedOp def) {
 8316             super(SCHEMA, def);
 8317         }
 8318 
 8319         Erf(Erf that, CopyContext cc) {
 8320             super(that, cc);
 8321         }
 8322 
 8323         @Override
 8324         public Erf transform(CopyContext cc, OpTransformer ot) {
 8325             return new Erf(this, cc);
 8326         }
 8327 
 8328         Erf(TypeElement resultType, Value input) {
 8329             super(SCHEMA, resultType, Set.of(), List.of(input), List.of());
 8330         }
 8331 
 8332         @Override
 8333         public SequencedSet<OnnxParameter> onnxOutputs() {
 8334             return onnxOutputs(SCHEMA);
 8335         }
 8336 
 8337         @Override
 8338         public SequencedMap<OnnxParameter, Object> onnxInputs() {
 8339             return onnxInputs(SCHEMA, List.of(input()));
 8340         }
 8341 
 8342         public Value input() {
 8343             return operands().get(0);
 8344         }
 8345 
 8346     }
 8347 
 8348     public static Erf Erf(TypeElement resultType, Value input) {
 8349         return new Erf(resultType, input);
 8350     }
 8351 
 8352     @OpFactoryHelper.OpDeclaration(Exp.NAME)
 8353     public static final class Exp extends OnnxOp {
 8354         public static final String NAME = "Exp";
 8355 
 8356         public enum Attribute implements OnnxAttribute.None { }
 8357 
 8358         public enum TypeConstraint implements OnnxTypeConstraint {
 8359             T(new OnnxType.TypeVariable("T", List.of(OnnxType.tensor(OnnxType.bfloat16()), OnnxType.tensor(OnnxType.float16()), OnnxType.tensor(OnnxType.float32()), OnnxType.tensor(OnnxType.float64())))),
 8360             ;
 8361 
 8362             final OnnxType.TypeVariable typeVariable;
 8363 
 8364             TypeConstraint(OnnxType.TypeVariable typeVariable) {
 8365                 assert typeVariable.name().equals(name());
 8366                 this.typeVariable = typeVariable;
 8367             }
 8368 
 8369             @Override
 8370             public OnnxType.TypeVariable typeVariable() {
 8371                 return typeVariable;
 8372             }
 8373         }
 8374 
 8375         public enum InputParameter implements OnnxParameter {
 8376             input(TypeConstraint.T.typeVariable(), Quantifier.REQUIRED),
 8377             ;
 8378 
 8379             final OnnxType type;
 8380             final Quantifier quantifier;
 8381 
 8382             InputParameter(OnnxType type, Quantifier quantifier) {
 8383                 this.type = type;
 8384                 this.quantifier = quantifier;
 8385             }
 8386 
 8387             @Override
 8388             public OnnxType type() {
 8389                 return type;
 8390             }
 8391 
 8392             @Override
 8393             public Quantifier quantifier() {
 8394                 return quantifier;
 8395             }
 8396         }
 8397 
 8398         public enum OutputParameter implements OnnxParameter {
 8399             output(TypeConstraint.T.typeVariable(), Quantifier.REQUIRED),
 8400             ;
 8401 
 8402             final OnnxType type;
 8403             final Quantifier quantifier;
 8404 
 8405             OutputParameter(OnnxType type, Quantifier quantifier) {
 8406                 this.type = type;
 8407                 this.quantifier = quantifier;
 8408             }
 8409 
 8410             @Override
 8411             public OnnxType type() {
 8412                 return type;
 8413             }
 8414 
 8415             @Override
 8416             public Quantifier quantifier() {
 8417                 return quantifier;
 8418             }
 8419         }
 8420 
 8421         public static final OnnxSchema SCHEMA = new OnnxSchemaRecord(
 8422                 NAME,
 8423                 List.of(Attribute.values()),
 8424                 List.of(TypeConstraint.values()),
 8425                 List.of(InputParameter.values()),
 8426                 List.of(OutputParameter.values())
 8427         );
 8428 
 8429         public Exp(ExternalizedOp def) {
 8430             super(SCHEMA, def);
 8431         }
 8432 
 8433         Exp(Exp that, CopyContext cc) {
 8434             super(that, cc);
 8435         }
 8436 
 8437         @Override
 8438         public Exp transform(CopyContext cc, OpTransformer ot) {
 8439             return new Exp(this, cc);
 8440         }
 8441 
 8442         Exp(TypeElement resultType, Value input) {
 8443             super(SCHEMA, resultType, Set.of(), List.of(input), List.of());
 8444         }
 8445 
 8446         @Override
 8447         public SequencedSet<OnnxParameter> onnxOutputs() {
 8448             return onnxOutputs(SCHEMA);
 8449         }
 8450 
 8451         @Override
 8452         public SequencedMap<OnnxParameter, Object> onnxInputs() {
 8453             return onnxInputs(SCHEMA, List.of(input()));
 8454         }
 8455 
 8456         public Value input() {
 8457             return operands().get(0);
 8458         }
 8459 
 8460     }
 8461 
 8462     public static Exp Exp(TypeElement resultType, Value input) {
 8463         return new Exp(resultType, input);
 8464     }
 8465 
 8466     @OpFactoryHelper.OpDeclaration(Expand.NAME)
 8467     public static final class Expand extends OnnxOp {
 8468         public static final String NAME = "Expand";
 8469 
 8470         public enum Attribute implements OnnxAttribute.None { }
 8471 
 8472         public enum TypeConstraint implements OnnxTypeConstraint {
 8473             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())))),
 8474             ;
 8475 
 8476             final OnnxType.TypeVariable typeVariable;
 8477 
 8478             TypeConstraint(OnnxType.TypeVariable typeVariable) {
 8479                 assert typeVariable.name().equals(name());
 8480                 this.typeVariable = typeVariable;
 8481             }
 8482 
 8483             @Override
 8484             public OnnxType.TypeVariable typeVariable() {
 8485                 return typeVariable;
 8486             }
 8487         }
 8488 
 8489         public enum InputParameter implements OnnxParameter {
 8490             input(TypeConstraint.T.typeVariable(), Quantifier.REQUIRED),
 8491             shape(OnnxType.tensor(OnnxType.int64()), Quantifier.REQUIRED),
 8492             ;
 8493 
 8494             final OnnxType type;
 8495             final Quantifier quantifier;
 8496 
 8497             InputParameter(OnnxType type, Quantifier quantifier) {
 8498                 this.type = type;
 8499                 this.quantifier = quantifier;
 8500             }
 8501 
 8502             @Override
 8503             public OnnxType type() {
 8504                 return type;
 8505             }
 8506 
 8507             @Override
 8508             public Quantifier quantifier() {
 8509                 return quantifier;
 8510             }
 8511         }
 8512 
 8513         public enum OutputParameter implements OnnxParameter {
 8514             output(TypeConstraint.T.typeVariable(), Quantifier.REQUIRED),
 8515             ;
 8516 
 8517             final OnnxType type;
 8518             final Quantifier quantifier;
 8519 
 8520             OutputParameter(OnnxType type, Quantifier quantifier) {
 8521                 this.type = type;
 8522                 this.quantifier = quantifier;
 8523             }
 8524 
 8525             @Override
 8526             public OnnxType type() {
 8527                 return type;
 8528             }
 8529 
 8530             @Override
 8531             public Quantifier quantifier() {
 8532                 return quantifier;
 8533             }
 8534         }
 8535 
 8536         public static final OnnxSchema SCHEMA = new OnnxSchemaRecord(
 8537                 NAME,
 8538                 List.of(Attribute.values()),
 8539                 List.of(TypeConstraint.values()),
 8540                 List.of(InputParameter.values()),
 8541                 List.of(OutputParameter.values())
 8542         );
 8543 
 8544         public Expand(ExternalizedOp def) {
 8545             super(SCHEMA, def);
 8546         }
 8547 
 8548         Expand(Expand that, CopyContext cc) {
 8549             super(that, cc);
 8550         }
 8551 
 8552         @Override
 8553         public Expand transform(CopyContext cc, OpTransformer ot) {
 8554             return new Expand(this, cc);
 8555         }
 8556 
 8557         Expand(TypeElement resultType, Value input, Value shape) {
 8558             super(SCHEMA, resultType, Set.of(), List.of(input, shape), List.of());
 8559         }
 8560 
 8561         @Override
 8562         public SequencedSet<OnnxParameter> onnxOutputs() {
 8563             return onnxOutputs(SCHEMA);
 8564         }
 8565 
 8566         @Override
 8567         public SequencedMap<OnnxParameter, Object> onnxInputs() {
 8568             return onnxInputs(SCHEMA, List.of(input(), shape()));
 8569         }
 8570 
 8571         public Value input() {
 8572             return operands().get(0);
 8573         }
 8574 
 8575         public Value shape() {
 8576             return operands().get(1);
 8577         }
 8578 
 8579     }
 8580 
 8581     public static Expand Expand(TypeElement resultType, Value input, Value shape) {
 8582         return new Expand(resultType, input, shape);
 8583     }
 8584 
 8585     @OpFactoryHelper.OpDeclaration(EyeLike.NAME)
 8586     public static final class EyeLike extends OnnxOp {
 8587         public static final String NAME = "EyeLike";
 8588 
 8589         public enum Attribute implements OnnxAttribute {
 8590             dtype(Long.class, true, null),
 8591             k(Long.class, true, 0),
 8592             ;
 8593 
 8594                 final Class<?> t;
 8595                 final boolean optional;
 8596                 final Object defaultValue;
 8597 
 8598                 Attribute(Class<?> type, boolean optional, Object defaultValue) {
 8599                     this.t = type;
 8600                     this.optional = optional;
 8601                     this.defaultValue = defaultValue;
 8602                     assert optional || defaultValue == null;
 8603                 }
 8604 
 8605                 public Class<?> type() {
 8606                     return t;
 8607                 }
 8608 
 8609                 public boolean isOptional() {
 8610                     return optional;
 8611                 }
 8612 
 8613                 public Object defaultValue() {
 8614                     return defaultValue;
 8615                 }
 8616         }
 8617 
 8618         public enum TypeConstraint implements OnnxTypeConstraint {
 8619             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())))),
 8620             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())))),
 8621             ;
 8622 
 8623             final OnnxType.TypeVariable typeVariable;
 8624 
 8625             TypeConstraint(OnnxType.TypeVariable typeVariable) {
 8626                 assert typeVariable.name().equals(name());
 8627                 this.typeVariable = typeVariable;
 8628             }
 8629 
 8630             @Override
 8631             public OnnxType.TypeVariable typeVariable() {
 8632                 return typeVariable;
 8633             }
 8634         }
 8635 
 8636         public enum InputParameter implements OnnxParameter {
 8637             input(TypeConstraint.T1.typeVariable(), Quantifier.REQUIRED),
 8638             ;
 8639 
 8640             final OnnxType type;
 8641             final Quantifier quantifier;
 8642 
 8643             InputParameter(OnnxType type, Quantifier quantifier) {
 8644                 this.type = type;
 8645                 this.quantifier = quantifier;
 8646             }
 8647 
 8648             @Override
 8649             public OnnxType type() {
 8650                 return type;
 8651             }
 8652 
 8653             @Override
 8654             public Quantifier quantifier() {
 8655                 return quantifier;
 8656             }
 8657         }
 8658 
 8659         public enum OutputParameter implements OnnxParameter {
 8660             output(TypeConstraint.T2.typeVariable(), Quantifier.REQUIRED),
 8661             ;
 8662 
 8663             final OnnxType type;
 8664             final Quantifier quantifier;
 8665 
 8666             OutputParameter(OnnxType type, Quantifier quantifier) {
 8667                 this.type = type;
 8668                 this.quantifier = quantifier;
 8669             }
 8670 
 8671             @Override
 8672             public OnnxType type() {
 8673                 return type;
 8674             }
 8675 
 8676             @Override
 8677             public Quantifier quantifier() {
 8678                 return quantifier;
 8679             }
 8680         }
 8681 
 8682         public static final OnnxSchema SCHEMA = new OnnxSchemaRecord(
 8683                 NAME,
 8684                 List.of(Attribute.values()),
 8685                 List.of(TypeConstraint.values()),
 8686                 List.of(InputParameter.values()),
 8687                 List.of(OutputParameter.values())
 8688         );
 8689 
 8690         public EyeLike(ExternalizedOp def) {
 8691             super(SCHEMA, def);
 8692         }
 8693 
 8694         EyeLike(EyeLike that, CopyContext cc) {
 8695             super(that, cc);
 8696         }
 8697 
 8698         @Override
 8699         public EyeLike transform(CopyContext cc, OpTransformer ot) {
 8700             return new EyeLike(this, cc);
 8701         }
 8702 
 8703         EyeLike(TypeElement resultType, Value input, java.util.Optional<Long> dtype, java.util.Optional<Long> k) {
 8704             super(SCHEMA, resultType, Set.of(), List.of(input), List.of(dtype, k));
 8705         }
 8706 
 8707         @Override
 8708         public SequencedSet<OnnxParameter> onnxOutputs() {
 8709             return onnxOutputs(SCHEMA);
 8710         }
 8711 
 8712         @Override
 8713         public SequencedMap<OnnxParameter, Object> onnxInputs() {
 8714             return onnxInputs(SCHEMA, List.of(input()));
 8715         }
 8716 
 8717         public Value input() {
 8718             return operands().get(0);
 8719         }
 8720 
 8721         public java.util.Optional<Long> dtype() {
 8722             Long dtype = Attribute.dtype.access(Long.class, onnxAttributes);
 8723             return java.util.Optional.ofNullable(dtype);
 8724         }
 8725 
 8726         public java.util.Optional<Long> k() {
 8727             Long k = Attribute.k.access(Long.class, onnxAttributes);
 8728             return java.util.Optional.ofNullable(k);
 8729         }
 8730 
 8731     }
 8732 
 8733     public static EyeLike EyeLike(TypeElement resultType, Value input, java.util.Optional<Long> dtype, java.util.Optional<Long> k) {
 8734         return new EyeLike(resultType, input, dtype, k);
 8735     }
 8736 
 8737     @OpFactoryHelper.OpDeclaration(FeatureVectorizer.NAME)
 8738     public static final class FeatureVectorizer extends OnnxOp {
 8739         public static final String NAME = "FeatureVectorizer";
 8740 
 8741         public enum Attribute implements OnnxAttribute {
 8742             inputdimensions(long[].class, true, null),
 8743             ;
 8744 
 8745                 final Class<?> t;
 8746                 final boolean optional;
 8747                 final Object defaultValue;
 8748 
 8749                 Attribute(Class<?> type, boolean optional, Object defaultValue) {
 8750                     this.t = type;
 8751                     this.optional = optional;
 8752                     this.defaultValue = defaultValue;
 8753                     assert optional || defaultValue == null;
 8754                 }
 8755 
 8756                 public Class<?> type() {
 8757                     return t;
 8758                 }
 8759 
 8760                 public boolean isOptional() {
 8761                     return optional;
 8762                 }
 8763 
 8764                 public Object defaultValue() {
 8765                     return defaultValue;
 8766                 }
 8767         }
 8768 
 8769         public enum TypeConstraint implements OnnxTypeConstraint {
 8770             T1(new OnnxType.TypeVariable("T1", List.of(OnnxType.tensor(OnnxType.int32()), OnnxType.tensor(OnnxType.int64()), OnnxType.tensor(OnnxType.float32()), OnnxType.tensor(OnnxType.float64())))),
 8771             ;
 8772 
 8773             final OnnxType.TypeVariable typeVariable;
 8774 
 8775             TypeConstraint(OnnxType.TypeVariable typeVariable) {
 8776                 assert typeVariable.name().equals(name());
 8777                 this.typeVariable = typeVariable;
 8778             }
 8779 
 8780             @Override
 8781             public OnnxType.TypeVariable typeVariable() {
 8782                 return typeVariable;
 8783             }
 8784         }
 8785 
 8786         public enum InputParameter implements OnnxParameter {
 8787             X(TypeConstraint.T1.typeVariable(), Quantifier.VARIADIC),
 8788             ;
 8789 
 8790             final OnnxType type;
 8791             final Quantifier quantifier;
 8792 
 8793             InputParameter(OnnxType type, Quantifier quantifier) {
 8794                 this.type = type;
 8795                 this.quantifier = quantifier;
 8796             }
 8797 
 8798             @Override
 8799             public OnnxType type() {
 8800                 return type;
 8801             }
 8802 
 8803             @Override
 8804             public Quantifier quantifier() {
 8805                 return quantifier;
 8806             }
 8807         }
 8808 
 8809         public enum OutputParameter implements OnnxParameter {
 8810             Y(OnnxType.tensor(OnnxType.float32()), Quantifier.REQUIRED),
 8811             ;
 8812 
 8813             final OnnxType type;
 8814             final Quantifier quantifier;
 8815 
 8816             OutputParameter(OnnxType type, Quantifier quantifier) {
 8817                 this.type = type;
 8818                 this.quantifier = quantifier;
 8819             }
 8820 
 8821             @Override
 8822             public OnnxType type() {
 8823                 return type;
 8824             }
 8825 
 8826             @Override
 8827             public Quantifier quantifier() {
 8828                 return quantifier;
 8829             }
 8830         }
 8831 
 8832         public static final OnnxSchema SCHEMA = new OnnxSchemaRecord(
 8833                 NAME,
 8834                 List.of(Attribute.values()),
 8835                 List.of(TypeConstraint.values()),
 8836                 List.of(InputParameter.values()),
 8837                 List.of(OutputParameter.values())
 8838         );
 8839 
 8840         public FeatureVectorizer(ExternalizedOp def) {
 8841             super(SCHEMA, def);
 8842         }
 8843 
 8844         FeatureVectorizer(FeatureVectorizer that, CopyContext cc) {
 8845             super(that, cc);
 8846         }
 8847 
 8848         @Override
 8849         public FeatureVectorizer transform(CopyContext cc, OpTransformer ot) {
 8850             return new FeatureVectorizer(this, cc);
 8851         }
 8852 
 8853         FeatureVectorizer(TypeElement resultType, List<Value> X, java.util.Optional<long[]> inputdimensions) {
 8854             super(SCHEMA, resultType, Set.of(), List.of(X), List.of(inputdimensions));
 8855         }
 8856 
 8857         @Override
 8858         public SequencedSet<OnnxParameter> onnxOutputs() {
 8859             return onnxOutputs(SCHEMA);
 8860         }
 8861 
 8862         @Override
 8863         public SequencedMap<OnnxParameter, Object> onnxInputs() {
 8864             return onnxInputs(SCHEMA, List.of(X()));
 8865         }
 8866 
 8867         public List<Value> X() {
 8868             return operands();
 8869         }
 8870 
 8871         public java.util.Optional<long[]> inputdimensions() {
 8872             long[] inputdimensions = Attribute.inputdimensions.access(long[].class, onnxAttributes);
 8873             return java.util.Optional.ofNullable(inputdimensions).map(long[]::clone);
 8874         }
 8875 
 8876     }
 8877 
 8878     public static FeatureVectorizer FeatureVectorizer(TypeElement resultType, List<Value> X, java.util.Optional<long[]> inputdimensions) {
 8879         return new FeatureVectorizer(resultType, X, inputdimensions);
 8880     }
 8881 
 8882     @OpFactoryHelper.OpDeclaration(Flatten.NAME)
 8883     public static final class Flatten extends OnnxOp {
 8884         public static final String NAME = "Flatten";
 8885 
 8886         public enum Attribute implements OnnxAttribute {
 8887             axis(Long.class, true, 1),
 8888             ;
 8889 
 8890                 final Class<?> t;
 8891                 final boolean optional;
 8892                 final Object defaultValue;
 8893 
 8894                 Attribute(Class<?> type, boolean optional, Object defaultValue) {
 8895                     this.t = type;
 8896                     this.optional = optional;
 8897                     this.defaultValue = defaultValue;
 8898                     assert optional || defaultValue == null;
 8899                 }
 8900 
 8901                 public Class<?> type() {
 8902                     return t;
 8903                 }
 8904 
 8905                 public boolean isOptional() {
 8906                     return optional;
 8907                 }
 8908 
 8909                 public Object defaultValue() {
 8910                     return defaultValue;
 8911                 }
 8912         }
 8913 
 8914         public enum TypeConstraint implements OnnxTypeConstraint {
 8915             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())))),
 8916             ;
 8917 
 8918             final OnnxType.TypeVariable typeVariable;
 8919 
 8920             TypeConstraint(OnnxType.TypeVariable typeVariable) {
 8921                 assert typeVariable.name().equals(name());
 8922                 this.typeVariable = typeVariable;
 8923             }
 8924 
 8925             @Override
 8926             public OnnxType.TypeVariable typeVariable() {
 8927                 return typeVariable;
 8928             }
 8929         }
 8930 
 8931         public enum InputParameter implements OnnxParameter {
 8932             input(TypeConstraint.T.typeVariable(), Quantifier.REQUIRED),
 8933             ;
 8934 
 8935             final OnnxType type;
 8936             final Quantifier quantifier;
 8937 
 8938             InputParameter(OnnxType type, Quantifier quantifier) {
 8939                 this.type = type;
 8940                 this.quantifier = quantifier;
 8941             }
 8942 
 8943             @Override
 8944             public OnnxType type() {
 8945                 return type;
 8946             }
 8947 
 8948             @Override
 8949             public Quantifier quantifier() {
 8950                 return quantifier;
 8951             }
 8952         }
 8953 
 8954         public enum OutputParameter implements OnnxParameter {
 8955             output(TypeConstraint.T.typeVariable(), Quantifier.REQUIRED),
 8956             ;
 8957 
 8958             final OnnxType type;
 8959             final Quantifier quantifier;
 8960 
 8961             OutputParameter(OnnxType type, Quantifier quantifier) {
 8962                 this.type = type;
 8963                 this.quantifier = quantifier;
 8964             }
 8965 
 8966             @Override
 8967             public OnnxType type() {
 8968                 return type;
 8969             }
 8970 
 8971             @Override
 8972             public Quantifier quantifier() {
 8973                 return quantifier;
 8974             }
 8975         }
 8976 
 8977         public static final OnnxSchema SCHEMA = new OnnxSchemaRecord(
 8978                 NAME,
 8979                 List.of(Attribute.values()),
 8980                 List.of(TypeConstraint.values()),
 8981                 List.of(InputParameter.values()),
 8982                 List.of(OutputParameter.values())
 8983         );
 8984 
 8985         public Flatten(ExternalizedOp def) {
 8986             super(SCHEMA, def);
 8987         }
 8988 
 8989         Flatten(Flatten that, CopyContext cc) {
 8990             super(that, cc);
 8991         }
 8992 
 8993         @Override
 8994         public Flatten transform(CopyContext cc, OpTransformer ot) {
 8995             return new Flatten(this, cc);
 8996         }
 8997 
 8998         Flatten(TypeElement resultType, Value input, java.util.Optional<Long> axis) {
 8999             super(SCHEMA, resultType, Set.of(), List.of(input), List.of(axis));
 9000         }
 9001 
 9002         @Override
 9003         public SequencedSet<OnnxParameter> onnxOutputs() {
 9004             return onnxOutputs(SCHEMA);
 9005         }
 9006 
 9007         @Override
 9008         public SequencedMap<OnnxParameter, Object> onnxInputs() {
 9009             return onnxInputs(SCHEMA, List.of(input()));
 9010         }
 9011 
 9012         public Value input() {
 9013             return operands().get(0);
 9014         }
 9015 
 9016         public java.util.Optional<Long> axis() {
 9017             Long axis = Attribute.axis.access(Long.class, onnxAttributes);
 9018             return java.util.Optional.ofNullable(axis);
 9019         }
 9020 
 9021     }
 9022 
 9023     public static Flatten Flatten(TypeElement resultType, Value input, java.util.Optional<Long> axis) {
 9024         return new Flatten(resultType, input, axis);
 9025     }
 9026 
 9027     @OpFactoryHelper.OpDeclaration(Floor.NAME)
 9028     public static final class Floor extends OnnxOp {
 9029         public static final String NAME = "Floor";
 9030 
 9031         public enum Attribute implements OnnxAttribute.None { }
 9032 
 9033         public enum TypeConstraint implements OnnxTypeConstraint {
 9034             T(new OnnxType.TypeVariable("T", List.of(OnnxType.tensor(OnnxType.float16()), OnnxType.tensor(OnnxType.float32()), OnnxType.tensor(OnnxType.float64()), OnnxType.tensor(OnnxType.bfloat16())))),
 9035             ;
 9036 
 9037             final OnnxType.TypeVariable typeVariable;
 9038 
 9039             TypeConstraint(OnnxType.TypeVariable typeVariable) {
 9040                 assert typeVariable.name().equals(name());
 9041                 this.typeVariable = typeVariable;
 9042             }
 9043 
 9044             @Override
 9045             public OnnxType.TypeVariable typeVariable() {
 9046                 return typeVariable;
 9047             }
 9048         }
 9049 
 9050         public enum InputParameter implements OnnxParameter {
 9051             X(TypeConstraint.T.typeVariable(), Quantifier.REQUIRED),
 9052             ;
 9053 
 9054             final OnnxType type;
 9055             final Quantifier quantifier;
 9056 
 9057             InputParameter(OnnxType type, Quantifier quantifier) {
 9058                 this.type = type;
 9059                 this.quantifier = quantifier;
 9060             }
 9061 
 9062             @Override
 9063             public OnnxType type() {
 9064                 return type;
 9065             }
 9066 
 9067             @Override
 9068             public Quantifier quantifier() {
 9069                 return quantifier;
 9070             }
 9071         }
 9072 
 9073         public enum OutputParameter implements OnnxParameter {
 9074             Y(TypeConstraint.T.typeVariable(), Quantifier.REQUIRED),
 9075             ;
 9076 
 9077             final OnnxType type;
 9078             final Quantifier quantifier;
 9079 
 9080             OutputParameter(OnnxType type, Quantifier quantifier) {
 9081                 this.type = type;
 9082                 this.quantifier = quantifier;
 9083             }
 9084 
 9085             @Override
 9086             public OnnxType type() {
 9087                 return type;
 9088             }
 9089 
 9090             @Override
 9091             public Quantifier quantifier() {
 9092                 return quantifier;
 9093             }
 9094         }
 9095 
 9096         public static final OnnxSchema SCHEMA = new OnnxSchemaRecord(
 9097                 NAME,
 9098                 List.of(Attribute.values()),
 9099                 List.of(TypeConstraint.values()),
 9100                 List.of(InputParameter.values()),
 9101                 List.of(OutputParameter.values())
 9102         );
 9103 
 9104         public Floor(ExternalizedOp def) {
 9105             super(SCHEMA, def);
 9106         }
 9107 
 9108         Floor(Floor that, CopyContext cc) {
 9109             super(that, cc);
 9110         }
 9111 
 9112         @Override
 9113         public Floor transform(CopyContext cc, OpTransformer ot) {
 9114             return new Floor(this, cc);
 9115         }
 9116 
 9117         Floor(TypeElement resultType, Value X) {
 9118             super(SCHEMA, resultType, Set.of(), List.of(X), List.of());
 9119         }
 9120 
 9121         @Override
 9122         public SequencedSet<OnnxParameter> onnxOutputs() {
 9123             return onnxOutputs(SCHEMA);
 9124         }
 9125 
 9126         @Override
 9127         public SequencedMap<OnnxParameter, Object> onnxInputs() {
 9128             return onnxInputs(SCHEMA, List.of(X()));
 9129         }
 9130 
 9131         public Value X() {
 9132             return operands().get(0);
 9133         }
 9134 
 9135     }
 9136 
 9137     public static Floor Floor(TypeElement resultType, Value X) {
 9138         return new Floor(resultType, X);
 9139     }
 9140 
 9141     @OpFactoryHelper.OpDeclaration(GRU.NAME)
 9142     public static final class GRU extends OnnxOp {
 9143         public static final String NAME = "GRU";
 9144 
 9145         public enum Attribute implements OnnxAttribute {
 9146             layout(Long.class, true, 0),
 9147             activation_alpha(float[].class, true, null),
 9148             hidden_size(Long.class, true, null),
 9149             activation_beta(float[].class, true, null),
 9150             activations(String[].class, true, null),
 9151             linear_before_reset(Long.class, true, 0),
 9152             clip(Float.class, true, null),
 9153             direction(String.class, true, "forward"),
 9154             ;
 9155 
 9156                 final Class<?> t;
 9157                 final boolean optional;
 9158                 final Object defaultValue;
 9159 
 9160                 Attribute(Class<?> type, boolean optional, Object defaultValue) {
 9161                     this.t = type;
 9162                     this.optional = optional;
 9163                     this.defaultValue = defaultValue;
 9164                     assert optional || defaultValue == null;
 9165                 }
 9166 
 9167                 public Class<?> type() {
 9168                     return t;
 9169                 }
 9170 
 9171                 public boolean isOptional() {
 9172                     return optional;
 9173                 }
 9174 
 9175                 public Object defaultValue() {
 9176                     return defaultValue;
 9177                 }
 9178         }
 9179 
 9180         public enum TypeConstraint implements OnnxTypeConstraint {
 9181             T(new OnnxType.TypeVariable("T", List.of(OnnxType.tensor(OnnxType.bfloat16()), OnnxType.tensor(OnnxType.float16()), OnnxType.tensor(OnnxType.float32()), OnnxType.tensor(OnnxType.float64())))),
 9182             T1(new OnnxType.TypeVariable("T1", List.of(OnnxType.tensor(OnnxType.int32())))),
 9183             ;
 9184 
 9185             final OnnxType.TypeVariable typeVariable;
 9186 
 9187             TypeConstraint(OnnxType.TypeVariable typeVariable) {
 9188                 assert typeVariable.name().equals(name());
 9189                 this.typeVariable = typeVariable;
 9190             }
 9191 
 9192             @Override
 9193             public OnnxType.TypeVariable typeVariable() {
 9194                 return typeVariable;
 9195             }
 9196         }
 9197 
 9198         public enum InputParameter implements OnnxParameter {
 9199             X(TypeConstraint.T.typeVariable(), Quantifier.REQUIRED),
 9200             W(TypeConstraint.T.typeVariable(), Quantifier.REQUIRED),
 9201             R(TypeConstraint.T.typeVariable(), Quantifier.REQUIRED),
 9202             B(TypeConstraint.T.typeVariable(), Quantifier.OPTIONAL),
 9203             sequence_lens(TypeConstraint.T1.typeVariable(), Quantifier.OPTIONAL),
 9204             initial_h(TypeConstraint.T.typeVariable(), Quantifier.OPTIONAL),
 9205             ;
 9206 
 9207             final OnnxType type;
 9208             final Quantifier quantifier;
 9209 
 9210             InputParameter(OnnxType type, Quantifier quantifier) {
 9211                 this.type = type;
 9212                 this.quantifier = quantifier;
 9213             }
 9214 
 9215             @Override
 9216             public OnnxType type() {
 9217                 return type;
 9218             }
 9219 
 9220             @Override
 9221             public Quantifier quantifier() {
 9222                 return quantifier;
 9223             }
 9224         }
 9225 
 9226         public enum OutputParameter implements OnnxParameter {
 9227             Y(TypeConstraint.T.typeVariable(), Quantifier.OPTIONAL),
 9228             Y_h(TypeConstraint.T.typeVariable(), Quantifier.OPTIONAL),
 9229             ;
 9230 
 9231             final OnnxType type;
 9232             final Quantifier quantifier;
 9233 
 9234             OutputParameter(OnnxType type, Quantifier quantifier) {
 9235                 this.type = type;
 9236                 this.quantifier = quantifier;
 9237             }
 9238 
 9239             @Override
 9240             public OnnxType type() {
 9241                 return type;
 9242             }
 9243 
 9244             @Override
 9245             public Quantifier quantifier() {
 9246                 return quantifier;
 9247             }
 9248         }
 9249 
 9250         public static final OnnxSchema SCHEMA = new OnnxSchemaRecord(
 9251                 NAME,
 9252                 List.of(Attribute.values()),
 9253                 List.of(TypeConstraint.values()),
 9254                 List.of(InputParameter.values()),
 9255                 List.of(OutputParameter.values())
 9256         );
 9257 
 9258         public GRU(ExternalizedOp def) {
 9259             super(SCHEMA, def);
 9260         }
 9261 
 9262         GRU(GRU that, CopyContext cc) {
 9263             super(that, cc);
 9264         }
 9265 
 9266         @Override
 9267         public GRU transform(CopyContext cc, OpTransformer ot) {
 9268             return new GRU(this, cc);
 9269         }
 9270 
 9271         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<Long> layout, java.util.Optional<float[]> activation_alpha, java.util.Optional<Long> hidden_size, java.util.Optional<float[]> activation_beta, java.util.Optional<String[]> activations, java.util.Optional<Long> linear_before_reset, java.util.Optional<Float> clip, java.util.Optional<String> direction) {
 9272             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));
 9273         }
 9274 
 9275         @Override
 9276         public SequencedSet<OnnxParameter> onnxOutputs() {
 9277             return onnxOutputs(SCHEMA);
 9278         }
 9279 
 9280         @Override
 9281         public SequencedMap<OnnxParameter, Object> onnxInputs() {
 9282             return onnxInputs(SCHEMA, List.of(X(), W(), R(), B(), sequence_lens(), initial_h()));
 9283         }
 9284 
 9285         public Value X() {
 9286             return operands().get(0);
 9287         }
 9288 
 9289         public Value W() {
 9290             return operands().get(1);
 9291         }
 9292 
 9293         public Value R() {
 9294             return operands().get(2);
 9295         }
 9296 
 9297         public java.util.Optional<Value> B() {
 9298             int i = optionalInputArguments.indexOf(InputParameter.B);
 9299             return i != -1 ? java.util.Optional.of(operands().get(3 + i)) : java.util.Optional.empty();
 9300         }
 9301 
 9302         public java.util.Optional<Value> sequence_lens() {
 9303             int i = optionalInputArguments.indexOf(InputParameter.sequence_lens);
 9304             return i != -1 ? java.util.Optional.of(operands().get(3 + i)) : java.util.Optional.empty();
 9305         }
 9306 
 9307         public java.util.Optional<Value> initial_h() {
 9308             int i = optionalInputArguments.indexOf(InputParameter.initial_h);
 9309             return i != -1 ? java.util.Optional.of(operands().get(3 + i)) : java.util.Optional.empty();
 9310         }
 9311 
 9312         public java.util.Optional<Long> layout() {
 9313             Long layout = Attribute.layout.access(Long.class, onnxAttributes);
 9314             return java.util.Optional.ofNullable(layout);
 9315         }
 9316 
 9317         public java.util.Optional<float[]> activation_alpha() {
 9318             float[] activation_alpha = Attribute.activation_alpha.access(float[].class, onnxAttributes);
 9319             return java.util.Optional.ofNullable(activation_alpha).map(float[]::clone);
 9320         }
 9321 
 9322         public java.util.Optional<Long> hidden_size() {
 9323             Long hidden_size = Attribute.hidden_size.access(Long.class, onnxAttributes);
 9324             return java.util.Optional.ofNullable(hidden_size);
 9325         }
 9326 
 9327         public java.util.Optional<float[]> activation_beta() {
 9328             float[] activation_beta = Attribute.activation_beta.access(float[].class, onnxAttributes);
 9329             return java.util.Optional.ofNullable(activation_beta).map(float[]::clone);
 9330         }
 9331 
 9332         public java.util.Optional<String[]> activations() {
 9333             String[] activations = Attribute.activations.access(String[].class, onnxAttributes);
 9334             return java.util.Optional.ofNullable(activations).map(String[]::clone);
 9335         }
 9336 
 9337         public java.util.Optional<Long> linear_before_reset() {
 9338             Long linear_before_reset = Attribute.linear_before_reset.access(Long.class, onnxAttributes);
 9339             return java.util.Optional.ofNullable(linear_before_reset);
 9340         }
 9341 
 9342         public java.util.Optional<Float> clip() {
 9343             Float clip = Attribute.clip.access(Float.class, onnxAttributes);
 9344             return java.util.Optional.ofNullable(clip);
 9345         }
 9346 
 9347         public java.util.Optional<String> direction() {
 9348             String direction = Attribute.direction.access(String.class, onnxAttributes);
 9349             return java.util.Optional.ofNullable(direction);
 9350         }
 9351 
 9352     }
 9353 
 9354     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<Long> layout, java.util.Optional<float[]> activation_alpha, java.util.Optional<Long> hidden_size, java.util.Optional<float[]> activation_beta, java.util.Optional<String[]> activations, java.util.Optional<Long> linear_before_reset, java.util.Optional<Float> clip, java.util.Optional<String> direction) {
 9355         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);
 9356     }
 9357 
 9358     @OpFactoryHelper.OpDeclaration(Gather.NAME)
 9359     public static final class Gather extends OnnxOp {
 9360         public static final String NAME = "Gather";
 9361 
 9362         public enum Attribute implements OnnxAttribute {
 9363             axis(Long.class, true, 0),
 9364             ;
 9365 
 9366                 final Class<?> t;
 9367                 final boolean optional;
 9368                 final Object defaultValue;
 9369 
 9370                 Attribute(Class<?> type, boolean optional, Object defaultValue) {
 9371                     this.t = type;
 9372                     this.optional = optional;
 9373                     this.defaultValue = defaultValue;
 9374                     assert optional || defaultValue == null;
 9375                 }
 9376 
 9377                 public Class<?> type() {
 9378                     return t;
 9379                 }
 9380 
 9381                 public boolean isOptional() {
 9382                     return optional;
 9383                 }
 9384 
 9385                 public Object defaultValue() {
 9386                     return defaultValue;
 9387                 }
 9388         }
 9389 
 9390         public enum TypeConstraint implements OnnxTypeConstraint {
 9391             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())))),
 9392             Tind(new OnnxType.TypeVariable("Tind", List.of(OnnxType.tensor(OnnxType.int32()), OnnxType.tensor(OnnxType.int64())))),
 9393             ;
 9394 
 9395             final OnnxType.TypeVariable typeVariable;
 9396 
 9397             TypeConstraint(OnnxType.TypeVariable typeVariable) {
 9398                 assert typeVariable.name().equals(name());
 9399                 this.typeVariable = typeVariable;
 9400             }
 9401 
 9402             @Override
 9403             public OnnxType.TypeVariable typeVariable() {
 9404                 return typeVariable;
 9405             }
 9406         }
 9407 
 9408         public enum InputParameter implements OnnxParameter {
 9409             data(TypeConstraint.T.typeVariable(), Quantifier.REQUIRED),
 9410             indices(TypeConstraint.Tind.typeVariable(), Quantifier.REQUIRED),
 9411             ;
 9412 
 9413             final OnnxType type;
 9414             final Quantifier quantifier;
 9415 
 9416             InputParameter(OnnxType type, Quantifier quantifier) {
 9417                 this.type = type;
 9418                 this.quantifier = quantifier;
 9419             }
 9420 
 9421             @Override
 9422             public OnnxType type() {
 9423                 return type;
 9424             }
 9425 
 9426             @Override
 9427             public Quantifier quantifier() {
 9428                 return quantifier;
 9429             }
 9430         }
 9431 
 9432         public enum OutputParameter implements OnnxParameter {
 9433             output(TypeConstraint.T.typeVariable(), Quantifier.REQUIRED),
 9434             ;
 9435 
 9436             final OnnxType type;
 9437             final Quantifier quantifier;
 9438 
 9439             OutputParameter(OnnxType type, Quantifier quantifier) {
 9440                 this.type = type;
 9441                 this.quantifier = quantifier;
 9442             }
 9443 
 9444             @Override
 9445             public OnnxType type() {
 9446                 return type;
 9447             }
 9448 
 9449             @Override
 9450             public Quantifier quantifier() {
 9451                 return quantifier;
 9452             }
 9453         }
 9454 
 9455         public static final OnnxSchema SCHEMA = new OnnxSchemaRecord(
 9456                 NAME,
 9457                 List.of(Attribute.values()),
 9458                 List.of(TypeConstraint.values()),
 9459                 List.of(InputParameter.values()),
 9460                 List.of(OutputParameter.values())
 9461         );
 9462 
 9463         public Gather(ExternalizedOp def) {
 9464             super(SCHEMA, def);
 9465         }
 9466 
 9467         Gather(Gather that, CopyContext cc) {
 9468             super(that, cc);
 9469         }
 9470 
 9471         @Override
 9472         public Gather transform(CopyContext cc, OpTransformer ot) {
 9473             return new Gather(this, cc);
 9474         }
 9475 
 9476         Gather(TypeElement resultType, Value data, Value indices, java.util.Optional<Long> axis) {
 9477             super(SCHEMA, resultType, Set.of(), List.of(data, indices), List.of(axis));
 9478         }
 9479 
 9480         @Override
 9481         public SequencedSet<OnnxParameter> onnxOutputs() {
 9482             return onnxOutputs(SCHEMA);
 9483         }
 9484 
 9485         @Override
 9486         public SequencedMap<OnnxParameter, Object> onnxInputs() {
 9487             return onnxInputs(SCHEMA, List.of(data(), indices()));
 9488         }
 9489 
 9490         public Value data() {
 9491             return operands().get(0);
 9492         }
 9493 
 9494         public Value indices() {
 9495             return operands().get(1);
 9496         }
 9497 
 9498         public java.util.Optional<Long> axis() {
 9499             Long axis = Attribute.axis.access(Long.class, onnxAttributes);
 9500             return java.util.Optional.ofNullable(axis);
 9501         }
 9502 
 9503     }
 9504 
 9505     public static Gather Gather(TypeElement resultType, Value data, Value indices, java.util.Optional<Long> axis) {
 9506         return new Gather(resultType, data, indices, axis);
 9507     }
 9508 
 9509     @OpFactoryHelper.OpDeclaration(GatherElements.NAME)
 9510     public static final class GatherElements extends OnnxOp {
 9511         public static final String NAME = "GatherElements";
 9512 
 9513         public enum Attribute implements OnnxAttribute {
 9514             axis(Long.class, true, 0),
 9515             ;
 9516 
 9517                 final Class<?> t;
 9518                 final boolean optional;
 9519                 final Object defaultValue;
 9520 
 9521                 Attribute(Class<?> type, boolean optional, Object defaultValue) {
 9522                     this.t = type;
 9523                     this.optional = optional;
 9524                     this.defaultValue = defaultValue;
 9525                     assert optional || defaultValue == null;
 9526                 }
 9527 
 9528                 public Class<?> type() {
 9529                     return t;
 9530                 }
 9531 
 9532                 public boolean isOptional() {
 9533                     return optional;
 9534                 }
 9535 
 9536                 public Object defaultValue() {
 9537                     return defaultValue;
 9538                 }
 9539         }
 9540 
 9541         public enum TypeConstraint implements OnnxTypeConstraint {
 9542             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())))),
 9543             Tind(new OnnxType.TypeVariable("Tind", List.of(OnnxType.tensor(OnnxType.int32()), OnnxType.tensor(OnnxType.int64())))),
 9544             ;
 9545 
 9546             final OnnxType.TypeVariable typeVariable;
 9547 
 9548             TypeConstraint(OnnxType.TypeVariable typeVariable) {
 9549                 assert typeVariable.name().equals(name());
 9550                 this.typeVariable = typeVariable;
 9551             }
 9552 
 9553             @Override
 9554             public OnnxType.TypeVariable typeVariable() {
 9555                 return typeVariable;
 9556             }
 9557         }
 9558 
 9559         public enum InputParameter implements OnnxParameter {
 9560             data(TypeConstraint.T.typeVariable(), Quantifier.REQUIRED),
 9561             indices(TypeConstraint.Tind.typeVariable(), Quantifier.REQUIRED),
 9562             ;
 9563 
 9564             final OnnxType type;
 9565             final Quantifier quantifier;
 9566 
 9567             InputParameter(OnnxType type, Quantifier quantifier) {
 9568                 this.type = type;
 9569                 this.quantifier = quantifier;
 9570             }
 9571 
 9572             @Override
 9573             public OnnxType type() {
 9574                 return type;
 9575             }
 9576 
 9577             @Override
 9578             public Quantifier quantifier() {
 9579                 return quantifier;
 9580             }
 9581         }
 9582 
 9583         public enum OutputParameter implements OnnxParameter {
 9584             output(TypeConstraint.T.typeVariable(), Quantifier.REQUIRED),
 9585             ;
 9586 
 9587             final OnnxType type;
 9588             final Quantifier quantifier;
 9589 
 9590             OutputParameter(OnnxType type, Quantifier quantifier) {
 9591                 this.type = type;
 9592                 this.quantifier = quantifier;
 9593             }
 9594 
 9595             @Override
 9596             public OnnxType type() {
 9597                 return type;
 9598             }
 9599 
 9600             @Override
 9601             public Quantifier quantifier() {
 9602                 return quantifier;
 9603             }
 9604         }
 9605 
 9606         public static final OnnxSchema SCHEMA = new OnnxSchemaRecord(
 9607                 NAME,
 9608                 List.of(Attribute.values()),
 9609                 List.of(TypeConstraint.values()),
 9610                 List.of(InputParameter.values()),
 9611                 List.of(OutputParameter.values())
 9612         );
 9613 
 9614         public GatherElements(ExternalizedOp def) {
 9615             super(SCHEMA, def);
 9616         }
 9617 
 9618         GatherElements(GatherElements that, CopyContext cc) {
 9619             super(that, cc);
 9620         }
 9621 
 9622         @Override
 9623         public GatherElements transform(CopyContext cc, OpTransformer ot) {
 9624             return new GatherElements(this, cc);
 9625         }
 9626 
 9627         GatherElements(TypeElement resultType, Value data, Value indices, java.util.Optional<Long> axis) {
 9628             super(SCHEMA, resultType, Set.of(), List.of(data, indices), List.of(axis));
 9629         }
 9630 
 9631         @Override
 9632         public SequencedSet<OnnxParameter> onnxOutputs() {
 9633             return onnxOutputs(SCHEMA);
 9634         }
 9635 
 9636         @Override
 9637         public SequencedMap<OnnxParameter, Object> onnxInputs() {
 9638             return onnxInputs(SCHEMA, List.of(data(), indices()));
 9639         }
 9640 
 9641         public Value data() {
 9642             return operands().get(0);
 9643         }
 9644 
 9645         public Value indices() {
 9646             return operands().get(1);
 9647         }
 9648 
 9649         public java.util.Optional<Long> axis() {
 9650             Long axis = Attribute.axis.access(Long.class, onnxAttributes);
 9651             return java.util.Optional.ofNullable(axis);
 9652         }
 9653 
 9654     }
 9655 
 9656     public static GatherElements GatherElements(TypeElement resultType, Value data, Value indices, java.util.Optional<Long> axis) {
 9657         return new GatherElements(resultType, data, indices, axis);
 9658     }
 9659 
 9660     @OpFactoryHelper.OpDeclaration(GatherND.NAME)
 9661     public static final class GatherND extends OnnxOp {
 9662         public static final String NAME = "GatherND";
 9663 
 9664         public enum Attribute implements OnnxAttribute {
 9665             batch_dims(Long.class, true, 0),
 9666             ;
 9667 
 9668                 final Class<?> t;
 9669                 final boolean optional;
 9670                 final Object defaultValue;
 9671 
 9672                 Attribute(Class<?> type, boolean optional, Object defaultValue) {
 9673                     this.t = type;
 9674                     this.optional = optional;
 9675                     this.defaultValue = defaultValue;
 9676                     assert optional || defaultValue == null;
 9677                 }
 9678 
 9679                 public Class<?> type() {
 9680                     return t;
 9681                 }
 9682 
 9683                 public boolean isOptional() {
 9684                     return optional;
 9685                 }
 9686 
 9687                 public Object defaultValue() {
 9688                     return defaultValue;
 9689                 }
 9690         }
 9691 
 9692         public enum TypeConstraint implements OnnxTypeConstraint {
 9693             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())))),
 9694             ;
 9695 
 9696             final OnnxType.TypeVariable typeVariable;
 9697 
 9698             TypeConstraint(OnnxType.TypeVariable typeVariable) {
 9699                 assert typeVariable.name().equals(name());
 9700                 this.typeVariable = typeVariable;
 9701             }
 9702 
 9703             @Override
 9704             public OnnxType.TypeVariable typeVariable() {
 9705                 return typeVariable;
 9706             }
 9707         }
 9708 
 9709         public enum InputParameter implements OnnxParameter {
 9710             data(TypeConstraint.T.typeVariable(), Quantifier.REQUIRED),
 9711             indices(OnnxType.tensor(OnnxType.int64()), Quantifier.REQUIRED),
 9712             ;
 9713 
 9714             final OnnxType type;
 9715             final Quantifier quantifier;
 9716 
 9717             InputParameter(OnnxType type, Quantifier quantifier) {
 9718                 this.type = type;
 9719                 this.quantifier = quantifier;
 9720             }
 9721 
 9722             @Override
 9723             public OnnxType type() {
 9724                 return type;
 9725             }
 9726 
 9727             @Override
 9728             public Quantifier quantifier() {
 9729                 return quantifier;
 9730             }
 9731         }
 9732 
 9733         public enum OutputParameter implements OnnxParameter {
 9734             output(TypeConstraint.T.typeVariable(), Quantifier.REQUIRED),
 9735             ;
 9736 
 9737             final OnnxType type;
 9738             final Quantifier quantifier;
 9739 
 9740             OutputParameter(OnnxType type, Quantifier quantifier) {
 9741                 this.type = type;
 9742                 this.quantifier = quantifier;
 9743             }
 9744 
 9745             @Override
 9746             public OnnxType type() {
 9747                 return type;
 9748             }
 9749 
 9750             @Override
 9751             public Quantifier quantifier() {
 9752                 return quantifier;
 9753             }
 9754         }
 9755 
 9756         public static final OnnxSchema SCHEMA = new OnnxSchemaRecord(
 9757                 NAME,
 9758                 List.of(Attribute.values()),
 9759                 List.of(TypeConstraint.values()),
 9760                 List.of(InputParameter.values()),
 9761                 List.of(OutputParameter.values())
 9762         );
 9763 
 9764         public GatherND(ExternalizedOp def) {
 9765             super(SCHEMA, def);
 9766         }
 9767 
 9768         GatherND(GatherND that, CopyContext cc) {
 9769             super(that, cc);
 9770         }
 9771 
 9772         @Override
 9773         public GatherND transform(CopyContext cc, OpTransformer ot) {
 9774             return new GatherND(this, cc);
 9775         }
 9776 
 9777         GatherND(TypeElement resultType, Value data, Value indices, java.util.Optional<Long> batch_dims) {
 9778             super(SCHEMA, resultType, Set.of(), List.of(data, indices), List.of(batch_dims));
 9779         }
 9780 
 9781         @Override
 9782         public SequencedSet<OnnxParameter> onnxOutputs() {
 9783             return onnxOutputs(SCHEMA);
 9784         }
 9785 
 9786         @Override
 9787         public SequencedMap<OnnxParameter, Object> onnxInputs() {
 9788             return onnxInputs(SCHEMA, List.of(data(), indices()));
 9789         }
 9790 
 9791         public Value data() {
 9792             return operands().get(0);
 9793         }
 9794 
 9795         public Value indices() {
 9796             return operands().get(1);
 9797         }
 9798 
 9799         public java.util.Optional<Long> batch_dims() {
 9800             Long batch_dims = Attribute.batch_dims.access(Long.class, onnxAttributes);
 9801             return java.util.Optional.ofNullable(batch_dims);
 9802         }
 9803 
 9804     }
 9805 
 9806     public static GatherND GatherND(TypeElement resultType, Value data, Value indices, java.util.Optional<Long> batch_dims) {
 9807         return new GatherND(resultType, data, indices, batch_dims);
 9808     }
 9809 
 9810     @OpFactoryHelper.OpDeclaration(Gelu.NAME)
 9811     public static final class Gelu extends OnnxOp {
 9812         public static final String NAME = "Gelu";
 9813 
 9814         public enum Attribute implements OnnxAttribute {
 9815             approximate(String.class, true, "none"),
 9816             ;
 9817 
 9818                 final Class<?> t;
 9819                 final boolean optional;
 9820                 final Object defaultValue;
 9821 
 9822                 Attribute(Class<?> type, boolean optional, Object defaultValue) {
 9823                     this.t = type;
 9824                     this.optional = optional;
 9825                     this.defaultValue = defaultValue;
 9826                     assert optional || defaultValue == null;
 9827                 }
 9828 
 9829                 public Class<?> type() {
 9830                     return t;
 9831                 }
 9832 
 9833                 public boolean isOptional() {
 9834                     return optional;
 9835                 }
 9836 
 9837                 public Object defaultValue() {
 9838                     return defaultValue;
 9839                 }
 9840         }
 9841 
 9842         public enum TypeConstraint implements OnnxTypeConstraint {
 9843             T(new OnnxType.TypeVariable("T", List.of(OnnxType.tensor(OnnxType.float16()), OnnxType.tensor(OnnxType.float32()), OnnxType.tensor(OnnxType.float64()), OnnxType.tensor(OnnxType.bfloat16())))),
 9844             ;
 9845 
 9846             final OnnxType.TypeVariable typeVariable;
 9847 
 9848             TypeConstraint(OnnxType.TypeVariable typeVariable) {
 9849                 assert typeVariable.name().equals(name());
 9850                 this.typeVariable = typeVariable;
 9851             }
 9852 
 9853             @Override
 9854             public OnnxType.TypeVariable typeVariable() {
 9855                 return typeVariable;
 9856             }
 9857         }
 9858 
 9859         public enum InputParameter implements OnnxParameter {
 9860             X(TypeConstraint.T.typeVariable(), Quantifier.REQUIRED),
 9861             ;
 9862 
 9863             final OnnxType type;
 9864             final Quantifier quantifier;
 9865 
 9866             InputParameter(OnnxType type, Quantifier quantifier) {
 9867                 this.type = type;
 9868                 this.quantifier = quantifier;
 9869             }
 9870 
 9871             @Override
 9872             public OnnxType type() {
 9873                 return type;
 9874             }
 9875 
 9876             @Override
 9877             public Quantifier quantifier() {
 9878                 return quantifier;
 9879             }
 9880         }
 9881 
 9882         public enum OutputParameter implements OnnxParameter {
 9883             Y(TypeConstraint.T.typeVariable(), Quantifier.REQUIRED),
 9884             ;
 9885 
 9886             final OnnxType type;
 9887             final Quantifier quantifier;
 9888 
 9889             OutputParameter(OnnxType type, Quantifier quantifier) {
 9890                 this.type = type;
 9891                 this.quantifier = quantifier;
 9892             }
 9893 
 9894             @Override
 9895             public OnnxType type() {
 9896                 return type;
 9897             }
 9898 
 9899             @Override
 9900             public Quantifier quantifier() {
 9901                 return quantifier;
 9902             }
 9903         }
 9904 
 9905         public static final OnnxSchema SCHEMA = new OnnxSchemaRecord(
 9906                 NAME,
 9907                 List.of(Attribute.values()),
 9908                 List.of(TypeConstraint.values()),
 9909                 List.of(InputParameter.values()),
 9910                 List.of(OutputParameter.values())
 9911         );
 9912 
 9913         public Gelu(ExternalizedOp def) {
 9914             super(SCHEMA, def);
 9915         }
 9916 
 9917         Gelu(Gelu that, CopyContext cc) {
 9918             super(that, cc);
 9919         }
 9920 
 9921         @Override
 9922         public Gelu transform(CopyContext cc, OpTransformer ot) {
 9923             return new Gelu(this, cc);
 9924         }
 9925 
 9926         Gelu(TypeElement resultType, Value X, java.util.Optional<String> approximate) {
 9927             super(SCHEMA, resultType, Set.of(), List.of(X), List.of(approximate));
 9928         }
 9929 
 9930         @Override
 9931         public SequencedSet<OnnxParameter> onnxOutputs() {
 9932             return onnxOutputs(SCHEMA);
 9933         }
 9934 
 9935         @Override
 9936         public SequencedMap<OnnxParameter, Object> onnxInputs() {
 9937             return onnxInputs(SCHEMA, List.of(X()));
 9938         }
 9939 
 9940         public Value X() {
 9941             return operands().get(0);
 9942         }
 9943 
 9944         public java.util.Optional<String> approximate() {
 9945             String approximate = Attribute.approximate.access(String.class, onnxAttributes);
 9946             return java.util.Optional.ofNullable(approximate);
 9947         }
 9948 
 9949     }
 9950 
 9951     public static Gelu Gelu(TypeElement resultType, Value X, java.util.Optional<String> approximate) {
 9952         return new Gelu(resultType, X, approximate);
 9953     }
 9954 
 9955     @OpFactoryHelper.OpDeclaration(Gemm.NAME)
 9956     public static final class Gemm extends OnnxOp {
 9957         public static final String NAME = "Gemm";
 9958 
 9959         public enum Attribute implements OnnxAttribute {
 9960             alpha(Float.class, true, 1.0f),
 9961             transB(Long.class, true, 0),
 9962             beta(Float.class, true, 1.0f),
 9963             transA(Long.class, true, 0),
 9964             ;
 9965 
 9966                 final Class<?> t;
 9967                 final boolean optional;
 9968                 final Object defaultValue;
 9969 
 9970                 Attribute(Class<?> type, boolean optional, Object defaultValue) {
 9971                     this.t = type;
 9972                     this.optional = optional;
 9973                     this.defaultValue = defaultValue;
 9974                     assert optional || defaultValue == null;
 9975                 }
 9976 
 9977                 public Class<?> type() {
 9978                     return t;
 9979                 }
 9980 
 9981                 public boolean isOptional() {
 9982                     return optional;
 9983                 }
 9984 
 9985                 public Object defaultValue() {
 9986                     return defaultValue;
 9987                 }
 9988         }
 9989 
 9990         public enum TypeConstraint implements OnnxTypeConstraint {
 9991             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())))),
 9992             ;
 9993 
 9994             final OnnxType.TypeVariable typeVariable;
 9995 
 9996             TypeConstraint(OnnxType.TypeVariable typeVariable) {
 9997                 assert typeVariable.name().equals(name());
 9998                 this.typeVariable = typeVariable;
 9999             }
10000 
10001             @Override
10002             public OnnxType.TypeVariable typeVariable() {
10003                 return typeVariable;
10004             }
10005         }
10006 
10007         public enum InputParameter implements OnnxParameter {
10008             A(TypeConstraint.T.typeVariable(), Quantifier.REQUIRED),
10009             B(TypeConstraint.T.typeVariable(), Quantifier.REQUIRED),
10010             C(TypeConstraint.T.typeVariable(), Quantifier.OPTIONAL),
10011             ;
10012 
10013             final OnnxType type;
10014             final Quantifier quantifier;
10015 
10016             InputParameter(OnnxType type, Quantifier quantifier) {
10017                 this.type = type;
10018                 this.quantifier = quantifier;
10019             }
10020 
10021             @Override
10022             public OnnxType type() {
10023                 return type;
10024             }
10025 
10026             @Override
10027             public Quantifier quantifier() {
10028                 return quantifier;
10029             }
10030         }
10031 
10032         public enum OutputParameter implements OnnxParameter {
10033             Y(TypeConstraint.T.typeVariable(), Quantifier.REQUIRED),
10034             ;
10035 
10036             final OnnxType type;
10037             final Quantifier quantifier;
10038 
10039             OutputParameter(OnnxType type, Quantifier quantifier) {
10040                 this.type = type;
10041                 this.quantifier = quantifier;
10042             }
10043 
10044             @Override
10045             public OnnxType type() {
10046                 return type;
10047             }
10048 
10049             @Override
10050             public Quantifier quantifier() {
10051                 return quantifier;
10052             }
10053         }
10054 
10055         public static final OnnxSchema SCHEMA = new OnnxSchemaRecord(
10056                 NAME,
10057                 List.of(Attribute.values()),
10058                 List.of(TypeConstraint.values()),
10059                 List.of(InputParameter.values()),
10060                 List.of(OutputParameter.values())
10061         );
10062 
10063         public Gemm(ExternalizedOp def) {
10064             super(SCHEMA, def);
10065         }
10066 
10067         Gemm(Gemm that, CopyContext cc) {
10068             super(that, cc);
10069         }
10070 
10071         @Override
10072         public Gemm transform(CopyContext cc, OpTransformer ot) {
10073             return new Gemm(this, cc);
10074         }
10075 
10076         Gemm(TypeElement resultType, Value A, Value B, java.util.Optional<Value> C, java.util.Optional<Float> alpha, java.util.Optional<Long> transB, java.util.Optional<Float> beta, java.util.Optional<Long> transA) {
10077             super(SCHEMA, resultType, Set.of(), List.of(A, B, C), List.of(alpha, transB, beta, transA));
10078         }
10079 
10080         @Override
10081         public SequencedSet<OnnxParameter> onnxOutputs() {
10082             return onnxOutputs(SCHEMA);
10083         }
10084 
10085         @Override
10086         public SequencedMap<OnnxParameter, Object> onnxInputs() {
10087             return onnxInputs(SCHEMA, List.of(A(), B(), C()));
10088         }
10089 
10090         public Value A() {
10091             return operands().get(0);
10092         }
10093 
10094         public Value B() {
10095             return operands().get(1);
10096         }
10097 
10098         public java.util.Optional<Value> C() {
10099             int i = optionalInputArguments.indexOf(InputParameter.C);
10100             return i != -1 ? java.util.Optional.of(operands().get(2 + i)) : java.util.Optional.empty();
10101         }
10102 
10103         public java.util.Optional<Float> alpha() {
10104             Float alpha = Attribute.alpha.access(Float.class, onnxAttributes);
10105             return java.util.Optional.ofNullable(alpha);
10106         }
10107 
10108         public java.util.Optional<Long> transB() {
10109             Long transB = Attribute.transB.access(Long.class, onnxAttributes);
10110             return java.util.Optional.ofNullable(transB);
10111         }
10112 
10113         public java.util.Optional<Float> beta() {
10114             Float beta = Attribute.beta.access(Float.class, onnxAttributes);
10115             return java.util.Optional.ofNullable(beta);
10116         }
10117 
10118         public java.util.Optional<Long> transA() {
10119             Long transA = Attribute.transA.access(Long.class, onnxAttributes);
10120             return java.util.Optional.ofNullable(transA);
10121         }
10122 
10123     }
10124 
10125     public static Gemm Gemm(TypeElement resultType, Value A, Value B, java.util.Optional<Value> C, java.util.Optional<Float> alpha, java.util.Optional<Long> transB, java.util.Optional<Float> beta, java.util.Optional<Long> transA) {
10126         return new Gemm(resultType, A, B, C, alpha, transB, beta, transA);
10127     }
10128 
10129     @OpFactoryHelper.OpDeclaration(GlobalAveragePool.NAME)
10130     public static final class GlobalAveragePool extends OnnxOp {
10131         public static final String NAME = "GlobalAveragePool";
10132 
10133         public enum Attribute implements OnnxAttribute.None { }
10134 
10135         public enum TypeConstraint implements OnnxTypeConstraint {
10136             T(new OnnxType.TypeVariable("T", List.of(OnnxType.tensor(OnnxType.bfloat16()), OnnxType.tensor(OnnxType.float16()), OnnxType.tensor(OnnxType.float32()), OnnxType.tensor(OnnxType.float64())))),
10137             ;
10138 
10139             final OnnxType.TypeVariable typeVariable;
10140 
10141             TypeConstraint(OnnxType.TypeVariable typeVariable) {
10142                 assert typeVariable.name().equals(name());
10143                 this.typeVariable = typeVariable;
10144             }
10145 
10146             @Override
10147             public OnnxType.TypeVariable typeVariable() {
10148                 return typeVariable;
10149             }
10150         }
10151 
10152         public enum InputParameter implements OnnxParameter {
10153             X(TypeConstraint.T.typeVariable(), Quantifier.REQUIRED),
10154             ;
10155 
10156             final OnnxType type;
10157             final Quantifier quantifier;
10158 
10159             InputParameter(OnnxType type, Quantifier quantifier) {
10160                 this.type = type;
10161                 this.quantifier = quantifier;
10162             }
10163 
10164             @Override
10165             public OnnxType type() {
10166                 return type;
10167             }
10168 
10169             @Override
10170             public Quantifier quantifier() {
10171                 return quantifier;
10172             }
10173         }
10174 
10175         public enum OutputParameter implements OnnxParameter {
10176             Y(TypeConstraint.T.typeVariable(), Quantifier.REQUIRED),
10177             ;
10178 
10179             final OnnxType type;
10180             final Quantifier quantifier;
10181 
10182             OutputParameter(OnnxType type, Quantifier quantifier) {
10183                 this.type = type;
10184                 this.quantifier = quantifier;
10185             }
10186 
10187             @Override
10188             public OnnxType type() {
10189                 return type;
10190             }
10191 
10192             @Override
10193             public Quantifier quantifier() {
10194                 return quantifier;
10195             }
10196         }
10197 
10198         public static final OnnxSchema SCHEMA = new OnnxSchemaRecord(
10199                 NAME,
10200                 List.of(Attribute.values()),
10201                 List.of(TypeConstraint.values()),
10202                 List.of(InputParameter.values()),
10203                 List.of(OutputParameter.values())
10204         );
10205 
10206         public GlobalAveragePool(ExternalizedOp def) {
10207             super(SCHEMA, def);
10208         }
10209 
10210         GlobalAveragePool(GlobalAveragePool that, CopyContext cc) {
10211             super(that, cc);
10212         }
10213 
10214         @Override
10215         public GlobalAveragePool transform(CopyContext cc, OpTransformer ot) {
10216             return new GlobalAveragePool(this, cc);
10217         }
10218 
10219         GlobalAveragePool(TypeElement resultType, Value X) {
10220             super(SCHEMA, resultType, Set.of(), List.of(X), List.of());
10221         }
10222 
10223         @Override
10224         public SequencedSet<OnnxParameter> onnxOutputs() {
10225             return onnxOutputs(SCHEMA);
10226         }
10227 
10228         @Override
10229         public SequencedMap<OnnxParameter, Object> onnxInputs() {
10230             return onnxInputs(SCHEMA, List.of(X()));
10231         }
10232 
10233         public Value X() {
10234             return operands().get(0);
10235         }
10236 
10237     }
10238 
10239     public static GlobalAveragePool GlobalAveragePool(TypeElement resultType, Value X) {
10240         return new GlobalAveragePool(resultType, X);
10241     }
10242 
10243     @OpFactoryHelper.OpDeclaration(GlobalLpPool.NAME)
10244     public static final class GlobalLpPool extends OnnxOp {
10245         public static final String NAME = "GlobalLpPool";
10246 
10247         public enum Attribute implements OnnxAttribute {
10248             p(Long.class, true, 2),
10249             ;
10250 
10251                 final Class<?> t;
10252                 final boolean optional;
10253                 final Object defaultValue;
10254 
10255                 Attribute(Class<?> type, boolean optional, Object defaultValue) {
10256                     this.t = type;
10257                     this.optional = optional;
10258                     this.defaultValue = defaultValue;
10259                     assert optional || defaultValue == null;
10260                 }
10261 
10262                 public Class<?> type() {
10263                     return t;
10264                 }
10265 
10266                 public boolean isOptional() {
10267                     return optional;
10268                 }
10269 
10270                 public Object defaultValue() {
10271                     return defaultValue;
10272                 }
10273         }
10274 
10275         public enum TypeConstraint implements OnnxTypeConstraint {
10276             T(new OnnxType.TypeVariable("T", List.of(OnnxType.tensor(OnnxType.bfloat16()), OnnxType.tensor(OnnxType.float16()), OnnxType.tensor(OnnxType.float32()), OnnxType.tensor(OnnxType.float64())))),
10277             ;
10278 
10279             final OnnxType.TypeVariable typeVariable;
10280 
10281             TypeConstraint(OnnxType.TypeVariable typeVariable) {
10282                 assert typeVariable.name().equals(name());
10283                 this.typeVariable = typeVariable;
10284             }
10285 
10286             @Override
10287             public OnnxType.TypeVariable typeVariable() {
10288                 return typeVariable;
10289             }
10290         }
10291 
10292         public enum InputParameter implements OnnxParameter {
10293             X(TypeConstraint.T.typeVariable(), Quantifier.REQUIRED),
10294             ;
10295 
10296             final OnnxType type;
10297             final Quantifier quantifier;
10298 
10299             InputParameter(OnnxType type, Quantifier quantifier) {
10300                 this.type = type;
10301                 this.quantifier = quantifier;
10302             }
10303 
10304             @Override
10305             public OnnxType type() {
10306                 return type;
10307             }
10308 
10309             @Override
10310             public Quantifier quantifier() {
10311                 return quantifier;
10312             }
10313         }
10314 
10315         public enum OutputParameter implements OnnxParameter {
10316             Y(TypeConstraint.T.typeVariable(), Quantifier.REQUIRED),
10317             ;
10318 
10319             final OnnxType type;
10320             final Quantifier quantifier;
10321 
10322             OutputParameter(OnnxType type, Quantifier quantifier) {
10323                 this.type = type;
10324                 this.quantifier = quantifier;
10325             }
10326 
10327             @Override
10328             public OnnxType type() {
10329                 return type;
10330             }
10331 
10332             @Override
10333             public Quantifier quantifier() {
10334                 return quantifier;
10335             }
10336         }
10337 
10338         public static final OnnxSchema SCHEMA = new OnnxSchemaRecord(
10339                 NAME,
10340                 List.of(Attribute.values()),
10341                 List.of(TypeConstraint.values()),
10342                 List.of(InputParameter.values()),
10343                 List.of(OutputParameter.values())
10344         );
10345 
10346         public GlobalLpPool(ExternalizedOp def) {
10347             super(SCHEMA, def);
10348         }
10349 
10350         GlobalLpPool(GlobalLpPool that, CopyContext cc) {
10351             super(that, cc);
10352         }
10353 
10354         @Override
10355         public GlobalLpPool transform(CopyContext cc, OpTransformer ot) {
10356             return new GlobalLpPool(this, cc);
10357         }
10358 
10359         GlobalLpPool(TypeElement resultType, Value X, java.util.Optional<Long> p) {
10360             super(SCHEMA, resultType, Set.of(), List.of(X), List.of(p));
10361         }
10362 
10363         @Override
10364         public SequencedSet<OnnxParameter> onnxOutputs() {
10365             return onnxOutputs(SCHEMA);
10366         }
10367 
10368         @Override
10369         public SequencedMap<OnnxParameter, Object> onnxInputs() {
10370             return onnxInputs(SCHEMA, List.of(X()));
10371         }
10372 
10373         public Value X() {
10374             return operands().get(0);
10375         }
10376 
10377         public java.util.Optional<Long> p() {
10378             Long p = Attribute.p.access(Long.class, onnxAttributes);
10379             return java.util.Optional.ofNullable(p);
10380         }
10381 
10382     }
10383 
10384     public static GlobalLpPool GlobalLpPool(TypeElement resultType, Value X, java.util.Optional<Long> p) {
10385         return new GlobalLpPool(resultType, X, p);
10386     }
10387 
10388     @OpFactoryHelper.OpDeclaration(GlobalMaxPool.NAME)
10389     public static final class GlobalMaxPool extends OnnxOp {
10390         public static final String NAME = "GlobalMaxPool";
10391 
10392         public enum Attribute implements OnnxAttribute.None { }
10393 
10394         public enum TypeConstraint implements OnnxTypeConstraint {
10395             T(new OnnxType.TypeVariable("T", List.of(OnnxType.tensor(OnnxType.bfloat16()), OnnxType.tensor(OnnxType.float16()), OnnxType.tensor(OnnxType.float32()), OnnxType.tensor(OnnxType.float64())))),
10396             ;
10397 
10398             final OnnxType.TypeVariable typeVariable;
10399 
10400             TypeConstraint(OnnxType.TypeVariable typeVariable) {
10401                 assert typeVariable.name().equals(name());
10402                 this.typeVariable = typeVariable;
10403             }
10404 
10405             @Override
10406             public OnnxType.TypeVariable typeVariable() {
10407                 return typeVariable;
10408             }
10409         }
10410 
10411         public enum InputParameter implements OnnxParameter {
10412             X(TypeConstraint.T.typeVariable(), Quantifier.REQUIRED),
10413             ;
10414 
10415             final OnnxType type;
10416             final Quantifier quantifier;
10417 
10418             InputParameter(OnnxType type, Quantifier quantifier) {
10419                 this.type = type;
10420                 this.quantifier = quantifier;
10421             }
10422 
10423             @Override
10424             public OnnxType type() {
10425                 return type;
10426             }
10427 
10428             @Override
10429             public Quantifier quantifier() {
10430                 return quantifier;
10431             }
10432         }
10433 
10434         public enum OutputParameter implements OnnxParameter {
10435             Y(TypeConstraint.T.typeVariable(), Quantifier.REQUIRED),
10436             ;
10437 
10438             final OnnxType type;
10439             final Quantifier quantifier;
10440 
10441             OutputParameter(OnnxType type, Quantifier quantifier) {
10442                 this.type = type;
10443                 this.quantifier = quantifier;
10444             }
10445 
10446             @Override
10447             public OnnxType type() {
10448                 return type;
10449             }
10450 
10451             @Override
10452             public Quantifier quantifier() {
10453                 return quantifier;
10454             }
10455         }
10456 
10457         public static final OnnxSchema SCHEMA = new OnnxSchemaRecord(
10458                 NAME,
10459                 List.of(Attribute.values()),
10460                 List.of(TypeConstraint.values()),
10461                 List.of(InputParameter.values()),
10462                 List.of(OutputParameter.values())
10463         );
10464 
10465         public GlobalMaxPool(ExternalizedOp def) {
10466             super(SCHEMA, def);
10467         }
10468 
10469         GlobalMaxPool(GlobalMaxPool that, CopyContext cc) {
10470             super(that, cc);
10471         }
10472 
10473         @Override
10474         public GlobalMaxPool transform(CopyContext cc, OpTransformer ot) {
10475             return new GlobalMaxPool(this, cc);
10476         }
10477 
10478         GlobalMaxPool(TypeElement resultType, Value X) {
10479             super(SCHEMA, resultType, Set.of(), List.of(X), List.of());
10480         }
10481 
10482         @Override
10483         public SequencedSet<OnnxParameter> onnxOutputs() {
10484             return onnxOutputs(SCHEMA);
10485         }
10486 
10487         @Override
10488         public SequencedMap<OnnxParameter, Object> onnxInputs() {
10489             return onnxInputs(SCHEMA, List.of(X()));
10490         }
10491 
10492         public Value X() {
10493             return operands().get(0);
10494         }
10495 
10496     }
10497 
10498     public static GlobalMaxPool GlobalMaxPool(TypeElement resultType, Value X) {
10499         return new GlobalMaxPool(resultType, X);
10500     }
10501 
10502     @OpFactoryHelper.OpDeclaration(Gradient.NAME)
10503     public static final class Gradient extends OnnxOp {
10504         public static final String NAME = "Gradient";
10505 
10506         public enum Attribute implements OnnxAttribute {
10507             y(String.class, false, null),
10508             zs(String[].class, true, null),
10509             xs(String[].class, false, null),
10510             ;
10511 
10512                 final Class<?> t;
10513                 final boolean optional;
10514                 final Object defaultValue;
10515 
10516                 Attribute(Class<?> type, boolean optional, Object defaultValue) {
10517                     this.t = type;
10518                     this.optional = optional;
10519                     this.defaultValue = defaultValue;
10520                     assert optional || defaultValue == null;
10521                 }
10522 
10523                 public Class<?> type() {
10524                     return t;
10525                 }
10526 
10527                 public boolean isOptional() {
10528                     return optional;
10529                 }
10530 
10531                 public Object defaultValue() {
10532                     return defaultValue;
10533                 }
10534         }
10535 
10536         public enum TypeConstraint implements OnnxTypeConstraint {
10537             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())))),
10538             T2(new OnnxType.TypeVariable("T2", List.of(OnnxType.tensor(OnnxType.float16()), OnnxType.tensor(OnnxType.float32()), OnnxType.tensor(OnnxType.float64())))),
10539             ;
10540 
10541             final OnnxType.TypeVariable typeVariable;
10542 
10543             TypeConstraint(OnnxType.TypeVariable typeVariable) {
10544                 assert typeVariable.name().equals(name());
10545                 this.typeVariable = typeVariable;
10546             }
10547 
10548             @Override
10549             public OnnxType.TypeVariable typeVariable() {
10550                 return typeVariable;
10551             }
10552         }
10553 
10554         public enum InputParameter implements OnnxParameter {
10555             Inputs(TypeConstraint.T1.typeVariable(), Quantifier.VARIADIC),
10556             ;
10557 
10558             final OnnxType type;
10559             final Quantifier quantifier;
10560 
10561             InputParameter(OnnxType type, Quantifier quantifier) {
10562                 this.type = type;
10563                 this.quantifier = quantifier;
10564             }
10565 
10566             @Override
10567             public OnnxType type() {
10568                 return type;
10569             }
10570 
10571             @Override
10572             public Quantifier quantifier() {
10573                 return quantifier;
10574             }
10575         }
10576 
10577         public enum OutputParameter implements OnnxParameter {
10578             Outputs(TypeConstraint.T2.typeVariable(), Quantifier.VARIADIC),
10579             ;
10580 
10581             final OnnxType type;
10582             final Quantifier quantifier;
10583 
10584             OutputParameter(OnnxType type, Quantifier quantifier) {
10585                 this.type = type;
10586                 this.quantifier = quantifier;
10587             }
10588 
10589             @Override
10590             public OnnxType type() {
10591                 return type;
10592             }
10593 
10594             @Override
10595             public Quantifier quantifier() {
10596                 return quantifier;
10597             }
10598         }
10599 
10600         public static final OnnxSchema SCHEMA = new OnnxSchemaRecord(
10601                 NAME,
10602                 List.of(Attribute.values()),
10603                 List.of(TypeConstraint.values()),
10604                 List.of(InputParameter.values()),
10605                 List.of(OutputParameter.values())
10606         );
10607 
10608         public Gradient(ExternalizedOp def) {
10609             super(SCHEMA, def);
10610         }
10611 
10612         Gradient(Gradient that, CopyContext cc) {
10613             super(that, cc);
10614         }
10615 
10616         @Override
10617         public Gradient transform(CopyContext cc, OpTransformer ot) {
10618             return new Gradient(this, cc);
10619         }
10620 
10621         Gradient(TypeElement resultType, List<Value> Inputs, String y, java.util.Optional<String[]> zs, String[] xs) {
10622             super(SCHEMA, resultType, Set.of(), List.of(Inputs), List.of(y, zs, xs));
10623         }
10624 
10625         @Override
10626         public SequencedSet<OnnxParameter> onnxOutputs() {
10627             return onnxOutputs(SCHEMA);
10628         }
10629 
10630         @Override
10631         public SequencedMap<OnnxParameter, Object> onnxInputs() {
10632             return onnxInputs(SCHEMA, List.of(Inputs()));
10633         }
10634 
10635         public List<Value> Inputs() {
10636             return operands();
10637         }
10638 
10639         public String y() {
10640             String y = Attribute.y.access(String.class, onnxAttributes);
10641             return y;
10642         }
10643 
10644         public java.util.Optional<String[]> zs() {
10645             String[] zs = Attribute.zs.access(String[].class, onnxAttributes);
10646             return java.util.Optional.ofNullable(zs).map(String[]::clone);
10647         }
10648 
10649         public String[] xs() {
10650             String[] xs = Attribute.xs.access(String[].class, onnxAttributes);
10651             return xs.clone();
10652         }
10653 
10654     }
10655 
10656     public static Gradient Gradient(TypeElement resultType, List<Value> Inputs, String y, java.util.Optional<String[]> zs, String[] xs) {
10657         return new Gradient(resultType, Inputs, y, zs, xs);
10658     }
10659 
10660     @OpFactoryHelper.OpDeclaration(Greater.NAME)
10661     public static final class Greater extends OnnxOp {
10662         public static final String NAME = "Greater";
10663 
10664         public enum Attribute implements OnnxAttribute.None { }
10665 
10666         public enum TypeConstraint implements OnnxTypeConstraint {
10667             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())))),
10668             T1(new OnnxType.TypeVariable("T1", List.of(OnnxType.tensor(OnnxType.bool())))),
10669             ;
10670 
10671             final OnnxType.TypeVariable typeVariable;
10672 
10673             TypeConstraint(OnnxType.TypeVariable typeVariable) {
10674                 assert typeVariable.name().equals(name());
10675                 this.typeVariable = typeVariable;
10676             }
10677 
10678             @Override
10679             public OnnxType.TypeVariable typeVariable() {
10680                 return typeVariable;
10681             }
10682         }
10683 
10684         public enum InputParameter implements OnnxParameter {
10685             A(TypeConstraint.T.typeVariable(), Quantifier.REQUIRED),
10686             B(TypeConstraint.T.typeVariable(), Quantifier.REQUIRED),
10687             ;
10688 
10689             final OnnxType type;
10690             final Quantifier quantifier;
10691 
10692             InputParameter(OnnxType type, Quantifier quantifier) {
10693                 this.type = type;
10694                 this.quantifier = quantifier;
10695             }
10696 
10697             @Override
10698             public OnnxType type() {
10699                 return type;
10700             }
10701 
10702             @Override
10703             public Quantifier quantifier() {
10704                 return quantifier;
10705             }
10706         }
10707 
10708         public enum OutputParameter implements OnnxParameter {
10709             C(TypeConstraint.T1.typeVariable(), Quantifier.REQUIRED),
10710             ;
10711 
10712             final OnnxType type;
10713             final Quantifier quantifier;
10714 
10715             OutputParameter(OnnxType type, Quantifier quantifier) {
10716                 this.type = type;
10717                 this.quantifier = quantifier;
10718             }
10719 
10720             @Override
10721             public OnnxType type() {
10722                 return type;
10723             }
10724 
10725             @Override
10726             public Quantifier quantifier() {
10727                 return quantifier;
10728             }
10729         }
10730 
10731         public static final OnnxSchema SCHEMA = new OnnxSchemaRecord(
10732                 NAME,
10733                 List.of(Attribute.values()),
10734                 List.of(TypeConstraint.values()),
10735                 List.of(InputParameter.values()),
10736                 List.of(OutputParameter.values())
10737         );
10738 
10739         public Greater(ExternalizedOp def) {
10740             super(SCHEMA, def);
10741         }
10742 
10743         Greater(Greater that, CopyContext cc) {
10744             super(that, cc);
10745         }
10746 
10747         @Override
10748         public Greater transform(CopyContext cc, OpTransformer ot) {
10749             return new Greater(this, cc);
10750         }
10751 
10752         Greater(TypeElement resultType, Value A, Value B) {
10753             super(SCHEMA, resultType, Set.of(), List.of(A, B), List.of());
10754         }
10755 
10756         @Override
10757         public SequencedSet<OnnxParameter> onnxOutputs() {
10758             return onnxOutputs(SCHEMA);
10759         }
10760 
10761         @Override
10762         public SequencedMap<OnnxParameter, Object> onnxInputs() {
10763             return onnxInputs(SCHEMA, List.of(A(), B()));
10764         }
10765 
10766         public Value A() {
10767             return operands().get(0);
10768         }
10769 
10770         public Value B() {
10771             return operands().get(1);
10772         }
10773 
10774     }
10775 
10776     public static Greater Greater(TypeElement resultType, Value A, Value B) {
10777         return new Greater(resultType, A, B);
10778     }
10779 
10780     @OpFactoryHelper.OpDeclaration(GreaterOrEqual.NAME)
10781     public static final class GreaterOrEqual extends OnnxOp {
10782         public static final String NAME = "GreaterOrEqual";
10783 
10784         public enum Attribute implements OnnxAttribute.None { }
10785 
10786         public enum TypeConstraint implements OnnxTypeConstraint {
10787             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())))),
10788             T1(new OnnxType.TypeVariable("T1", List.of(OnnxType.tensor(OnnxType.bool())))),
10789             ;
10790 
10791             final OnnxType.TypeVariable typeVariable;
10792 
10793             TypeConstraint(OnnxType.TypeVariable typeVariable) {
10794                 assert typeVariable.name().equals(name());
10795                 this.typeVariable = typeVariable;
10796             }
10797 
10798             @Override
10799             public OnnxType.TypeVariable typeVariable() {
10800                 return typeVariable;
10801             }
10802         }
10803 
10804         public enum InputParameter implements OnnxParameter {
10805             A(TypeConstraint.T.typeVariable(), Quantifier.REQUIRED),
10806             B(TypeConstraint.T.typeVariable(), Quantifier.REQUIRED),
10807             ;
10808 
10809             final OnnxType type;
10810             final Quantifier quantifier;
10811 
10812             InputParameter(OnnxType type, Quantifier quantifier) {
10813                 this.type = type;
10814                 this.quantifier = quantifier;
10815             }
10816 
10817             @Override
10818             public OnnxType type() {
10819                 return type;
10820             }
10821 
10822             @Override
10823             public Quantifier quantifier() {
10824                 return quantifier;
10825             }
10826         }
10827 
10828         public enum OutputParameter implements OnnxParameter {
10829             C(TypeConstraint.T1.typeVariable(), Quantifier.REQUIRED),
10830             ;
10831 
10832             final OnnxType type;
10833             final Quantifier quantifier;
10834 
10835             OutputParameter(OnnxType type, Quantifier quantifier) {
10836                 this.type = type;
10837                 this.quantifier = quantifier;
10838             }
10839 
10840             @Override
10841             public OnnxType type() {
10842                 return type;
10843             }
10844 
10845             @Override
10846             public Quantifier quantifier() {
10847                 return quantifier;
10848             }
10849         }
10850 
10851         public static final OnnxSchema SCHEMA = new OnnxSchemaRecord(
10852                 NAME,
10853                 List.of(Attribute.values()),
10854                 List.of(TypeConstraint.values()),
10855                 List.of(InputParameter.values()),
10856                 List.of(OutputParameter.values())
10857         );
10858 
10859         public GreaterOrEqual(ExternalizedOp def) {
10860             super(SCHEMA, def);
10861         }
10862 
10863         GreaterOrEqual(GreaterOrEqual that, CopyContext cc) {
10864             super(that, cc);
10865         }
10866 
10867         @Override
10868         public GreaterOrEqual transform(CopyContext cc, OpTransformer ot) {
10869             return new GreaterOrEqual(this, cc);
10870         }
10871 
10872         GreaterOrEqual(TypeElement resultType, Value A, Value B) {
10873             super(SCHEMA, resultType, Set.of(), List.of(A, B), List.of());
10874         }
10875 
10876         @Override
10877         public SequencedSet<OnnxParameter> onnxOutputs() {
10878             return onnxOutputs(SCHEMA);
10879         }
10880 
10881         @Override
10882         public SequencedMap<OnnxParameter, Object> onnxInputs() {
10883             return onnxInputs(SCHEMA, List.of(A(), B()));
10884         }
10885 
10886         public Value A() {
10887             return operands().get(0);
10888         }
10889 
10890         public Value B() {
10891             return operands().get(1);
10892         }
10893 
10894     }
10895 
10896     public static GreaterOrEqual GreaterOrEqual(TypeElement resultType, Value A, Value B) {
10897         return new GreaterOrEqual(resultType, A, B);
10898     }
10899 
10900     @OpFactoryHelper.OpDeclaration(GridSample.NAME)
10901     public static final class GridSample extends OnnxOp {
10902         public static final String NAME = "GridSample";
10903 
10904         public enum Attribute implements OnnxAttribute {
10905             mode(String.class, true, "linear"),
10906             align_corners(Long.class, true, 0),
10907             padding_mode(String.class, true, "zeros"),
10908             ;
10909 
10910                 final Class<?> t;
10911                 final boolean optional;
10912                 final Object defaultValue;
10913 
10914                 Attribute(Class<?> type, boolean optional, Object defaultValue) {
10915                     this.t = type;
10916                     this.optional = optional;
10917                     this.defaultValue = defaultValue;
10918                     assert optional || defaultValue == null;
10919                 }
10920 
10921                 public Class<?> type() {
10922                     return t;
10923                 }
10924 
10925                 public boolean isOptional() {
10926                     return optional;
10927                 }
10928 
10929                 public Object defaultValue() {
10930                     return defaultValue;
10931                 }
10932         }
10933 
10934         public enum TypeConstraint implements OnnxTypeConstraint {
10935             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())))),
10936             T2(new OnnxType.TypeVariable("T2", List.of(OnnxType.tensor(OnnxType.bfloat16()), OnnxType.tensor(OnnxType.float16()), OnnxType.tensor(OnnxType.float32()), OnnxType.tensor(OnnxType.float64())))),
10937             ;
10938 
10939             final OnnxType.TypeVariable typeVariable;
10940 
10941             TypeConstraint(OnnxType.TypeVariable typeVariable) {
10942                 assert typeVariable.name().equals(name());
10943                 this.typeVariable = typeVariable;
10944             }
10945 
10946             @Override
10947             public OnnxType.TypeVariable typeVariable() {
10948                 return typeVariable;
10949             }
10950         }
10951 
10952         public enum InputParameter implements OnnxParameter {
10953             X(TypeConstraint.T1.typeVariable(), Quantifier.REQUIRED),
10954             grid(TypeConstraint.T2.typeVariable(), Quantifier.REQUIRED),
10955             ;
10956 
10957             final OnnxType type;
10958             final Quantifier quantifier;
10959 
10960             InputParameter(OnnxType type, Quantifier quantifier) {
10961                 this.type = type;
10962                 this.quantifier = quantifier;
10963             }
10964 
10965             @Override
10966             public OnnxType type() {
10967                 return type;
10968             }
10969 
10970             @Override
10971             public Quantifier quantifier() {
10972                 return quantifier;
10973             }
10974         }
10975 
10976         public enum OutputParameter implements OnnxParameter {
10977             Y(TypeConstraint.T1.typeVariable(), Quantifier.REQUIRED),
10978             ;
10979 
10980             final OnnxType type;
10981             final Quantifier quantifier;
10982 
10983             OutputParameter(OnnxType type, Quantifier quantifier) {
10984                 this.type = type;
10985                 this.quantifier = quantifier;
10986             }
10987 
10988             @Override
10989             public OnnxType type() {
10990                 return type;
10991             }
10992 
10993             @Override
10994             public Quantifier quantifier() {
10995                 return quantifier;
10996             }
10997         }
10998 
10999         public static final OnnxSchema SCHEMA = new OnnxSchemaRecord(
11000                 NAME,
11001                 List.of(Attribute.values()),
11002                 List.of(TypeConstraint.values()),
11003                 List.of(InputParameter.values()),
11004                 List.of(OutputParameter.values())
11005         );
11006 
11007         public GridSample(ExternalizedOp def) {
11008             super(SCHEMA, def);
11009         }
11010 
11011         GridSample(GridSample that, CopyContext cc) {
11012             super(that, cc);
11013         }
11014 
11015         @Override
11016         public GridSample transform(CopyContext cc, OpTransformer ot) {
11017             return new GridSample(this, cc);
11018         }
11019 
11020         GridSample(TypeElement resultType, Value X, Value grid, java.util.Optional<String> mode, java.util.Optional<Long> align_corners, java.util.Optional<String> padding_mode) {
11021             super(SCHEMA, resultType, Set.of(), List.of(X, grid), List.of(mode, align_corners, padding_mode));
11022         }
11023 
11024         @Override
11025         public SequencedSet<OnnxParameter> onnxOutputs() {
11026             return onnxOutputs(SCHEMA);
11027         }
11028 
11029         @Override
11030         public SequencedMap<OnnxParameter, Object> onnxInputs() {
11031             return onnxInputs(SCHEMA, List.of(X(), grid()));
11032         }
11033 
11034         public Value X() {
11035             return operands().get(0);
11036         }
11037 
11038         public Value grid() {
11039             return operands().get(1);
11040         }
11041 
11042         public java.util.Optional<String> mode() {
11043             String mode = Attribute.mode.access(String.class, onnxAttributes);
11044             return java.util.Optional.ofNullable(mode);
11045         }
11046 
11047         public java.util.Optional<Long> align_corners() {
11048             Long align_corners = Attribute.align_corners.access(Long.class, onnxAttributes);
11049             return java.util.Optional.ofNullable(align_corners);
11050         }
11051 
11052         public java.util.Optional<String> padding_mode() {
11053             String padding_mode = Attribute.padding_mode.access(String.class, onnxAttributes);
11054             return java.util.Optional.ofNullable(padding_mode);
11055         }
11056 
11057     }
11058 
11059     public static GridSample GridSample(TypeElement resultType, Value X, Value grid, java.util.Optional<String> mode, java.util.Optional<Long> align_corners, java.util.Optional<String> padding_mode) {
11060         return new GridSample(resultType, X, grid, mode, align_corners, padding_mode);
11061     }
11062 
11063     @OpFactoryHelper.OpDeclaration(GroupNormalization.NAME)
11064     public static final class GroupNormalization extends OnnxOp {
11065         public static final String NAME = "GroupNormalization";
11066 
11067         public enum Attribute implements OnnxAttribute {
11068             epsilon(Float.class, true, 1.0E-5f),
11069             stash_type(Long.class, true, 1),
11070             num_groups(Long.class, false, null),
11071             ;
11072 
11073                 final Class<?> t;
11074                 final boolean optional;
11075                 final Object defaultValue;
11076 
11077                 Attribute(Class<?> type, boolean optional, Object defaultValue) {
11078                     this.t = type;
11079                     this.optional = optional;
11080                     this.defaultValue = defaultValue;
11081                     assert optional || defaultValue == null;
11082                 }
11083 
11084                 public Class<?> type() {
11085                     return t;
11086                 }
11087 
11088                 public boolean isOptional() {
11089                     return optional;
11090                 }
11091 
11092                 public Object defaultValue() {
11093                     return defaultValue;
11094                 }
11095         }
11096 
11097         public enum TypeConstraint implements OnnxTypeConstraint {
11098             T(new OnnxType.TypeVariable("T", List.of(OnnxType.tensor(OnnxType.bfloat16()), OnnxType.tensor(OnnxType.float16()), OnnxType.tensor(OnnxType.float32()), OnnxType.tensor(OnnxType.float64())))),
11099             ;
11100 
11101             final OnnxType.TypeVariable typeVariable;
11102 
11103             TypeConstraint(OnnxType.TypeVariable typeVariable) {
11104                 assert typeVariable.name().equals(name());
11105                 this.typeVariable = typeVariable;
11106             }
11107 
11108             @Override
11109             public OnnxType.TypeVariable typeVariable() {
11110                 return typeVariable;
11111             }
11112         }
11113 
11114         public enum InputParameter implements OnnxParameter {
11115             X(TypeConstraint.T.typeVariable(), Quantifier.REQUIRED),
11116             scale(TypeConstraint.T.typeVariable(), Quantifier.REQUIRED),
11117             bias(TypeConstraint.T.typeVariable(), Quantifier.REQUIRED),
11118             ;
11119 
11120             final OnnxType type;
11121             final Quantifier quantifier;
11122 
11123             InputParameter(OnnxType type, Quantifier quantifier) {
11124                 this.type = type;
11125                 this.quantifier = quantifier;
11126             }
11127 
11128             @Override
11129             public OnnxType type() {
11130                 return type;
11131             }
11132 
11133             @Override
11134             public Quantifier quantifier() {
11135                 return quantifier;
11136             }
11137         }
11138 
11139         public enum OutputParameter implements OnnxParameter {
11140             Y(TypeConstraint.T.typeVariable(), Quantifier.REQUIRED),
11141             ;
11142 
11143             final OnnxType type;
11144             final Quantifier quantifier;
11145 
11146             OutputParameter(OnnxType type, Quantifier quantifier) {
11147                 this.type = type;
11148                 this.quantifier = quantifier;
11149             }
11150 
11151             @Override
11152             public OnnxType type() {
11153                 return type;
11154             }
11155 
11156             @Override
11157             public Quantifier quantifier() {
11158                 return quantifier;
11159             }
11160         }
11161 
11162         public static final OnnxSchema SCHEMA = new OnnxSchemaRecord(
11163                 NAME,
11164                 List.of(Attribute.values()),
11165                 List.of(TypeConstraint.values()),
11166                 List.of(InputParameter.values()),
11167                 List.of(OutputParameter.values())
11168         );
11169 
11170         public GroupNormalization(ExternalizedOp def) {
11171             super(SCHEMA, def);
11172         }
11173 
11174         GroupNormalization(GroupNormalization that, CopyContext cc) {
11175             super(that, cc);
11176         }
11177 
11178         @Override
11179         public GroupNormalization transform(CopyContext cc, OpTransformer ot) {
11180             return new GroupNormalization(this, cc);
11181         }
11182 
11183         GroupNormalization(TypeElement resultType, Value X, Value scale, Value bias, java.util.Optional<Float> epsilon, java.util.Optional<Long> stash_type, long num_groups) {
11184             super(SCHEMA, resultType, Set.of(), List.of(X, scale, bias), List.of(epsilon, stash_type, num_groups));
11185         }
11186 
11187         @Override
11188         public SequencedSet<OnnxParameter> onnxOutputs() {
11189             return onnxOutputs(SCHEMA);
11190         }
11191 
11192         @Override
11193         public SequencedMap<OnnxParameter, Object> onnxInputs() {
11194             return onnxInputs(SCHEMA, List.of(X(), scale(), bias()));
11195         }
11196 
11197         public Value X() {
11198             return operands().get(0);
11199         }
11200 
11201         public Value scale() {
11202             return operands().get(1);
11203         }
11204 
11205         public Value bias() {
11206             return operands().get(2);
11207         }
11208 
11209         public java.util.Optional<Float> epsilon() {
11210             Float epsilon = Attribute.epsilon.access(Float.class, onnxAttributes);
11211             return java.util.Optional.ofNullable(epsilon);
11212         }
11213 
11214         public java.util.Optional<Long> stash_type() {
11215             Long stash_type = Attribute.stash_type.access(Long.class, onnxAttributes);
11216             return java.util.Optional.ofNullable(stash_type);
11217         }
11218 
11219         public long num_groups() {
11220             long num_groups = Attribute.num_groups.access(Long.class, onnxAttributes);
11221             return num_groups;
11222         }
11223 
11224     }
11225 
11226     public static GroupNormalization GroupNormalization(TypeElement resultType, Value X, Value scale, Value bias, java.util.Optional<Float> epsilon, java.util.Optional<Long> stash_type, long num_groups) {
11227         return new GroupNormalization(resultType, X, scale, bias, epsilon, stash_type, num_groups);
11228     }
11229 
11230     @OpFactoryHelper.OpDeclaration(HammingWindow.NAME)
11231     public static final class HammingWindow extends OnnxOp {
11232         public static final String NAME = "HammingWindow";
11233 
11234         public enum Attribute implements OnnxAttribute {
11235             periodic(Long.class, true, 1),
11236             output_datatype(Long.class, true, 1),
11237             ;
11238 
11239                 final Class<?> t;
11240                 final boolean optional;
11241                 final Object defaultValue;
11242 
11243                 Attribute(Class<?> type, boolean optional, Object defaultValue) {
11244                     this.t = type;
11245                     this.optional = optional;
11246                     this.defaultValue = defaultValue;
11247                     assert optional || defaultValue == null;
11248                 }
11249 
11250                 public Class<?> type() {
11251                     return t;
11252                 }
11253 
11254                 public boolean isOptional() {
11255                     return optional;
11256                 }
11257 
11258                 public Object defaultValue() {
11259                     return defaultValue;
11260                 }
11261         }
11262 
11263         public enum TypeConstraint implements OnnxTypeConstraint {
11264             T1(new OnnxType.TypeVariable("T1", List.of(OnnxType.tensor(OnnxType.int32()), OnnxType.tensor(OnnxType.int64())))),
11265             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())))),
11266             ;
11267 
11268             final OnnxType.TypeVariable typeVariable;
11269 
11270             TypeConstraint(OnnxType.TypeVariable typeVariable) {
11271                 assert typeVariable.name().equals(name());
11272                 this.typeVariable = typeVariable;
11273             }
11274 
11275             @Override
11276             public OnnxType.TypeVariable typeVariable() {
11277                 return typeVariable;
11278             }
11279         }
11280 
11281         public enum InputParameter implements OnnxParameter {
11282             size(TypeConstraint.T1.typeVariable(), Quantifier.REQUIRED),
11283             ;
11284 
11285             final OnnxType type;
11286             final Quantifier quantifier;
11287 
11288             InputParameter(OnnxType type, Quantifier quantifier) {
11289                 this.type = type;
11290                 this.quantifier = quantifier;
11291             }
11292 
11293             @Override
11294             public OnnxType type() {
11295                 return type;
11296             }
11297 
11298             @Override
11299             public Quantifier quantifier() {
11300                 return quantifier;
11301             }
11302         }
11303 
11304         public enum OutputParameter implements OnnxParameter {
11305             output(TypeConstraint.T2.typeVariable(), Quantifier.REQUIRED),
11306             ;
11307 
11308             final OnnxType type;
11309             final Quantifier quantifier;
11310 
11311             OutputParameter(OnnxType type, Quantifier quantifier) {
11312                 this.type = type;
11313                 this.quantifier = quantifier;
11314             }
11315 
11316             @Override
11317             public OnnxType type() {
11318                 return type;
11319             }
11320 
11321             @Override
11322             public Quantifier quantifier() {
11323                 return quantifier;
11324             }
11325         }
11326 
11327         public static final OnnxSchema SCHEMA = new OnnxSchemaRecord(
11328                 NAME,
11329                 List.of(Attribute.values()),
11330                 List.of(TypeConstraint.values()),
11331                 List.of(InputParameter.values()),
11332                 List.of(OutputParameter.values())
11333         );
11334 
11335         public HammingWindow(ExternalizedOp def) {
11336             super(SCHEMA, def);
11337         }
11338 
11339         HammingWindow(HammingWindow that, CopyContext cc) {
11340             super(that, cc);
11341         }
11342 
11343         @Override
11344         public HammingWindow transform(CopyContext cc, OpTransformer ot) {
11345             return new HammingWindow(this, cc);
11346         }
11347 
11348         HammingWindow(TypeElement resultType, Value size, java.util.Optional<Long> periodic, java.util.Optional<Long> output_datatype) {
11349             super(SCHEMA, resultType, Set.of(), List.of(size), List.of(periodic, output_datatype));
11350         }
11351 
11352         @Override
11353         public SequencedSet<OnnxParameter> onnxOutputs() {
11354             return onnxOutputs(SCHEMA);
11355         }
11356 
11357         @Override
11358         public SequencedMap<OnnxParameter, Object> onnxInputs() {
11359             return onnxInputs(SCHEMA, List.of(size()));
11360         }
11361 
11362         public Value size() {
11363             return operands().get(0);
11364         }
11365 
11366         public java.util.Optional<Long> periodic() {
11367             Long periodic = Attribute.periodic.access(Long.class, onnxAttributes);
11368             return java.util.Optional.ofNullable(periodic);
11369         }
11370 
11371         public java.util.Optional<Long> output_datatype() {
11372             Long output_datatype = Attribute.output_datatype.access(Long.class, onnxAttributes);
11373             return java.util.Optional.ofNullable(output_datatype);
11374         }
11375 
11376     }
11377 
11378     public static HammingWindow HammingWindow(TypeElement resultType, Value size, java.util.Optional<Long> periodic, java.util.Optional<Long> output_datatype) {
11379         return new HammingWindow(resultType, size, periodic, output_datatype);
11380     }
11381 
11382     @OpFactoryHelper.OpDeclaration(HannWindow.NAME)
11383     public static final class HannWindow extends OnnxOp {
11384         public static final String NAME = "HannWindow";
11385 
11386         public enum Attribute implements OnnxAttribute {
11387             periodic(Long.class, true, 1),
11388             output_datatype(Long.class, true, 1),
11389             ;
11390 
11391                 final Class<?> t;
11392                 final boolean optional;
11393                 final Object defaultValue;
11394 
11395                 Attribute(Class<?> type, boolean optional, Object defaultValue) {
11396                     this.t = type;
11397                     this.optional = optional;
11398                     this.defaultValue = defaultValue;
11399                     assert optional || defaultValue == null;
11400                 }
11401 
11402                 public Class<?> type() {
11403                     return t;
11404                 }
11405 
11406                 public boolean isOptional() {
11407                     return optional;
11408                 }
11409 
11410                 public Object defaultValue() {
11411                     return defaultValue;
11412                 }
11413         }
11414 
11415         public enum TypeConstraint implements OnnxTypeConstraint {
11416             T1(new OnnxType.TypeVariable("T1", List.of(OnnxType.tensor(OnnxType.int32()), OnnxType.tensor(OnnxType.int64())))),
11417             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())))),
11418             ;
11419 
11420             final OnnxType.TypeVariable typeVariable;
11421 
11422             TypeConstraint(OnnxType.TypeVariable typeVariable) {
11423                 assert typeVariable.name().equals(name());
11424                 this.typeVariable = typeVariable;
11425             }
11426 
11427             @Override
11428             public OnnxType.TypeVariable typeVariable() {
11429                 return typeVariable;
11430             }
11431         }
11432 
11433         public enum InputParameter implements OnnxParameter {
11434             size(TypeConstraint.T1.typeVariable(), Quantifier.REQUIRED),
11435             ;
11436 
11437             final OnnxType type;
11438             final Quantifier quantifier;
11439 
11440             InputParameter(OnnxType type, Quantifier quantifier) {
11441                 this.type = type;
11442                 this.quantifier = quantifier;
11443             }
11444 
11445             @Override
11446             public OnnxType type() {
11447                 return type;
11448             }
11449 
11450             @Override
11451             public Quantifier quantifier() {
11452                 return quantifier;
11453             }
11454         }
11455 
11456         public enum OutputParameter implements OnnxParameter {
11457             output(TypeConstraint.T2.typeVariable(), Quantifier.REQUIRED),
11458             ;
11459 
11460             final OnnxType type;
11461             final Quantifier quantifier;
11462 
11463             OutputParameter(OnnxType type, Quantifier quantifier) {
11464                 this.type = type;
11465                 this.quantifier = quantifier;
11466             }
11467 
11468             @Override
11469             public OnnxType type() {
11470                 return type;
11471             }
11472 
11473             @Override
11474             public Quantifier quantifier() {
11475                 return quantifier;
11476             }
11477         }
11478 
11479         public static final OnnxSchema SCHEMA = new OnnxSchemaRecord(
11480                 NAME,
11481                 List.of(Attribute.values()),
11482                 List.of(TypeConstraint.values()),
11483                 List.of(InputParameter.values()),
11484                 List.of(OutputParameter.values())
11485         );
11486 
11487         public HannWindow(ExternalizedOp def) {
11488             super(SCHEMA, def);
11489         }
11490 
11491         HannWindow(HannWindow that, CopyContext cc) {
11492             super(that, cc);
11493         }
11494 
11495         @Override
11496         public HannWindow transform(CopyContext cc, OpTransformer ot) {
11497             return new HannWindow(this, cc);
11498         }
11499 
11500         HannWindow(TypeElement resultType, Value size, java.util.Optional<Long> periodic, java.util.Optional<Long> output_datatype) {
11501             super(SCHEMA, resultType, Set.of(), List.of(size), List.of(periodic, output_datatype));
11502         }
11503 
11504         @Override
11505         public SequencedSet<OnnxParameter> onnxOutputs() {
11506             return onnxOutputs(SCHEMA);
11507         }
11508 
11509         @Override
11510         public SequencedMap<OnnxParameter, Object> onnxInputs() {
11511             return onnxInputs(SCHEMA, List.of(size()));
11512         }
11513 
11514         public Value size() {
11515             return operands().get(0);
11516         }
11517 
11518         public java.util.Optional<Long> periodic() {
11519             Long periodic = Attribute.periodic.access(Long.class, onnxAttributes);
11520             return java.util.Optional.ofNullable(periodic);
11521         }
11522 
11523         public java.util.Optional<Long> output_datatype() {
11524             Long output_datatype = Attribute.output_datatype.access(Long.class, onnxAttributes);
11525             return java.util.Optional.ofNullable(output_datatype);
11526         }
11527 
11528     }
11529 
11530     public static HannWindow HannWindow(TypeElement resultType, Value size, java.util.Optional<Long> periodic, java.util.Optional<Long> output_datatype) {
11531         return new HannWindow(resultType, size, periodic, output_datatype);
11532     }
11533 
11534     @OpFactoryHelper.OpDeclaration(HardSigmoid.NAME)
11535     public static final class HardSigmoid extends OnnxOp {
11536         public static final String NAME = "HardSigmoid";
11537 
11538         public enum Attribute implements OnnxAttribute {
11539             alpha(Float.class, true, 0.2f),
11540             beta(Float.class, true, 0.5f),
11541             ;
11542 
11543                 final Class<?> t;
11544                 final boolean optional;
11545                 final Object defaultValue;
11546 
11547                 Attribute(Class<?> type, boolean optional, Object defaultValue) {
11548                     this.t = type;
11549                     this.optional = optional;
11550                     this.defaultValue = defaultValue;
11551                     assert optional || defaultValue == null;
11552                 }
11553 
11554                 public Class<?> type() {
11555                     return t;
11556                 }
11557 
11558                 public boolean isOptional() {
11559                     return optional;
11560                 }
11561 
11562                 public Object defaultValue() {
11563                     return defaultValue;
11564                 }
11565         }
11566 
11567         public enum TypeConstraint implements OnnxTypeConstraint {
11568             T(new OnnxType.TypeVariable("T", List.of(OnnxType.tensor(OnnxType.bfloat16()), OnnxType.tensor(OnnxType.float16()), OnnxType.tensor(OnnxType.float32()), OnnxType.tensor(OnnxType.float64())))),
11569             ;
11570 
11571             final OnnxType.TypeVariable typeVariable;
11572 
11573             TypeConstraint(OnnxType.TypeVariable typeVariable) {
11574                 assert typeVariable.name().equals(name());
11575                 this.typeVariable = typeVariable;
11576             }
11577 
11578             @Override
11579             public OnnxType.TypeVariable typeVariable() {
11580                 return typeVariable;
11581             }
11582         }
11583 
11584         public enum InputParameter implements OnnxParameter {
11585             X(TypeConstraint.T.typeVariable(), Quantifier.REQUIRED),
11586             ;
11587 
11588             final OnnxType type;
11589             final Quantifier quantifier;
11590 
11591             InputParameter(OnnxType type, Quantifier quantifier) {
11592                 this.type = type;
11593                 this.quantifier = quantifier;
11594             }
11595 
11596             @Override
11597             public OnnxType type() {
11598                 return type;
11599             }
11600 
11601             @Override
11602             public Quantifier quantifier() {
11603                 return quantifier;
11604             }
11605         }
11606 
11607         public enum OutputParameter implements OnnxParameter {
11608             Y(TypeConstraint.T.typeVariable(), Quantifier.REQUIRED),
11609             ;
11610 
11611             final OnnxType type;
11612             final Quantifier quantifier;
11613 
11614             OutputParameter(OnnxType type, Quantifier quantifier) {
11615                 this.type = type;
11616                 this.quantifier = quantifier;
11617             }
11618 
11619             @Override
11620             public OnnxType type() {
11621                 return type;
11622             }
11623 
11624             @Override
11625             public Quantifier quantifier() {
11626                 return quantifier;
11627             }
11628         }
11629 
11630         public static final OnnxSchema SCHEMA = new OnnxSchemaRecord(
11631                 NAME,
11632                 List.of(Attribute.values()),
11633                 List.of(TypeConstraint.values()),
11634                 List.of(InputParameter.values()),
11635                 List.of(OutputParameter.values())
11636         );
11637 
11638         public HardSigmoid(ExternalizedOp def) {
11639             super(SCHEMA, def);
11640         }
11641 
11642         HardSigmoid(HardSigmoid that, CopyContext cc) {
11643             super(that, cc);
11644         }
11645 
11646         @Override
11647         public HardSigmoid transform(CopyContext cc, OpTransformer ot) {
11648             return new HardSigmoid(this, cc);
11649         }
11650 
11651         HardSigmoid(TypeElement resultType, Value X, java.util.Optional<Float> alpha, java.util.Optional<Float> beta) {
11652             super(SCHEMA, resultType, Set.of(), List.of(X), List.of(alpha, beta));
11653         }
11654 
11655         @Override
11656         public SequencedSet<OnnxParameter> onnxOutputs() {
11657             return onnxOutputs(SCHEMA);
11658         }
11659 
11660         @Override
11661         public SequencedMap<OnnxParameter, Object> onnxInputs() {
11662             return onnxInputs(SCHEMA, List.of(X()));
11663         }
11664 
11665         public Value X() {
11666             return operands().get(0);
11667         }
11668 
11669         public java.util.Optional<Float> alpha() {
11670             Float alpha = Attribute.alpha.access(Float.class, onnxAttributes);
11671             return java.util.Optional.ofNullable(alpha);
11672         }
11673 
11674         public java.util.Optional<Float> beta() {
11675             Float beta = Attribute.beta.access(Float.class, onnxAttributes);
11676             return java.util.Optional.ofNullable(beta);
11677         }
11678 
11679     }
11680 
11681     public static HardSigmoid HardSigmoid(TypeElement resultType, Value X, java.util.Optional<Float> alpha, java.util.Optional<Float> beta) {
11682         return new HardSigmoid(resultType, X, alpha, beta);
11683     }
11684 
11685     @OpFactoryHelper.OpDeclaration(HardSwish.NAME)
11686     public static final class HardSwish extends OnnxOp {
11687         public static final String NAME = "HardSwish";
11688 
11689         public enum Attribute implements OnnxAttribute.None { }
11690 
11691         public enum TypeConstraint implements OnnxTypeConstraint {
11692             T(new OnnxType.TypeVariable("T", List.of(OnnxType.tensor(OnnxType.bfloat16()), OnnxType.tensor(OnnxType.float16()), OnnxType.tensor(OnnxType.float32()), OnnxType.tensor(OnnxType.float64())))),
11693             ;
11694 
11695             final OnnxType.TypeVariable typeVariable;
11696 
11697             TypeConstraint(OnnxType.TypeVariable typeVariable) {
11698                 assert typeVariable.name().equals(name());
11699                 this.typeVariable = typeVariable;
11700             }
11701 
11702             @Override
11703             public OnnxType.TypeVariable typeVariable() {
11704                 return typeVariable;
11705             }
11706         }
11707 
11708         public enum InputParameter implements OnnxParameter {
11709             X(TypeConstraint.T.typeVariable(), Quantifier.REQUIRED),
11710             ;
11711 
11712             final OnnxType type;
11713             final Quantifier quantifier;
11714 
11715             InputParameter(OnnxType type, Quantifier quantifier) {
11716                 this.type = type;
11717                 this.quantifier = quantifier;
11718             }
11719 
11720             @Override
11721             public OnnxType type() {
11722                 return type;
11723             }
11724 
11725             @Override
11726             public Quantifier quantifier() {
11727                 return quantifier;
11728             }
11729         }
11730 
11731         public enum OutputParameter implements OnnxParameter {
11732             Y(TypeConstraint.T.typeVariable(), Quantifier.REQUIRED),
11733             ;
11734 
11735             final OnnxType type;
11736             final Quantifier quantifier;
11737 
11738             OutputParameter(OnnxType type, Quantifier quantifier) {
11739                 this.type = type;
11740                 this.quantifier = quantifier;
11741             }
11742 
11743             @Override
11744             public OnnxType type() {
11745                 return type;
11746             }
11747 
11748             @Override
11749             public Quantifier quantifier() {
11750                 return quantifier;
11751             }
11752         }
11753 
11754         public static final OnnxSchema SCHEMA = new OnnxSchemaRecord(
11755                 NAME,
11756                 List.of(Attribute.values()),
11757                 List.of(TypeConstraint.values()),
11758                 List.of(InputParameter.values()),
11759                 List.of(OutputParameter.values())
11760         );
11761 
11762         public HardSwish(ExternalizedOp def) {
11763             super(SCHEMA, def);
11764         }
11765 
11766         HardSwish(HardSwish that, CopyContext cc) {
11767             super(that, cc);
11768         }
11769 
11770         @Override
11771         public HardSwish transform(CopyContext cc, OpTransformer ot) {
11772             return new HardSwish(this, cc);
11773         }
11774 
11775         HardSwish(TypeElement resultType, Value X) {
11776             super(SCHEMA, resultType, Set.of(), List.of(X), List.of());
11777         }
11778 
11779         @Override
11780         public SequencedSet<OnnxParameter> onnxOutputs() {
11781             return onnxOutputs(SCHEMA);
11782         }
11783 
11784         @Override
11785         public SequencedMap<OnnxParameter, Object> onnxInputs() {
11786             return onnxInputs(SCHEMA, List.of(X()));
11787         }
11788 
11789         public Value X() {
11790             return operands().get(0);
11791         }
11792 
11793     }
11794 
11795     public static HardSwish HardSwish(TypeElement resultType, Value X) {
11796         return new HardSwish(resultType, X);
11797     }
11798 
11799     @OpFactoryHelper.OpDeclaration(Hardmax.NAME)
11800     public static final class Hardmax extends OnnxOp {
11801         public static final String NAME = "Hardmax";
11802 
11803         public enum Attribute implements OnnxAttribute {
11804             axis(Long.class, true, -1),
11805             ;
11806 
11807                 final Class<?> t;
11808                 final boolean optional;
11809                 final Object defaultValue;
11810 
11811                 Attribute(Class<?> type, boolean optional, Object defaultValue) {
11812                     this.t = type;
11813                     this.optional = optional;
11814                     this.defaultValue = defaultValue;
11815                     assert optional || defaultValue == null;
11816                 }
11817 
11818                 public Class<?> type() {
11819                     return t;
11820                 }
11821 
11822                 public boolean isOptional() {
11823                     return optional;
11824                 }
11825 
11826                 public Object defaultValue() {
11827                     return defaultValue;
11828                 }
11829         }
11830 
11831         public enum TypeConstraint implements OnnxTypeConstraint {
11832             T(new OnnxType.TypeVariable("T", List.of(OnnxType.tensor(OnnxType.float16()), OnnxType.tensor(OnnxType.float32()), OnnxType.tensor(OnnxType.float64()), OnnxType.tensor(OnnxType.bfloat16())))),
11833             ;
11834 
11835             final OnnxType.TypeVariable typeVariable;
11836 
11837             TypeConstraint(OnnxType.TypeVariable typeVariable) {
11838                 assert typeVariable.name().equals(name());
11839                 this.typeVariable = typeVariable;
11840             }
11841 
11842             @Override
11843             public OnnxType.TypeVariable typeVariable() {
11844                 return typeVariable;
11845             }
11846         }
11847 
11848         public enum InputParameter implements OnnxParameter {
11849             input(TypeConstraint.T.typeVariable(), Quantifier.REQUIRED),
11850             ;
11851 
11852             final OnnxType type;
11853             final Quantifier quantifier;
11854 
11855             InputParameter(OnnxType type, Quantifier quantifier) {
11856                 this.type = type;
11857                 this.quantifier = quantifier;
11858             }
11859 
11860             @Override
11861             public OnnxType type() {
11862                 return type;
11863             }
11864 
11865             @Override
11866             public Quantifier quantifier() {
11867                 return quantifier;
11868             }
11869         }
11870 
11871         public enum OutputParameter implements OnnxParameter {
11872             output(TypeConstraint.T.typeVariable(), Quantifier.REQUIRED),
11873             ;
11874 
11875             final OnnxType type;
11876             final Quantifier quantifier;
11877 
11878             OutputParameter(OnnxType type, Quantifier quantifier) {
11879                 this.type = type;
11880                 this.quantifier = quantifier;
11881             }
11882 
11883             @Override
11884             public OnnxType type() {
11885                 return type;
11886             }
11887 
11888             @Override
11889             public Quantifier quantifier() {
11890                 return quantifier;
11891             }
11892         }
11893 
11894         public static final OnnxSchema SCHEMA = new OnnxSchemaRecord(
11895                 NAME,
11896                 List.of(Attribute.values()),
11897                 List.of(TypeConstraint.values()),
11898                 List.of(InputParameter.values()),
11899                 List.of(OutputParameter.values())
11900         );
11901 
11902         public Hardmax(ExternalizedOp def) {
11903             super(SCHEMA, def);
11904         }
11905 
11906         Hardmax(Hardmax that, CopyContext cc) {
11907             super(that, cc);
11908         }
11909 
11910         @Override
11911         public Hardmax transform(CopyContext cc, OpTransformer ot) {
11912             return new Hardmax(this, cc);
11913         }
11914 
11915         Hardmax(TypeElement resultType, Value input, java.util.Optional<Long> axis) {
11916             super(SCHEMA, resultType, Set.of(), List.of(input), List.of(axis));
11917         }
11918 
11919         @Override
11920         public SequencedSet<OnnxParameter> onnxOutputs() {
11921             return onnxOutputs(SCHEMA);
11922         }
11923 
11924         @Override
11925         public SequencedMap<OnnxParameter, Object> onnxInputs() {
11926             return onnxInputs(SCHEMA, List.of(input()));
11927         }
11928 
11929         public Value input() {
11930             return operands().get(0);
11931         }
11932 
11933         public java.util.Optional<Long> axis() {
11934             Long axis = Attribute.axis.access(Long.class, onnxAttributes);
11935             return java.util.Optional.ofNullable(axis);
11936         }
11937 
11938     }
11939 
11940     public static Hardmax Hardmax(TypeElement resultType, Value input, java.util.Optional<Long> axis) {
11941         return new Hardmax(resultType, input, axis);
11942     }
11943 
11944     @OpFactoryHelper.OpDeclaration(Identity.NAME)
11945     public static final class Identity extends OnnxOp {
11946         public static final String NAME = "Identity";
11947 
11948         public enum Attribute implements OnnxAttribute.None { }
11949 
11950         public enum TypeConstraint implements OnnxTypeConstraint {
11951             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()))))),
11952             ;
11953 
11954             final OnnxType.TypeVariable typeVariable;
11955 
11956             TypeConstraint(OnnxType.TypeVariable typeVariable) {
11957                 assert typeVariable.name().equals(name());
11958                 this.typeVariable = typeVariable;
11959             }
11960 
11961             @Override
11962             public OnnxType.TypeVariable typeVariable() {
11963                 return typeVariable;
11964             }
11965         }
11966 
11967         public enum InputParameter implements OnnxParameter {
11968             input(TypeConstraint.V.typeVariable(), Quantifier.REQUIRED),
11969             ;
11970 
11971             final OnnxType type;
11972             final Quantifier quantifier;
11973 
11974             InputParameter(OnnxType type, Quantifier quantifier) {
11975                 this.type = type;
11976                 this.quantifier = quantifier;
11977             }
11978 
11979             @Override
11980             public OnnxType type() {
11981                 return type;
11982             }
11983 
11984             @Override
11985             public Quantifier quantifier() {
11986                 return quantifier;
11987             }
11988         }
11989 
11990         public enum OutputParameter implements OnnxParameter {
11991             output(TypeConstraint.V.typeVariable(), Quantifier.REQUIRED),
11992             ;
11993 
11994             final OnnxType type;
11995             final Quantifier quantifier;
11996 
11997             OutputParameter(OnnxType type, Quantifier quantifier) {
11998                 this.type = type;
11999                 this.quantifier = quantifier;
12000             }
12001 
12002             @Override
12003             public OnnxType type() {
12004                 return type;
12005             }
12006 
12007             @Override
12008             public Quantifier quantifier() {
12009                 return quantifier;
12010             }
12011         }
12012 
12013         public static final OnnxSchema SCHEMA = new OnnxSchemaRecord(
12014                 NAME,
12015                 List.of(Attribute.values()),
12016                 List.of(TypeConstraint.values()),
12017                 List.of(InputParameter.values()),
12018                 List.of(OutputParameter.values())
12019         );
12020 
12021         public Identity(ExternalizedOp def) {
12022             super(SCHEMA, def);
12023         }
12024 
12025         Identity(Identity that, CopyContext cc) {
12026             super(that, cc);
12027         }
12028 
12029         @Override
12030         public Identity transform(CopyContext cc, OpTransformer ot) {
12031             return new Identity(this, cc);
12032         }
12033 
12034         Identity(TypeElement resultType, Value input) {
12035             super(SCHEMA, resultType, Set.of(), List.of(input), List.of());
12036         }
12037 
12038         @Override
12039         public SequencedSet<OnnxParameter> onnxOutputs() {
12040             return onnxOutputs(SCHEMA);
12041         }
12042 
12043         @Override
12044         public SequencedMap<OnnxParameter, Object> onnxInputs() {
12045             return onnxInputs(SCHEMA, List.of(input()));
12046         }
12047 
12048         public Value input() {
12049             return operands().get(0);
12050         }
12051 
12052     }
12053 
12054     public static Identity Identity(TypeElement resultType, Value input) {
12055         return new Identity(resultType, input);
12056     }
12057 
12058     @OpFactoryHelper.OpDeclaration(ImageDecoder.NAME)
12059     public static final class ImageDecoder extends OnnxOp {
12060         public static final String NAME = "ImageDecoder";
12061 
12062         public enum Attribute implements OnnxAttribute {
12063             pixel_format(String.class, true, "RGB"),
12064             ;
12065 
12066                 final Class<?> t;
12067                 final boolean optional;
12068                 final Object defaultValue;
12069 
12070                 Attribute(Class<?> type, boolean optional, Object defaultValue) {
12071                     this.t = type;
12072                     this.optional = optional;
12073                     this.defaultValue = defaultValue;
12074                     assert optional || defaultValue == null;
12075                 }
12076 
12077                 public Class<?> type() {
12078                     return t;
12079                 }
12080 
12081                 public boolean isOptional() {
12082                     return optional;
12083                 }
12084 
12085                 public Object defaultValue() {
12086                     return defaultValue;
12087                 }
12088         }
12089 
12090         public enum TypeConstraint implements OnnxTypeConstraint {
12091             T1(new OnnxType.TypeVariable("T1", List.of(OnnxType.tensor(OnnxType.uint8())))),
12092             T2(new OnnxType.TypeVariable("T2", List.of(OnnxType.tensor(OnnxType.uint8())))),
12093             ;
12094 
12095             final OnnxType.TypeVariable typeVariable;
12096 
12097             TypeConstraint(OnnxType.TypeVariable typeVariable) {
12098                 assert typeVariable.name().equals(name());
12099                 this.typeVariable = typeVariable;
12100             }
12101 
12102             @Override
12103             public OnnxType.TypeVariable typeVariable() {
12104                 return typeVariable;
12105             }
12106         }
12107 
12108         public enum InputParameter implements OnnxParameter {
12109             encoded_stream(TypeConstraint.T1.typeVariable(), Quantifier.REQUIRED),
12110             ;
12111 
12112             final OnnxType type;
12113             final Quantifier quantifier;
12114 
12115             InputParameter(OnnxType type, Quantifier quantifier) {
12116                 this.type = type;
12117                 this.quantifier = quantifier;
12118             }
12119 
12120             @Override
12121             public OnnxType type() {
12122                 return type;
12123             }
12124 
12125             @Override
12126             public Quantifier quantifier() {
12127                 return quantifier;
12128             }
12129         }
12130 
12131         public enum OutputParameter implements OnnxParameter {
12132             image(TypeConstraint.T2.typeVariable(), Quantifier.REQUIRED),
12133             ;
12134 
12135             final OnnxType type;
12136             final Quantifier quantifier;
12137 
12138             OutputParameter(OnnxType type, Quantifier quantifier) {
12139                 this.type = type;
12140                 this.quantifier = quantifier;
12141             }
12142 
12143             @Override
12144             public OnnxType type() {
12145                 return type;
12146             }
12147 
12148             @Override
12149             public Quantifier quantifier() {
12150                 return quantifier;
12151             }
12152         }
12153 
12154         public static final OnnxSchema SCHEMA = new OnnxSchemaRecord(
12155                 NAME,
12156                 List.of(Attribute.values()),
12157                 List.of(TypeConstraint.values()),
12158                 List.of(InputParameter.values()),
12159                 List.of(OutputParameter.values())
12160         );
12161 
12162         public ImageDecoder(ExternalizedOp def) {
12163             super(SCHEMA, def);
12164         }
12165 
12166         ImageDecoder(ImageDecoder that, CopyContext cc) {
12167             super(that, cc);
12168         }
12169 
12170         @Override
12171         public ImageDecoder transform(CopyContext cc, OpTransformer ot) {
12172             return new ImageDecoder(this, cc);
12173         }
12174 
12175         ImageDecoder(TypeElement resultType, Value encoded_stream, java.util.Optional<String> pixel_format) {
12176             super(SCHEMA, resultType, Set.of(), List.of(encoded_stream), List.of(pixel_format));
12177         }
12178 
12179         @Override
12180         public SequencedSet<OnnxParameter> onnxOutputs() {
12181             return onnxOutputs(SCHEMA);
12182         }
12183 
12184         @Override
12185         public SequencedMap<OnnxParameter, Object> onnxInputs() {
12186             return onnxInputs(SCHEMA, List.of(encoded_stream()));
12187         }
12188 
12189         public Value encoded_stream() {
12190             return operands().get(0);
12191         }
12192 
12193         public java.util.Optional<String> pixel_format() {
12194             String pixel_format = Attribute.pixel_format.access(String.class, onnxAttributes);
12195             return java.util.Optional.ofNullable(pixel_format);
12196         }
12197 
12198     }
12199 
12200     public static ImageDecoder ImageDecoder(TypeElement resultType, Value encoded_stream, java.util.Optional<String> pixel_format) {
12201         return new ImageDecoder(resultType, encoded_stream, pixel_format);
12202     }
12203 
12204     @OpFactoryHelper.OpDeclaration(Imputer.NAME)
12205     public static final class Imputer extends OnnxOp {
12206         public static final String NAME = "Imputer";
12207 
12208         public enum Attribute implements OnnxAttribute {
12209             replaced_value_int64(Long.class, true, 0),
12210             replaced_value_float(Float.class, true, 0.0f),
12211             imputed_value_int64s(long[].class, true, null),
12212             imputed_value_floats(float[].class, true, null),
12213             ;
12214 
12215                 final Class<?> t;
12216                 final boolean optional;
12217                 final Object defaultValue;
12218 
12219                 Attribute(Class<?> type, boolean optional, Object defaultValue) {
12220                     this.t = type;
12221                     this.optional = optional;
12222                     this.defaultValue = defaultValue;
12223                     assert optional || defaultValue == null;
12224                 }
12225 
12226                 public Class<?> type() {
12227                     return t;
12228                 }
12229 
12230                 public boolean isOptional() {
12231                     return optional;
12232                 }
12233 
12234                 public Object defaultValue() {
12235                     return defaultValue;
12236                 }
12237         }
12238 
12239         public enum TypeConstraint implements OnnxTypeConstraint {
12240             T(new OnnxType.TypeVariable("T", List.of(OnnxType.tensor(OnnxType.float32()), OnnxType.tensor(OnnxType.float64()), OnnxType.tensor(OnnxType.int64()), OnnxType.tensor(OnnxType.int32())))),
12241             ;
12242 
12243             final OnnxType.TypeVariable typeVariable;
12244 
12245             TypeConstraint(OnnxType.TypeVariable typeVariable) {
12246                 assert typeVariable.name().equals(name());
12247                 this.typeVariable = typeVariable;
12248             }
12249 
12250             @Override
12251             public OnnxType.TypeVariable typeVariable() {
12252                 return typeVariable;
12253             }
12254         }
12255 
12256         public enum InputParameter implements OnnxParameter {
12257             X(TypeConstraint.T.typeVariable(), Quantifier.REQUIRED),
12258             ;
12259 
12260             final OnnxType type;
12261             final Quantifier quantifier;
12262 
12263             InputParameter(OnnxType type, Quantifier quantifier) {
12264                 this.type = type;
12265                 this.quantifier = quantifier;
12266             }
12267 
12268             @Override
12269             public OnnxType type() {
12270                 return type;
12271             }
12272 
12273             @Override
12274             public Quantifier quantifier() {
12275                 return quantifier;
12276             }
12277         }
12278 
12279         public enum OutputParameter implements OnnxParameter {
12280             Y(TypeConstraint.T.typeVariable(), Quantifier.REQUIRED),
12281             ;
12282 
12283             final OnnxType type;
12284             final Quantifier quantifier;
12285 
12286             OutputParameter(OnnxType type, Quantifier quantifier) {
12287                 this.type = type;
12288                 this.quantifier = quantifier;
12289             }
12290 
12291             @Override
12292             public OnnxType type() {
12293                 return type;
12294             }
12295 
12296             @Override
12297             public Quantifier quantifier() {
12298                 return quantifier;
12299             }
12300         }
12301 
12302         public static final OnnxSchema SCHEMA = new OnnxSchemaRecord(
12303                 NAME,
12304                 List.of(Attribute.values()),
12305                 List.of(TypeConstraint.values()),
12306                 List.of(InputParameter.values()),
12307                 List.of(OutputParameter.values())
12308         );
12309 
12310         public Imputer(ExternalizedOp def) {
12311             super(SCHEMA, def);
12312         }
12313 
12314         Imputer(Imputer that, CopyContext cc) {
12315             super(that, cc);
12316         }
12317 
12318         @Override
12319         public Imputer transform(CopyContext cc, OpTransformer ot) {
12320             return new Imputer(this, cc);
12321         }
12322 
12323         Imputer(TypeElement resultType, Value X, java.util.Optional<Long> replaced_value_int64, java.util.Optional<Float> replaced_value_float, java.util.Optional<long[]> imputed_value_int64s, java.util.Optional<float[]> imputed_value_floats) {
12324             super(SCHEMA, resultType, Set.of(), List.of(X), List.of(replaced_value_int64, replaced_value_float, imputed_value_int64s, imputed_value_floats));
12325         }
12326 
12327         @Override
12328         public SequencedSet<OnnxParameter> onnxOutputs() {
12329             return onnxOutputs(SCHEMA);
12330         }
12331 
12332         @Override
12333         public SequencedMap<OnnxParameter, Object> onnxInputs() {
12334             return onnxInputs(SCHEMA, List.of(X()));
12335         }
12336 
12337         public Value X() {
12338             return operands().get(0);
12339         }
12340 
12341         public java.util.Optional<Long> replaced_value_int64() {
12342             Long replaced_value_int64 = Attribute.replaced_value_int64.access(Long.class, onnxAttributes);
12343             return java.util.Optional.ofNullable(replaced_value_int64);
12344         }
12345 
12346         public java.util.Optional<Float> replaced_value_float() {
12347             Float replaced_value_float = Attribute.replaced_value_float.access(Float.class, onnxAttributes);
12348             return java.util.Optional.ofNullable(replaced_value_float);
12349         }
12350 
12351         public java.util.Optional<long[]> imputed_value_int64s() {
12352             long[] imputed_value_int64s = Attribute.imputed_value_int64s.access(long[].class, onnxAttributes);
12353             return java.util.Optional.ofNullable(imputed_value_int64s).map(long[]::clone);
12354         }
12355 
12356         public java.util.Optional<float[]> imputed_value_floats() {
12357             float[] imputed_value_floats = Attribute.imputed_value_floats.access(float[].class, onnxAttributes);
12358             return java.util.Optional.ofNullable(imputed_value_floats).map(float[]::clone);
12359         }
12360 
12361     }
12362 
12363     public static Imputer Imputer(TypeElement resultType, Value X, java.util.Optional<Long> replaced_value_int64, java.util.Optional<Float> replaced_value_float, java.util.Optional<long[]> imputed_value_int64s, java.util.Optional<float[]> imputed_value_floats) {
12364         return new Imputer(resultType, X, replaced_value_int64, replaced_value_float, imputed_value_int64s, imputed_value_floats);
12365     }
12366 
12367     @OpFactoryHelper.OpDeclaration(InstanceNormalization.NAME)
12368     public static final class InstanceNormalization extends OnnxOp {
12369         public static final String NAME = "InstanceNormalization";
12370 
12371         public enum Attribute implements OnnxAttribute {
12372             epsilon(Float.class, true, 1.0E-5f),
12373             ;
12374 
12375                 final Class<?> t;
12376                 final boolean optional;
12377                 final Object defaultValue;
12378 
12379                 Attribute(Class<?> type, boolean optional, Object defaultValue) {
12380                     this.t = type;
12381                     this.optional = optional;
12382                     this.defaultValue = defaultValue;
12383                     assert optional || defaultValue == null;
12384                 }
12385 
12386                 public Class<?> type() {
12387                     return t;
12388                 }
12389 
12390                 public boolean isOptional() {
12391                     return optional;
12392                 }
12393 
12394                 public Object defaultValue() {
12395                     return defaultValue;
12396                 }
12397         }
12398 
12399         public enum TypeConstraint implements OnnxTypeConstraint {
12400             T(new OnnxType.TypeVariable("T", List.of(OnnxType.tensor(OnnxType.bfloat16()), OnnxType.tensor(OnnxType.float16()), OnnxType.tensor(OnnxType.float32()), OnnxType.tensor(OnnxType.float64())))),
12401             ;
12402 
12403             final OnnxType.TypeVariable typeVariable;
12404 
12405             TypeConstraint(OnnxType.TypeVariable typeVariable) {
12406                 assert typeVariable.name().equals(name());
12407                 this.typeVariable = typeVariable;
12408             }
12409 
12410             @Override
12411             public OnnxType.TypeVariable typeVariable() {
12412                 return typeVariable;
12413             }
12414         }
12415 
12416         public enum InputParameter implements OnnxParameter {
12417             input(TypeConstraint.T.typeVariable(), Quantifier.REQUIRED),
12418             scale(TypeConstraint.T.typeVariable(), Quantifier.REQUIRED),
12419             B(TypeConstraint.T.typeVariable(), Quantifier.REQUIRED),
12420             ;
12421 
12422             final OnnxType type;
12423             final Quantifier quantifier;
12424 
12425             InputParameter(OnnxType type, Quantifier quantifier) {
12426                 this.type = type;
12427                 this.quantifier = quantifier;
12428             }
12429 
12430             @Override
12431             public OnnxType type() {
12432                 return type;
12433             }
12434 
12435             @Override
12436             public Quantifier quantifier() {
12437                 return quantifier;
12438             }
12439         }
12440 
12441         public enum OutputParameter implements OnnxParameter {
12442             output(TypeConstraint.T.typeVariable(), Quantifier.REQUIRED),
12443             ;
12444 
12445             final OnnxType type;
12446             final Quantifier quantifier;
12447 
12448             OutputParameter(OnnxType type, Quantifier quantifier) {
12449                 this.type = type;
12450                 this.quantifier = quantifier;
12451             }
12452 
12453             @Override
12454             public OnnxType type() {
12455                 return type;
12456             }
12457 
12458             @Override
12459             public Quantifier quantifier() {
12460                 return quantifier;
12461             }
12462         }
12463 
12464         public static final OnnxSchema SCHEMA = new OnnxSchemaRecord(
12465                 NAME,
12466                 List.of(Attribute.values()),
12467                 List.of(TypeConstraint.values()),
12468                 List.of(InputParameter.values()),
12469                 List.of(OutputParameter.values())
12470         );
12471 
12472         public InstanceNormalization(ExternalizedOp def) {
12473             super(SCHEMA, def);
12474         }
12475 
12476         InstanceNormalization(InstanceNormalization that, CopyContext cc) {
12477             super(that, cc);
12478         }
12479 
12480         @Override
12481         public InstanceNormalization transform(CopyContext cc, OpTransformer ot) {
12482             return new InstanceNormalization(this, cc);
12483         }
12484 
12485         InstanceNormalization(TypeElement resultType, Value input, Value scale, Value B, java.util.Optional<Float> epsilon) {
12486             super(SCHEMA, resultType, Set.of(), List.of(input, scale, B), List.of(epsilon));
12487         }
12488 
12489         @Override
12490         public SequencedSet<OnnxParameter> onnxOutputs() {
12491             return onnxOutputs(SCHEMA);
12492         }
12493 
12494         @Override
12495         public SequencedMap<OnnxParameter, Object> onnxInputs() {
12496             return onnxInputs(SCHEMA, List.of(input(), scale(), B()));
12497         }
12498 
12499         public Value input() {
12500             return operands().get(0);
12501         }
12502 
12503         public Value scale() {
12504             return operands().get(1);
12505         }
12506 
12507         public Value B() {
12508             return operands().get(2);
12509         }
12510 
12511         public java.util.Optional<Float> epsilon() {
12512             Float epsilon = Attribute.epsilon.access(Float.class, onnxAttributes);
12513             return java.util.Optional.ofNullable(epsilon);
12514         }
12515 
12516     }
12517 
12518     public static InstanceNormalization InstanceNormalization(TypeElement resultType, Value input, Value scale, Value B, java.util.Optional<Float> epsilon) {
12519         return new InstanceNormalization(resultType, input, scale, B, epsilon);
12520     }
12521 
12522     @OpFactoryHelper.OpDeclaration(IsInf.NAME)
12523     public static final class IsInf extends OnnxOp {
12524         public static final String NAME = "IsInf";
12525 
12526         public enum Attribute implements OnnxAttribute {
12527             detect_negative(Long.class, true, 1),
12528             detect_positive(Long.class, true, 1),
12529             ;
12530 
12531                 final Class<?> t;
12532                 final boolean optional;
12533                 final Object defaultValue;
12534 
12535                 Attribute(Class<?> type, boolean optional, Object defaultValue) {
12536                     this.t = type;
12537                     this.optional = optional;
12538                     this.defaultValue = defaultValue;
12539                     assert optional || defaultValue == null;
12540                 }
12541 
12542                 public Class<?> type() {
12543                     return t;
12544                 }
12545 
12546                 public boolean isOptional() {
12547                     return optional;
12548                 }
12549 
12550                 public Object defaultValue() {
12551                     return defaultValue;
12552                 }
12553         }
12554 
12555         public enum TypeConstraint implements OnnxTypeConstraint {
12556             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())))),
12557             T2(new OnnxType.TypeVariable("T2", List.of(OnnxType.tensor(OnnxType.bool())))),
12558             ;
12559 
12560             final OnnxType.TypeVariable typeVariable;
12561 
12562             TypeConstraint(OnnxType.TypeVariable typeVariable) {
12563                 assert typeVariable.name().equals(name());
12564                 this.typeVariable = typeVariable;
12565             }
12566 
12567             @Override
12568             public OnnxType.TypeVariable typeVariable() {
12569                 return typeVariable;
12570             }
12571         }
12572 
12573         public enum InputParameter implements OnnxParameter {
12574             X(TypeConstraint.T1.typeVariable(), Quantifier.REQUIRED),
12575             ;
12576 
12577             final OnnxType type;
12578             final Quantifier quantifier;
12579 
12580             InputParameter(OnnxType type, Quantifier quantifier) {
12581                 this.type = type;
12582                 this.quantifier = quantifier;
12583             }
12584 
12585             @Override
12586             public OnnxType type() {
12587                 return type;
12588             }
12589 
12590             @Override
12591             public Quantifier quantifier() {
12592                 return quantifier;
12593             }
12594         }
12595 
12596         public enum OutputParameter implements OnnxParameter {
12597             Y(TypeConstraint.T2.typeVariable(), Quantifier.REQUIRED),
12598             ;
12599 
12600             final OnnxType type;
12601             final Quantifier quantifier;
12602 
12603             OutputParameter(OnnxType type, Quantifier quantifier) {
12604                 this.type = type;
12605                 this.quantifier = quantifier;
12606             }
12607 
12608             @Override
12609             public OnnxType type() {
12610                 return type;
12611             }
12612 
12613             @Override
12614             public Quantifier quantifier() {
12615                 return quantifier;
12616             }
12617         }
12618 
12619         public static final OnnxSchema SCHEMA = new OnnxSchemaRecord(
12620                 NAME,
12621                 List.of(Attribute.values()),
12622                 List.of(TypeConstraint.values()),
12623                 List.of(InputParameter.values()),
12624                 List.of(OutputParameter.values())
12625         );
12626 
12627         public IsInf(ExternalizedOp def) {
12628             super(SCHEMA, def);
12629         }
12630 
12631         IsInf(IsInf that, CopyContext cc) {
12632             super(that, cc);
12633         }
12634 
12635         @Override
12636         public IsInf transform(CopyContext cc, OpTransformer ot) {
12637             return new IsInf(this, cc);
12638         }
12639 
12640         IsInf(TypeElement resultType, Value X, java.util.Optional<Long> detect_negative, java.util.Optional<Long> detect_positive) {
12641             super(SCHEMA, resultType, Set.of(), List.of(X), List.of(detect_negative, detect_positive));
12642         }
12643 
12644         @Override
12645         public SequencedSet<OnnxParameter> onnxOutputs() {
12646             return onnxOutputs(SCHEMA);
12647         }
12648 
12649         @Override
12650         public SequencedMap<OnnxParameter, Object> onnxInputs() {
12651             return onnxInputs(SCHEMA, List.of(X()));
12652         }
12653 
12654         public Value X() {
12655             return operands().get(0);
12656         }
12657 
12658         public java.util.Optional<Long> detect_negative() {
12659             Long detect_negative = Attribute.detect_negative.access(Long.class, onnxAttributes);
12660             return java.util.Optional.ofNullable(detect_negative);
12661         }
12662 
12663         public java.util.Optional<Long> detect_positive() {
12664             Long detect_positive = Attribute.detect_positive.access(Long.class, onnxAttributes);
12665             return java.util.Optional.ofNullable(detect_positive);
12666         }
12667 
12668     }
12669 
12670     public static IsInf IsInf(TypeElement resultType, Value X, java.util.Optional<Long> detect_negative, java.util.Optional<Long> detect_positive) {
12671         return new IsInf(resultType, X, detect_negative, detect_positive);
12672     }
12673 
12674     @OpFactoryHelper.OpDeclaration(IsNaN.NAME)
12675     public static final class IsNaN extends OnnxOp {
12676         public static final String NAME = "IsNaN";
12677 
12678         public enum Attribute implements OnnxAttribute.None { }
12679 
12680         public enum TypeConstraint implements OnnxTypeConstraint {
12681             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())))),
12682             T2(new OnnxType.TypeVariable("T2", List.of(OnnxType.tensor(OnnxType.bool())))),
12683             ;
12684 
12685             final OnnxType.TypeVariable typeVariable;
12686 
12687             TypeConstraint(OnnxType.TypeVariable typeVariable) {
12688                 assert typeVariable.name().equals(name());
12689                 this.typeVariable = typeVariable;
12690             }
12691 
12692             @Override
12693             public OnnxType.TypeVariable typeVariable() {
12694                 return typeVariable;
12695             }
12696         }
12697 
12698         public enum InputParameter implements OnnxParameter {
12699             X(TypeConstraint.T1.typeVariable(), Quantifier.REQUIRED),
12700             ;
12701 
12702             final OnnxType type;
12703             final Quantifier quantifier;
12704 
12705             InputParameter(OnnxType type, Quantifier quantifier) {
12706                 this.type = type;
12707                 this.quantifier = quantifier;
12708             }
12709 
12710             @Override
12711             public OnnxType type() {
12712                 return type;
12713             }
12714 
12715             @Override
12716             public Quantifier quantifier() {
12717                 return quantifier;
12718             }
12719         }
12720 
12721         public enum OutputParameter implements OnnxParameter {
12722             Y(TypeConstraint.T2.typeVariable(), Quantifier.REQUIRED),
12723             ;
12724 
12725             final OnnxType type;
12726             final Quantifier quantifier;
12727 
12728             OutputParameter(OnnxType type, Quantifier quantifier) {
12729                 this.type = type;
12730                 this.quantifier = quantifier;
12731             }
12732 
12733             @Override
12734             public OnnxType type() {
12735                 return type;
12736             }
12737 
12738             @Override
12739             public Quantifier quantifier() {
12740                 return quantifier;
12741             }
12742         }
12743 
12744         public static final OnnxSchema SCHEMA = new OnnxSchemaRecord(
12745                 NAME,
12746                 List.of(Attribute.values()),
12747                 List.of(TypeConstraint.values()),
12748                 List.of(InputParameter.values()),
12749                 List.of(OutputParameter.values())
12750         );
12751 
12752         public IsNaN(ExternalizedOp def) {
12753             super(SCHEMA, def);
12754         }
12755 
12756         IsNaN(IsNaN that, CopyContext cc) {
12757             super(that, cc);
12758         }
12759 
12760         @Override
12761         public IsNaN transform(CopyContext cc, OpTransformer ot) {
12762             return new IsNaN(this, cc);
12763         }
12764 
12765         IsNaN(TypeElement resultType, Value X) {
12766             super(SCHEMA, resultType, Set.of(), List.of(X), List.of());
12767         }
12768 
12769         @Override
12770         public SequencedSet<OnnxParameter> onnxOutputs() {
12771             return onnxOutputs(SCHEMA);
12772         }
12773 
12774         @Override
12775         public SequencedMap<OnnxParameter, Object> onnxInputs() {
12776             return onnxInputs(SCHEMA, List.of(X()));
12777         }
12778 
12779         public Value X() {
12780             return operands().get(0);
12781         }
12782 
12783     }
12784 
12785     public static IsNaN IsNaN(TypeElement resultType, Value X) {
12786         return new IsNaN(resultType, X);
12787     }
12788 
12789     @OpFactoryHelper.OpDeclaration(LRN.NAME)
12790     public static final class LRN extends OnnxOp {
12791         public static final String NAME = "LRN";
12792 
12793         public enum Attribute implements OnnxAttribute {
12794             size(Long.class, false, null),
12795             alpha(Float.class, true, 1.0E-4f),
12796             bias(Float.class, true, 1.0f),
12797             beta(Float.class, true, 0.75f),
12798             ;
12799 
12800                 final Class<?> t;
12801                 final boolean optional;
12802                 final Object defaultValue;
12803 
12804                 Attribute(Class<?> type, boolean optional, Object defaultValue) {
12805                     this.t = type;
12806                     this.optional = optional;
12807                     this.defaultValue = defaultValue;
12808                     assert optional || defaultValue == null;
12809                 }
12810 
12811                 public Class<?> type() {
12812                     return t;
12813                 }
12814 
12815                 public boolean isOptional() {
12816                     return optional;
12817                 }
12818 
12819                 public Object defaultValue() {
12820                     return defaultValue;
12821                 }
12822         }
12823 
12824         public enum TypeConstraint implements OnnxTypeConstraint {
12825             T(new OnnxType.TypeVariable("T", List.of(OnnxType.tensor(OnnxType.float16()), OnnxType.tensor(OnnxType.float32()), OnnxType.tensor(OnnxType.float64()), OnnxType.tensor(OnnxType.bfloat16())))),
12826             ;
12827 
12828             final OnnxType.TypeVariable typeVariable;
12829 
12830             TypeConstraint(OnnxType.TypeVariable typeVariable) {
12831                 assert typeVariable.name().equals(name());
12832                 this.typeVariable = typeVariable;
12833             }
12834 
12835             @Override
12836             public OnnxType.TypeVariable typeVariable() {
12837                 return typeVariable;
12838             }
12839         }
12840 
12841         public enum InputParameter implements OnnxParameter {
12842             X(TypeConstraint.T.typeVariable(), Quantifier.REQUIRED),
12843             ;
12844 
12845             final OnnxType type;
12846             final Quantifier quantifier;
12847 
12848             InputParameter(OnnxType type, Quantifier quantifier) {
12849                 this.type = type;
12850                 this.quantifier = quantifier;
12851             }
12852 
12853             @Override
12854             public OnnxType type() {
12855                 return type;
12856             }
12857 
12858             @Override
12859             public Quantifier quantifier() {
12860                 return quantifier;
12861             }
12862         }
12863 
12864         public enum OutputParameter implements OnnxParameter {
12865             Y(TypeConstraint.T.typeVariable(), Quantifier.REQUIRED),
12866             ;
12867 
12868             final OnnxType type;
12869             final Quantifier quantifier;
12870 
12871             OutputParameter(OnnxType type, Quantifier quantifier) {
12872                 this.type = type;
12873                 this.quantifier = quantifier;
12874             }
12875 
12876             @Override
12877             public OnnxType type() {
12878                 return type;
12879             }
12880 
12881             @Override
12882             public Quantifier quantifier() {
12883                 return quantifier;
12884             }
12885         }
12886 
12887         public static final OnnxSchema SCHEMA = new OnnxSchemaRecord(
12888                 NAME,
12889                 List.of(Attribute.values()),
12890                 List.of(TypeConstraint.values()),
12891                 List.of(InputParameter.values()),
12892                 List.of(OutputParameter.values())
12893         );
12894 
12895         public LRN(ExternalizedOp def) {
12896             super(SCHEMA, def);
12897         }
12898 
12899         LRN(LRN that, CopyContext cc) {
12900             super(that, cc);
12901         }
12902 
12903         @Override
12904         public LRN transform(CopyContext cc, OpTransformer ot) {
12905             return new LRN(this, cc);
12906         }
12907 
12908         LRN(TypeElement resultType, Value X, long size, java.util.Optional<Float> alpha, java.util.Optional<Float> bias, java.util.Optional<Float> beta) {
12909             super(SCHEMA, resultType, Set.of(), List.of(X), List.of(size, alpha, bias, beta));
12910         }
12911 
12912         @Override
12913         public SequencedSet<OnnxParameter> onnxOutputs() {
12914             return onnxOutputs(SCHEMA);
12915         }
12916 
12917         @Override
12918         public SequencedMap<OnnxParameter, Object> onnxInputs() {
12919             return onnxInputs(SCHEMA, List.of(X()));
12920         }
12921 
12922         public Value X() {
12923             return operands().get(0);
12924         }
12925 
12926         public long size() {
12927             long size = Attribute.size.access(Long.class, onnxAttributes);
12928             return size;
12929         }
12930 
12931         public java.util.Optional<Float> alpha() {
12932             Float alpha = Attribute.alpha.access(Float.class, onnxAttributes);
12933             return java.util.Optional.ofNullable(alpha);
12934         }
12935 
12936         public java.util.Optional<Float> bias() {
12937             Float bias = Attribute.bias.access(Float.class, onnxAttributes);
12938             return java.util.Optional.ofNullable(bias);
12939         }
12940 
12941         public java.util.Optional<Float> beta() {
12942             Float beta = Attribute.beta.access(Float.class, onnxAttributes);
12943             return java.util.Optional.ofNullable(beta);
12944         }
12945 
12946     }
12947 
12948     public static LRN LRN(TypeElement resultType, Value X, long size, java.util.Optional<Float> alpha, java.util.Optional<Float> bias, java.util.Optional<Float> beta) {
12949         return new LRN(resultType, X, size, alpha, bias, beta);
12950     }
12951 
12952     @OpFactoryHelper.OpDeclaration(LSTM.NAME)
12953     public static final class LSTM extends OnnxOp {
12954         public static final String NAME = "LSTM";
12955 
12956         public enum Attribute implements OnnxAttribute {
12957             layout(Long.class, true, 0),
12958             input_forget(Long.class, true, 0),
12959             activation_alpha(float[].class, true, null),
12960             hidden_size(Long.class, true, null),
12961             activation_beta(float[].class, true, null),
12962             activations(String[].class, true, null),
12963             clip(Float.class, true, null),
12964             direction(String.class, true, "forward"),
12965             ;
12966 
12967                 final Class<?> t;
12968                 final boolean optional;
12969                 final Object defaultValue;
12970 
12971                 Attribute(Class<?> type, boolean optional, Object defaultValue) {
12972                     this.t = type;
12973                     this.optional = optional;
12974                     this.defaultValue = defaultValue;
12975                     assert optional || defaultValue == null;
12976                 }
12977 
12978                 public Class<?> type() {
12979                     return t;
12980                 }
12981 
12982                 public boolean isOptional() {
12983                     return optional;
12984                 }
12985 
12986                 public Object defaultValue() {
12987                     return defaultValue;
12988                 }
12989         }
12990 
12991         public enum TypeConstraint implements OnnxTypeConstraint {
12992             T(new OnnxType.TypeVariable("T", List.of(OnnxType.tensor(OnnxType.bfloat16()), OnnxType.tensor(OnnxType.float16()), OnnxType.tensor(OnnxType.float32()), OnnxType.tensor(OnnxType.float64())))),
12993             T1(new OnnxType.TypeVariable("T1", List.of(OnnxType.tensor(OnnxType.int32())))),
12994             ;
12995 
12996             final OnnxType.TypeVariable typeVariable;
12997 
12998             TypeConstraint(OnnxType.TypeVariable typeVariable) {
12999                 assert typeVariable.name().equals(name());
13000                 this.typeVariable = typeVariable;
13001             }
13002 
13003             @Override
13004             public OnnxType.TypeVariable typeVariable() {
13005                 return typeVariable;
13006             }
13007         }
13008 
13009         public enum InputParameter implements OnnxParameter {
13010             X(TypeConstraint.T.typeVariable(), Quantifier.REQUIRED),
13011             W(TypeConstraint.T.typeVariable(), Quantifier.REQUIRED),
13012             R(TypeConstraint.T.typeVariable(), Quantifier.REQUIRED),
13013             B(TypeConstraint.T.typeVariable(), Quantifier.OPTIONAL),
13014             sequence_lens(TypeConstraint.T1.typeVariable(), Quantifier.OPTIONAL),
13015             initial_h(TypeConstraint.T.typeVariable(), Quantifier.OPTIONAL),
13016             initial_c(TypeConstraint.T.typeVariable(), Quantifier.OPTIONAL),
13017             P(TypeConstraint.T.typeVariable(), Quantifier.OPTIONAL),
13018             ;
13019 
13020             final OnnxType type;
13021             final Quantifier quantifier;
13022 
13023             InputParameter(OnnxType type, Quantifier quantifier) {
13024                 this.type = type;
13025                 this.quantifier = quantifier;
13026             }
13027 
13028             @Override
13029             public OnnxType type() {
13030                 return type;
13031             }
13032 
13033             @Override
13034             public Quantifier quantifier() {
13035                 return quantifier;
13036             }
13037         }
13038 
13039         public enum OutputParameter implements OnnxParameter {
13040             Y(TypeConstraint.T.typeVariable(), Quantifier.OPTIONAL),
13041             Y_h(TypeConstraint.T.typeVariable(), Quantifier.OPTIONAL),
13042             Y_c(TypeConstraint.T.typeVariable(), Quantifier.OPTIONAL),
13043             ;
13044 
13045             final OnnxType type;
13046             final Quantifier quantifier;
13047 
13048             OutputParameter(OnnxType type, Quantifier quantifier) {
13049                 this.type = type;
13050                 this.quantifier = quantifier;
13051             }
13052 
13053             @Override
13054             public OnnxType type() {
13055                 return type;
13056             }
13057 
13058             @Override
13059             public Quantifier quantifier() {
13060                 return quantifier;
13061             }
13062         }
13063 
13064         public static final OnnxSchema SCHEMA = new OnnxSchemaRecord(
13065                 NAME,
13066                 List.of(Attribute.values()),
13067                 List.of(TypeConstraint.values()),
13068                 List.of(InputParameter.values()),
13069                 List.of(OutputParameter.values())
13070         );
13071 
13072         public LSTM(ExternalizedOp def) {
13073             super(SCHEMA, def);
13074         }
13075 
13076         LSTM(LSTM that, CopyContext cc) {
13077             super(that, cc);
13078         }
13079 
13080         @Override
13081         public LSTM transform(CopyContext cc, OpTransformer ot) {
13082             return new LSTM(this, cc);
13083         }
13084 
13085         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<Long> layout, java.util.Optional<Long> input_forget, java.util.Optional<float[]> activation_alpha, java.util.Optional<Long> hidden_size, java.util.Optional<float[]> activation_beta, java.util.Optional<String[]> activations, java.util.Optional<Float> clip, java.util.Optional<String> direction) {
13086             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));
13087         }
13088 
13089         @Override
13090         public SequencedSet<OnnxParameter> onnxOutputs() {
13091             return onnxOutputs(SCHEMA);
13092         }
13093 
13094         @Override
13095         public SequencedMap<OnnxParameter, Object> onnxInputs() {
13096             return onnxInputs(SCHEMA, List.of(X(), W(), R(), B(), sequence_lens(), initial_h(), initial_c(), P()));
13097         }
13098 
13099         public Value X() {
13100             return operands().get(0);
13101         }
13102 
13103         public Value W() {
13104             return operands().get(1);
13105         }
13106 
13107         public Value R() {
13108             return operands().get(2);
13109         }
13110 
13111         public java.util.Optional<Value> B() {
13112             int i = optionalInputArguments.indexOf(InputParameter.B);
13113             return i != -1 ? java.util.Optional.of(operands().get(3 + i)) : java.util.Optional.empty();
13114         }
13115 
13116         public java.util.Optional<Value> sequence_lens() {
13117             int i = optionalInputArguments.indexOf(InputParameter.sequence_lens);
13118             return i != -1 ? java.util.Optional.of(operands().get(3 + i)) : java.util.Optional.empty();
13119         }
13120 
13121         public java.util.Optional<Value> initial_h() {
13122             int i = optionalInputArguments.indexOf(InputParameter.initial_h);
13123             return i != -1 ? java.util.Optional.of(operands().get(3 + i)) : java.util.Optional.empty();
13124         }
13125 
13126         public java.util.Optional<Value> initial_c() {
13127             int i = optionalInputArguments.indexOf(InputParameter.initial_c);
13128             return i != -1 ? java.util.Optional.of(operands().get(3 + i)) : java.util.Optional.empty();
13129         }
13130 
13131         public java.util.Optional<Value> P() {
13132             int i = optionalInputArguments.indexOf(InputParameter.P);
13133             return i != -1 ? java.util.Optional.of(operands().get(3 + i)) : java.util.Optional.empty();
13134         }
13135 
13136         public java.util.Optional<Long> layout() {
13137             Long layout = Attribute.layout.access(Long.class, onnxAttributes);
13138             return java.util.Optional.ofNullable(layout);
13139         }
13140 
13141         public java.util.Optional<Long> input_forget() {
13142             Long input_forget = Attribute.input_forget.access(Long.class, onnxAttributes);
13143             return java.util.Optional.ofNullable(input_forget);
13144         }
13145 
13146         public java.util.Optional<float[]> activation_alpha() {
13147             float[] activation_alpha = Attribute.activation_alpha.access(float[].class, onnxAttributes);
13148             return java.util.Optional.ofNullable(activation_alpha).map(float[]::clone);
13149         }
13150 
13151         public java.util.Optional<Long> hidden_size() {
13152             Long hidden_size = Attribute.hidden_size.access(Long.class, onnxAttributes);
13153             return java.util.Optional.ofNullable(hidden_size);
13154         }
13155 
13156         public java.util.Optional<float[]> activation_beta() {
13157             float[] activation_beta = Attribute.activation_beta.access(float[].class, onnxAttributes);
13158             return java.util.Optional.ofNullable(activation_beta).map(float[]::clone);
13159         }
13160 
13161         public java.util.Optional<String[]> activations() {
13162             String[] activations = Attribute.activations.access(String[].class, onnxAttributes);
13163             return java.util.Optional.ofNullable(activations).map(String[]::clone);
13164         }
13165 
13166         public java.util.Optional<Float> clip() {
13167             Float clip = Attribute.clip.access(Float.class, onnxAttributes);
13168             return java.util.Optional.ofNullable(clip);
13169         }
13170 
13171         public java.util.Optional<String> direction() {
13172             String direction = Attribute.direction.access(String.class, onnxAttributes);
13173             return java.util.Optional.ofNullable(direction);
13174         }
13175 
13176     }
13177 
13178     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<Long> layout, java.util.Optional<Long> input_forget, java.util.Optional<float[]> activation_alpha, java.util.Optional<Long> hidden_size, java.util.Optional<float[]> activation_beta, java.util.Optional<String[]> activations, java.util.Optional<Float> clip, java.util.Optional<String> direction) {
13179         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);
13180     }
13181 
13182     @OpFactoryHelper.OpDeclaration(LabelEncoder.NAME)
13183     public static final class LabelEncoder extends OnnxOp {
13184         public static final String NAME = "LabelEncoder";
13185 
13186         public enum Attribute implements OnnxAttribute {
13187             values_strings(String[].class, true, null),
13188             keys_int64s(long[].class, true, null),
13189             keys_tensor(Tensor.class, true, null),
13190             keys_strings(String[].class, true, null),
13191             default_float(Float.class, true, -0.0f),
13192             keys_floats(float[].class, true, null),
13193             default_tensor(Tensor.class, true, null),
13194             default_int64(Long.class, true, -1),
13195             values_tensor(Tensor.class, true, null),
13196             values_int64s(long[].class, true, null),
13197             default_string(String.class, true, "_Unused"),
13198             values_floats(float[].class, true, null),
13199             ;
13200 
13201                 final Class<?> t;
13202                 final boolean optional;
13203                 final Object defaultValue;
13204 
13205                 Attribute(Class<?> type, boolean optional, Object defaultValue) {
13206                     this.t = type;
13207                     this.optional = optional;
13208                     this.defaultValue = defaultValue;
13209                     assert optional || defaultValue == null;
13210                 }
13211 
13212                 public Class<?> type() {
13213                     return t;
13214                 }
13215 
13216                 public boolean isOptional() {
13217                     return optional;
13218                 }
13219 
13220                 public Object defaultValue() {
13221                     return defaultValue;
13222                 }
13223         }
13224 
13225         public enum TypeConstraint implements OnnxTypeConstraint {
13226             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())))),
13227             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())))),
13228             ;
13229 
13230             final OnnxType.TypeVariable typeVariable;
13231 
13232             TypeConstraint(OnnxType.TypeVariable typeVariable) {
13233                 assert typeVariable.name().equals(name());
13234                 this.typeVariable = typeVariable;
13235             }
13236 
13237             @Override
13238             public OnnxType.TypeVariable typeVariable() {
13239                 return typeVariable;
13240             }
13241         }
13242 
13243         public enum InputParameter implements OnnxParameter {
13244             X(TypeConstraint.T1.typeVariable(), Quantifier.REQUIRED),
13245             ;
13246 
13247             final OnnxType type;
13248             final Quantifier quantifier;
13249 
13250             InputParameter(OnnxType type, Quantifier quantifier) {
13251                 this.type = type;
13252                 this.quantifier = quantifier;
13253             }
13254 
13255             @Override
13256             public OnnxType type() {
13257                 return type;
13258             }
13259 
13260             @Override
13261             public Quantifier quantifier() {
13262                 return quantifier;
13263             }
13264         }
13265 
13266         public enum OutputParameter implements OnnxParameter {
13267             Y(TypeConstraint.T2.typeVariable(), Quantifier.REQUIRED),
13268             ;
13269 
13270             final OnnxType type;
13271             final Quantifier quantifier;
13272 
13273             OutputParameter(OnnxType type, Quantifier quantifier) {
13274                 this.type = type;
13275                 this.quantifier = quantifier;
13276             }
13277 
13278             @Override
13279             public OnnxType type() {
13280                 return type;
13281             }
13282 
13283             @Override
13284             public Quantifier quantifier() {
13285                 return quantifier;
13286             }
13287         }
13288 
13289         public static final OnnxSchema SCHEMA = new OnnxSchemaRecord(
13290                 NAME,
13291                 List.of(Attribute.values()),
13292                 List.of(TypeConstraint.values()),
13293                 List.of(InputParameter.values()),
13294                 List.of(OutputParameter.values())
13295         );
13296 
13297         public LabelEncoder(ExternalizedOp def) {
13298             super(SCHEMA, def);
13299         }
13300 
13301         LabelEncoder(LabelEncoder that, CopyContext cc) {
13302             super(that, cc);
13303         }
13304 
13305         @Override
13306         public LabelEncoder transform(CopyContext cc, OpTransformer ot) {
13307             return new LabelEncoder(this, cc);
13308         }
13309 
13310         LabelEncoder(TypeElement resultType, Value X, java.util.Optional<String[]> values_strings, java.util.Optional<long[]> keys_int64s, java.util.Optional<Tensor> keys_tensor, java.util.Optional<String[]> keys_strings, java.util.Optional<Float> default_float, java.util.Optional<float[]> keys_floats, java.util.Optional<Tensor> default_tensor, java.util.Optional<Long> default_int64, java.util.Optional<Tensor> values_tensor, java.util.Optional<long[]> values_int64s, java.util.Optional<String> default_string, java.util.Optional<float[]> values_floats) {
13311             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));
13312         }
13313 
13314         @Override
13315         public SequencedSet<OnnxParameter> onnxOutputs() {
13316             return onnxOutputs(SCHEMA);
13317         }
13318 
13319         @Override
13320         public SequencedMap<OnnxParameter, Object> onnxInputs() {
13321             return onnxInputs(SCHEMA, List.of(X()));
13322         }
13323 
13324         public Value X() {
13325             return operands().get(0);
13326         }
13327 
13328         public java.util.Optional<String[]> values_strings() {
13329             String[] values_strings = Attribute.values_strings.access(String[].class, onnxAttributes);
13330             return java.util.Optional.ofNullable(values_strings).map(String[]::clone);
13331         }
13332 
13333         public java.util.Optional<long[]> keys_int64s() {
13334             long[] keys_int64s = Attribute.keys_int64s.access(long[].class, onnxAttributes);
13335             return java.util.Optional.ofNullable(keys_int64s).map(long[]::clone);
13336         }
13337 
13338         public java.util.Optional<Tensor> keys_tensor() {
13339             Tensor keys_tensor = Attribute.keys_tensor.access(Tensor.class, onnxAttributes);
13340             return java.util.Optional.ofNullable(keys_tensor);
13341         }
13342 
13343         public java.util.Optional<String[]> keys_strings() {
13344             String[] keys_strings = Attribute.keys_strings.access(String[].class, onnxAttributes);
13345             return java.util.Optional.ofNullable(keys_strings).map(String[]::clone);
13346         }
13347 
13348         public java.util.Optional<Float> default_float() {
13349             Float default_float = Attribute.default_float.access(Float.class, onnxAttributes);
13350             return java.util.Optional.ofNullable(default_float);
13351         }
13352 
13353         public java.util.Optional<float[]> keys_floats() {
13354             float[] keys_floats = Attribute.keys_floats.access(float[].class, onnxAttributes);
13355             return java.util.Optional.ofNullable(keys_floats).map(float[]::clone);
13356         }
13357 
13358         public java.util.Optional<Tensor> default_tensor() {
13359             Tensor default_tensor = Attribute.default_tensor.access(Tensor.class, onnxAttributes);
13360             return java.util.Optional.ofNullable(default_tensor);
13361         }
13362 
13363         public java.util.Optional<Long> default_int64() {
13364             Long default_int64 = Attribute.default_int64.access(Long.class, onnxAttributes);
13365             return java.util.Optional.ofNullable(default_int64);
13366         }
13367 
13368         public java.util.Optional<Tensor> values_tensor() {
13369             Tensor values_tensor = Attribute.values_tensor.access(Tensor.class, onnxAttributes);
13370             return java.util.Optional.ofNullable(values_tensor);
13371         }
13372 
13373         public java.util.Optional<long[]> values_int64s() {
13374             long[] values_int64s = Attribute.values_int64s.access(long[].class, onnxAttributes);
13375             return java.util.Optional.ofNullable(values_int64s).map(long[]::clone);
13376         }
13377 
13378         public java.util.Optional<String> default_string() {
13379             String default_string = Attribute.default_string.access(String.class, onnxAttributes);
13380             return java.util.Optional.ofNullable(default_string);
13381         }
13382 
13383         public java.util.Optional<float[]> values_floats() {
13384             float[] values_floats = Attribute.values_floats.access(float[].class, onnxAttributes);
13385             return java.util.Optional.ofNullable(values_floats).map(float[]::clone);
13386         }
13387 
13388     }
13389 
13390     public static LabelEncoder LabelEncoder(TypeElement resultType, Value X, java.util.Optional<String[]> values_strings, java.util.Optional<long[]> keys_int64s, java.util.Optional<Tensor> keys_tensor, java.util.Optional<String[]> keys_strings, java.util.Optional<Float> default_float, java.util.Optional<float[]> keys_floats, java.util.Optional<Tensor> default_tensor, java.util.Optional<Long> default_int64, java.util.Optional<Tensor> values_tensor, java.util.Optional<long[]> values_int64s, java.util.Optional<String> default_string, java.util.Optional<float[]> values_floats) {
13391         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);
13392     }
13393 
13394     @OpFactoryHelper.OpDeclaration(LayerNormalization.NAME)
13395     public static final class LayerNormalization extends OnnxOp {
13396         public static final String NAME = "LayerNormalization";
13397 
13398         public enum Attribute implements OnnxAttribute {
13399             epsilon(Float.class, true, 1.0E-5f),
13400             stash_type(Long.class, true, 1),
13401             axis(Long.class, true, -1),
13402             ;
13403 
13404                 final Class<?> t;
13405                 final boolean optional;
13406                 final Object defaultValue;
13407 
13408                 Attribute(Class<?> type, boolean optional, Object defaultValue) {
13409                     this.t = type;
13410                     this.optional = optional;
13411                     this.defaultValue = defaultValue;
13412                     assert optional || defaultValue == null;
13413                 }
13414 
13415                 public Class<?> type() {
13416                     return t;
13417                 }
13418 
13419                 public boolean isOptional() {
13420                     return optional;
13421                 }
13422 
13423                 public Object defaultValue() {
13424                     return defaultValue;
13425                 }
13426         }
13427 
13428         public enum TypeConstraint implements OnnxTypeConstraint {
13429             T(new OnnxType.TypeVariable("T", List.of(OnnxType.tensor(OnnxType.float16()), OnnxType.tensor(OnnxType.float32()), OnnxType.tensor(OnnxType.float64()), OnnxType.tensor(OnnxType.bfloat16())))),
13430             U(new OnnxType.TypeVariable("U", List.of(OnnxType.tensor(OnnxType.float32()), OnnxType.tensor(OnnxType.bfloat16())))),
13431             ;
13432 
13433             final OnnxType.TypeVariable typeVariable;
13434 
13435             TypeConstraint(OnnxType.TypeVariable typeVariable) {
13436                 assert typeVariable.name().equals(name());
13437                 this.typeVariable = typeVariable;
13438             }
13439 
13440             @Override
13441             public OnnxType.TypeVariable typeVariable() {
13442                 return typeVariable;
13443             }
13444         }
13445 
13446         public enum InputParameter implements OnnxParameter {
13447             X(TypeConstraint.T.typeVariable(), Quantifier.REQUIRED),
13448             Scale(TypeConstraint.T.typeVariable(), Quantifier.REQUIRED),
13449             B(TypeConstraint.T.typeVariable(), Quantifier.OPTIONAL),
13450             ;
13451 
13452             final OnnxType type;
13453             final Quantifier quantifier;
13454 
13455             InputParameter(OnnxType type, Quantifier quantifier) {
13456                 this.type = type;
13457                 this.quantifier = quantifier;
13458             }
13459 
13460             @Override
13461             public OnnxType type() {
13462                 return type;
13463             }
13464 
13465             @Override
13466             public Quantifier quantifier() {
13467                 return quantifier;
13468             }
13469         }
13470 
13471         public enum OutputParameter implements OnnxParameter {
13472             Y(TypeConstraint.T.typeVariable(), Quantifier.REQUIRED),
13473             Mean(TypeConstraint.U.typeVariable(), Quantifier.OPTIONAL),
13474             InvStdDev(TypeConstraint.U.typeVariable(), Quantifier.OPTIONAL),
13475             ;
13476 
13477             final OnnxType type;
13478             final Quantifier quantifier;
13479 
13480             OutputParameter(OnnxType type, Quantifier quantifier) {
13481                 this.type = type;
13482                 this.quantifier = quantifier;
13483             }
13484 
13485             @Override
13486             public OnnxType type() {
13487                 return type;
13488             }
13489 
13490             @Override
13491             public Quantifier quantifier() {
13492                 return quantifier;
13493             }
13494         }
13495 
13496         public static final OnnxSchema SCHEMA = new OnnxSchemaRecord(
13497                 NAME,
13498                 List.of(Attribute.values()),
13499                 List.of(TypeConstraint.values()),
13500                 List.of(InputParameter.values()),
13501                 List.of(OutputParameter.values())
13502         );
13503 
13504         public LayerNormalization(ExternalizedOp def) {
13505             super(SCHEMA, def);
13506         }
13507 
13508         LayerNormalization(LayerNormalization that, CopyContext cc) {
13509             super(that, cc);
13510         }
13511 
13512         @Override
13513         public LayerNormalization transform(CopyContext cc, OpTransformer ot) {
13514             return new LayerNormalization(this, cc);
13515         }
13516 
13517         LayerNormalization(TypeElement resultType, Set<OutputParameter> optionalOutputs, Value X, Value Scale, java.util.Optional<Value> B, java.util.Optional<Float> epsilon, java.util.Optional<Long> stash_type, java.util.Optional<Long> axis) {
13518             super(SCHEMA, resultType, optionalOutputs, List.of(X, Scale, B), List.of(epsilon, stash_type, axis));
13519         }
13520 
13521         @Override
13522         public SequencedSet<OnnxParameter> onnxOutputs() {
13523             return onnxOutputs(SCHEMA);
13524         }
13525 
13526         @Override
13527         public SequencedMap<OnnxParameter, Object> onnxInputs() {
13528             return onnxInputs(SCHEMA, List.of(X(), Scale(), B()));
13529         }
13530 
13531         public Value X() {
13532             return operands().get(0);
13533         }
13534 
13535         public Value Scale() {
13536             return operands().get(1);
13537         }
13538 
13539         public java.util.Optional<Value> B() {
13540             int i = optionalInputArguments.indexOf(InputParameter.B);
13541             return i != -1 ? java.util.Optional.of(operands().get(2 + i)) : java.util.Optional.empty();
13542         }
13543 
13544         public java.util.Optional<Float> epsilon() {
13545             Float epsilon = Attribute.epsilon.access(Float.class, onnxAttributes);
13546             return java.util.Optional.ofNullable(epsilon);
13547         }
13548 
13549         public java.util.Optional<Long> stash_type() {
13550             Long stash_type = Attribute.stash_type.access(Long.class, onnxAttributes);
13551             return java.util.Optional.ofNullable(stash_type);
13552         }
13553 
13554         public java.util.Optional<Long> axis() {
13555             Long axis = Attribute.axis.access(Long.class, onnxAttributes);
13556             return java.util.Optional.ofNullable(axis);
13557         }
13558 
13559     }
13560 
13561     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<Long> stash_type, java.util.Optional<Long> axis) {
13562         return new LayerNormalization(resultType, optionalOutputs, X, Scale, B, epsilon, stash_type, axis);
13563     }
13564 
13565     @OpFactoryHelper.OpDeclaration(LeakyRelu.NAME)
13566     public static final class LeakyRelu extends OnnxOp {
13567         public static final String NAME = "LeakyRelu";
13568 
13569         public enum Attribute implements OnnxAttribute {
13570             alpha(Float.class, true, 0.01f),
13571             ;
13572 
13573                 final Class<?> t;
13574                 final boolean optional;
13575                 final Object defaultValue;
13576 
13577                 Attribute(Class<?> type, boolean optional, Object defaultValue) {
13578                     this.t = type;
13579                     this.optional = optional;
13580                     this.defaultValue = defaultValue;
13581                     assert optional || defaultValue == null;
13582                 }
13583 
13584                 public Class<?> type() {
13585                     return t;
13586                 }
13587 
13588                 public boolean isOptional() {
13589                     return optional;
13590                 }
13591 
13592                 public Object defaultValue() {
13593                     return defaultValue;
13594                 }
13595         }
13596 
13597         public enum TypeConstraint implements OnnxTypeConstraint {
13598             T(new OnnxType.TypeVariable("T", List.of(OnnxType.tensor(OnnxType.bfloat16()), OnnxType.tensor(OnnxType.float16()), OnnxType.tensor(OnnxType.float32()), OnnxType.tensor(OnnxType.float64())))),
13599             ;
13600 
13601             final OnnxType.TypeVariable typeVariable;
13602 
13603             TypeConstraint(OnnxType.TypeVariable typeVariable) {
13604                 assert typeVariable.name().equals(name());
13605                 this.typeVariable = typeVariable;
13606             }
13607 
13608             @Override
13609             public OnnxType.TypeVariable typeVariable() {
13610                 return typeVariable;
13611             }
13612         }
13613 
13614         public enum InputParameter implements OnnxParameter {
13615             X(TypeConstraint.T.typeVariable(), Quantifier.REQUIRED),
13616             ;
13617 
13618             final OnnxType type;
13619             final Quantifier quantifier;
13620 
13621             InputParameter(OnnxType type, Quantifier quantifier) {
13622                 this.type = type;
13623                 this.quantifier = quantifier;
13624             }
13625 
13626             @Override
13627             public OnnxType type() {
13628                 return type;
13629             }
13630 
13631             @Override
13632             public Quantifier quantifier() {
13633                 return quantifier;
13634             }
13635         }
13636 
13637         public enum OutputParameter implements OnnxParameter {
13638             Y(TypeConstraint.T.typeVariable(), Quantifier.REQUIRED),
13639             ;
13640 
13641             final OnnxType type;
13642             final Quantifier quantifier;
13643 
13644             OutputParameter(OnnxType type, Quantifier quantifier) {
13645                 this.type = type;
13646                 this.quantifier = quantifier;
13647             }
13648 
13649             @Override
13650             public OnnxType type() {
13651                 return type;
13652             }
13653 
13654             @Override
13655             public Quantifier quantifier() {
13656                 return quantifier;
13657             }
13658         }
13659 
13660         public static final OnnxSchema SCHEMA = new OnnxSchemaRecord(
13661                 NAME,
13662                 List.of(Attribute.values()),
13663                 List.of(TypeConstraint.values()),
13664                 List.of(InputParameter.values()),
13665                 List.of(OutputParameter.values())
13666         );
13667 
13668         public LeakyRelu(ExternalizedOp def) {
13669             super(SCHEMA, def);
13670         }
13671 
13672         LeakyRelu(LeakyRelu that, CopyContext cc) {
13673             super(that, cc);
13674         }
13675 
13676         @Override
13677         public LeakyRelu transform(CopyContext cc, OpTransformer ot) {
13678             return new LeakyRelu(this, cc);
13679         }
13680 
13681         LeakyRelu(TypeElement resultType, Value X, java.util.Optional<Float> alpha) {
13682             super(SCHEMA, resultType, Set.of(), List.of(X), List.of(alpha));
13683         }
13684 
13685         @Override
13686         public SequencedSet<OnnxParameter> onnxOutputs() {
13687             return onnxOutputs(SCHEMA);
13688         }
13689 
13690         @Override
13691         public SequencedMap<OnnxParameter, Object> onnxInputs() {
13692             return onnxInputs(SCHEMA, List.of(X()));
13693         }
13694 
13695         public Value X() {
13696             return operands().get(0);
13697         }
13698 
13699         public java.util.Optional<Float> alpha() {
13700             Float alpha = Attribute.alpha.access(Float.class, onnxAttributes);
13701             return java.util.Optional.ofNullable(alpha);
13702         }
13703 
13704     }
13705 
13706     public static LeakyRelu LeakyRelu(TypeElement resultType, Value X, java.util.Optional<Float> alpha) {
13707         return new LeakyRelu(resultType, X, alpha);
13708     }
13709 
13710     @OpFactoryHelper.OpDeclaration(Less.NAME)
13711     public static final class Less extends OnnxOp {
13712         public static final String NAME = "Less";
13713 
13714         public enum Attribute implements OnnxAttribute.None { }
13715 
13716         public enum TypeConstraint implements OnnxTypeConstraint {
13717             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())))),
13718             T1(new OnnxType.TypeVariable("T1", List.of(OnnxType.tensor(OnnxType.bool())))),
13719             ;
13720 
13721             final OnnxType.TypeVariable typeVariable;
13722 
13723             TypeConstraint(OnnxType.TypeVariable typeVariable) {
13724                 assert typeVariable.name().equals(name());
13725                 this.typeVariable = typeVariable;
13726             }
13727 
13728             @Override
13729             public OnnxType.TypeVariable typeVariable() {
13730                 return typeVariable;
13731             }
13732         }
13733 
13734         public enum InputParameter implements OnnxParameter {
13735             A(TypeConstraint.T.typeVariable(), Quantifier.REQUIRED),
13736             B(TypeConstraint.T.typeVariable(), Quantifier.REQUIRED),
13737             ;
13738 
13739             final OnnxType type;
13740             final Quantifier quantifier;
13741 
13742             InputParameter(OnnxType type, Quantifier quantifier) {
13743                 this.type = type;
13744                 this.quantifier = quantifier;
13745             }
13746 
13747             @Override
13748             public OnnxType type() {
13749                 return type;
13750             }
13751 
13752             @Override
13753             public Quantifier quantifier() {
13754                 return quantifier;
13755             }
13756         }
13757 
13758         public enum OutputParameter implements OnnxParameter {
13759             C(TypeConstraint.T1.typeVariable(), Quantifier.REQUIRED),
13760             ;
13761 
13762             final OnnxType type;
13763             final Quantifier quantifier;
13764 
13765             OutputParameter(OnnxType type, Quantifier quantifier) {
13766                 this.type = type;
13767                 this.quantifier = quantifier;
13768             }
13769 
13770             @Override
13771             public OnnxType type() {
13772                 return type;
13773             }
13774 
13775             @Override
13776             public Quantifier quantifier() {
13777                 return quantifier;
13778             }
13779         }
13780 
13781         public static final OnnxSchema SCHEMA = new OnnxSchemaRecord(
13782                 NAME,
13783                 List.of(Attribute.values()),
13784                 List.of(TypeConstraint.values()),
13785                 List.of(InputParameter.values()),
13786                 List.of(OutputParameter.values())
13787         );
13788 
13789         public Less(ExternalizedOp def) {
13790             super(SCHEMA, def);
13791         }
13792 
13793         Less(Less that, CopyContext cc) {
13794             super(that, cc);
13795         }
13796 
13797         @Override
13798         public Less transform(CopyContext cc, OpTransformer ot) {
13799             return new Less(this, cc);
13800         }
13801 
13802         Less(TypeElement resultType, Value A, Value B) {
13803             super(SCHEMA, resultType, Set.of(), List.of(A, B), List.of());
13804         }
13805 
13806         @Override
13807         public SequencedSet<OnnxParameter> onnxOutputs() {
13808             return onnxOutputs(SCHEMA);
13809         }
13810 
13811         @Override
13812         public SequencedMap<OnnxParameter, Object> onnxInputs() {
13813             return onnxInputs(SCHEMA, List.of(A(), B()));
13814         }
13815 
13816         public Value A() {
13817             return operands().get(0);
13818         }
13819 
13820         public Value B() {
13821             return operands().get(1);
13822         }
13823 
13824     }
13825 
13826     public static Less Less(TypeElement resultType, Value A, Value B) {
13827         return new Less(resultType, A, B);
13828     }
13829 
13830     @OpFactoryHelper.OpDeclaration(LessOrEqual.NAME)
13831     public static final class LessOrEqual extends OnnxOp {
13832         public static final String NAME = "LessOrEqual";
13833 
13834         public enum Attribute implements OnnxAttribute.None { }
13835 
13836         public enum TypeConstraint implements OnnxTypeConstraint {
13837             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())))),
13838             T1(new OnnxType.TypeVariable("T1", List.of(OnnxType.tensor(OnnxType.bool())))),
13839             ;
13840 
13841             final OnnxType.TypeVariable typeVariable;
13842 
13843             TypeConstraint(OnnxType.TypeVariable typeVariable) {
13844                 assert typeVariable.name().equals(name());
13845                 this.typeVariable = typeVariable;
13846             }
13847 
13848             @Override
13849             public OnnxType.TypeVariable typeVariable() {
13850                 return typeVariable;
13851             }
13852         }
13853 
13854         public enum InputParameter implements OnnxParameter {
13855             A(TypeConstraint.T.typeVariable(), Quantifier.REQUIRED),
13856             B(TypeConstraint.T.typeVariable(), Quantifier.REQUIRED),
13857             ;
13858 
13859             final OnnxType type;
13860             final Quantifier quantifier;
13861 
13862             InputParameter(OnnxType type, Quantifier quantifier) {
13863                 this.type = type;
13864                 this.quantifier = quantifier;
13865             }
13866 
13867             @Override
13868             public OnnxType type() {
13869                 return type;
13870             }
13871 
13872             @Override
13873             public Quantifier quantifier() {
13874                 return quantifier;
13875             }
13876         }
13877 
13878         public enum OutputParameter implements OnnxParameter {
13879             C(TypeConstraint.T1.typeVariable(), Quantifier.REQUIRED),
13880             ;
13881 
13882             final OnnxType type;
13883             final Quantifier quantifier;
13884 
13885             OutputParameter(OnnxType type, Quantifier quantifier) {
13886                 this.type = type;
13887                 this.quantifier = quantifier;
13888             }
13889 
13890             @Override
13891             public OnnxType type() {
13892                 return type;
13893             }
13894 
13895             @Override
13896             public Quantifier quantifier() {
13897                 return quantifier;
13898             }
13899         }
13900 
13901         public static final OnnxSchema SCHEMA = new OnnxSchemaRecord(
13902                 NAME,
13903                 List.of(Attribute.values()),
13904                 List.of(TypeConstraint.values()),
13905                 List.of(InputParameter.values()),
13906                 List.of(OutputParameter.values())
13907         );
13908 
13909         public LessOrEqual(ExternalizedOp def) {
13910             super(SCHEMA, def);
13911         }
13912 
13913         LessOrEqual(LessOrEqual that, CopyContext cc) {
13914             super(that, cc);
13915         }
13916 
13917         @Override
13918         public LessOrEqual transform(CopyContext cc, OpTransformer ot) {
13919             return new LessOrEqual(this, cc);
13920         }
13921 
13922         LessOrEqual(TypeElement resultType, Value A, Value B) {
13923             super(SCHEMA, resultType, Set.of(), List.of(A, B), List.of());
13924         }
13925 
13926         @Override
13927         public SequencedSet<OnnxParameter> onnxOutputs() {
13928             return onnxOutputs(SCHEMA);
13929         }
13930 
13931         @Override
13932         public SequencedMap<OnnxParameter, Object> onnxInputs() {
13933             return onnxInputs(SCHEMA, List.of(A(), B()));
13934         }
13935 
13936         public Value A() {
13937             return operands().get(0);
13938         }
13939 
13940         public Value B() {
13941             return operands().get(1);
13942         }
13943 
13944     }
13945 
13946     public static LessOrEqual LessOrEqual(TypeElement resultType, Value A, Value B) {
13947         return new LessOrEqual(resultType, A, B);
13948     }
13949 
13950     @OpFactoryHelper.OpDeclaration(LinearClassifier.NAME)
13951     public static final class LinearClassifier extends OnnxOp {
13952         public static final String NAME = "LinearClassifier";
13953 
13954         public enum Attribute implements OnnxAttribute {
13955             classlabels_ints(long[].class, true, null),
13956             post_transform(String.class, true, "NONE"),
13957             coefficients(float[].class, false, null),
13958             multi_class(Long.class, true, 0),
13959             intercepts(float[].class, true, null),
13960             classlabels_strings(String[].class, true, null),
13961             ;
13962 
13963                 final Class<?> t;
13964                 final boolean optional;
13965                 final Object defaultValue;
13966 
13967                 Attribute(Class<?> type, boolean optional, Object defaultValue) {
13968                     this.t = type;
13969                     this.optional = optional;
13970                     this.defaultValue = defaultValue;
13971                     assert optional || defaultValue == null;
13972                 }
13973 
13974                 public Class<?> type() {
13975                     return t;
13976                 }
13977 
13978                 public boolean isOptional() {
13979                     return optional;
13980                 }
13981 
13982                 public Object defaultValue() {
13983                     return defaultValue;
13984                 }
13985         }
13986 
13987         public enum TypeConstraint implements OnnxTypeConstraint {
13988             T1(new OnnxType.TypeVariable("T1", List.of(OnnxType.tensor(OnnxType.float32()), OnnxType.tensor(OnnxType.float64()), OnnxType.tensor(OnnxType.int64()), OnnxType.tensor(OnnxType.int32())))),
13989             T2(new OnnxType.TypeVariable("T2", List.of(OnnxType.tensor(OnnxType.string()), OnnxType.tensor(OnnxType.int64())))),
13990             ;
13991 
13992             final OnnxType.TypeVariable typeVariable;
13993 
13994             TypeConstraint(OnnxType.TypeVariable typeVariable) {
13995                 assert typeVariable.name().equals(name());
13996                 this.typeVariable = typeVariable;
13997             }
13998 
13999             @Override
14000             public OnnxType.TypeVariable typeVariable() {
14001                 return typeVariable;
14002             }
14003         }
14004 
14005         public enum InputParameter implements OnnxParameter {
14006             X(TypeConstraint.T1.typeVariable(), Quantifier.REQUIRED),
14007             ;
14008 
14009             final OnnxType type;
14010             final Quantifier quantifier;
14011 
14012             InputParameter(OnnxType type, Quantifier quantifier) {
14013                 this.type = type;
14014                 this.quantifier = quantifier;
14015             }
14016 
14017             @Override
14018             public OnnxType type() {
14019                 return type;
14020             }
14021 
14022             @Override
14023             public Quantifier quantifier() {
14024                 return quantifier;
14025             }
14026         }
14027 
14028         public enum OutputParameter implements OnnxParameter {
14029             Y(TypeConstraint.T2.typeVariable(), Quantifier.REQUIRED),
14030             Z(OnnxType.tensor(OnnxType.float32()), Quantifier.REQUIRED),
14031             ;
14032 
14033             final OnnxType type;
14034             final Quantifier quantifier;
14035 
14036             OutputParameter(OnnxType type, Quantifier quantifier) {
14037                 this.type = type;
14038                 this.quantifier = quantifier;
14039             }
14040 
14041             @Override
14042             public OnnxType type() {
14043                 return type;
14044             }
14045 
14046             @Override
14047             public Quantifier quantifier() {
14048                 return quantifier;
14049             }
14050         }
14051 
14052         public static final OnnxSchema SCHEMA = new OnnxSchemaRecord(
14053                 NAME,
14054                 List.of(Attribute.values()),
14055                 List.of(TypeConstraint.values()),
14056                 List.of(InputParameter.values()),
14057                 List.of(OutputParameter.values())
14058         );
14059 
14060         public LinearClassifier(ExternalizedOp def) {
14061             super(SCHEMA, def);
14062         }
14063 
14064         LinearClassifier(LinearClassifier that, CopyContext cc) {
14065             super(that, cc);
14066         }
14067 
14068         @Override
14069         public LinearClassifier transform(CopyContext cc, OpTransformer ot) {
14070             return new LinearClassifier(this, cc);
14071         }
14072 
14073         LinearClassifier(TypeElement resultType, Value X, java.util.Optional<long[]> classlabels_ints, java.util.Optional<String> post_transform, float[] coefficients, java.util.Optional<Long> multi_class, java.util.Optional<float[]> intercepts, java.util.Optional<String[]> classlabels_strings) {
14074             super(SCHEMA, resultType, Set.of(), List.of(X), List.of(classlabels_ints, post_transform, coefficients, multi_class, intercepts, classlabels_strings));
14075         }
14076 
14077         @Override
14078         public SequencedSet<OnnxParameter> onnxOutputs() {
14079             return onnxOutputs(SCHEMA);
14080         }
14081 
14082         @Override
14083         public SequencedMap<OnnxParameter, Object> onnxInputs() {
14084             return onnxInputs(SCHEMA, List.of(X()));
14085         }
14086 
14087         public Value X() {
14088             return operands().get(0);
14089         }
14090 
14091         public java.util.Optional<long[]> classlabels_ints() {
14092             long[] classlabels_ints = Attribute.classlabels_ints.access(long[].class, onnxAttributes);
14093             return java.util.Optional.ofNullable(classlabels_ints).map(long[]::clone);
14094         }
14095 
14096         public java.util.Optional<String> post_transform() {
14097             String post_transform = Attribute.post_transform.access(String.class, onnxAttributes);
14098             return java.util.Optional.ofNullable(post_transform);
14099         }
14100 
14101         public float[] coefficients() {
14102             float[] coefficients = Attribute.coefficients.access(float[].class, onnxAttributes);
14103             return coefficients.clone();
14104         }
14105 
14106         public java.util.Optional<Long> multi_class() {
14107             Long multi_class = Attribute.multi_class.access(Long.class, onnxAttributes);
14108             return java.util.Optional.ofNullable(multi_class);
14109         }
14110 
14111         public java.util.Optional<float[]> intercepts() {
14112             float[] intercepts = Attribute.intercepts.access(float[].class, onnxAttributes);
14113             return java.util.Optional.ofNullable(intercepts).map(float[]::clone);
14114         }
14115 
14116         public java.util.Optional<String[]> classlabels_strings() {
14117             String[] classlabels_strings = Attribute.classlabels_strings.access(String[].class, onnxAttributes);
14118             return java.util.Optional.ofNullable(classlabels_strings).map(String[]::clone);
14119         }
14120 
14121     }
14122 
14123     public static LinearClassifier LinearClassifier(TypeElement resultType, Value X, java.util.Optional<long[]> classlabels_ints, java.util.Optional<String> post_transform, float[] coefficients, java.util.Optional<Long> multi_class, java.util.Optional<float[]> intercepts, java.util.Optional<String[]> classlabels_strings) {
14124         return new LinearClassifier(resultType, X, classlabels_ints, post_transform, coefficients, multi_class, intercepts, classlabels_strings);
14125     }
14126 
14127     @OpFactoryHelper.OpDeclaration(LinearRegressor.NAME)
14128     public static final class LinearRegressor extends OnnxOp {
14129         public static final String NAME = "LinearRegressor";
14130 
14131         public enum Attribute implements OnnxAttribute {
14132             post_transform(String.class, true, "NONE"),
14133             coefficients(float[].class, true, null),
14134             targets(Long.class, true, 1),
14135             intercepts(float[].class, true, null),
14136             ;
14137 
14138                 final Class<?> t;
14139                 final boolean optional;
14140                 final Object defaultValue;
14141 
14142                 Attribute(Class<?> type, boolean optional, Object defaultValue) {
14143                     this.t = type;
14144                     this.optional = optional;
14145                     this.defaultValue = defaultValue;
14146                     assert optional || defaultValue == null;
14147                 }
14148 
14149                 public Class<?> type() {
14150                     return t;
14151                 }
14152 
14153                 public boolean isOptional() {
14154                     return optional;
14155                 }
14156 
14157                 public Object defaultValue() {
14158                     return defaultValue;
14159                 }
14160         }
14161 
14162         public enum TypeConstraint implements OnnxTypeConstraint {
14163             T(new OnnxType.TypeVariable("T", List.of(OnnxType.tensor(OnnxType.float32()), OnnxType.tensor(OnnxType.float64()), OnnxType.tensor(OnnxType.int64()), OnnxType.tensor(OnnxType.int32())))),
14164             ;
14165 
14166             final OnnxType.TypeVariable typeVariable;
14167 
14168             TypeConstraint(OnnxType.TypeVariable typeVariable) {
14169                 assert typeVariable.name().equals(name());
14170                 this.typeVariable = typeVariable;
14171             }
14172 
14173             @Override
14174             public OnnxType.TypeVariable typeVariable() {
14175                 return typeVariable;
14176             }
14177         }
14178 
14179         public enum InputParameter implements OnnxParameter {
14180             X(TypeConstraint.T.typeVariable(), Quantifier.REQUIRED),
14181             ;
14182 
14183             final OnnxType type;
14184             final Quantifier quantifier;
14185 
14186             InputParameter(OnnxType type, Quantifier quantifier) {
14187                 this.type = type;
14188                 this.quantifier = quantifier;
14189             }
14190 
14191             @Override
14192             public OnnxType type() {
14193                 return type;
14194             }
14195 
14196             @Override
14197             public Quantifier quantifier() {
14198                 return quantifier;
14199             }
14200         }
14201 
14202         public enum OutputParameter implements OnnxParameter {
14203             Y(OnnxType.tensor(OnnxType.float32()), Quantifier.REQUIRED),
14204             ;
14205 
14206             final OnnxType type;
14207             final Quantifier quantifier;
14208 
14209             OutputParameter(OnnxType type, Quantifier quantifier) {
14210                 this.type = type;
14211                 this.quantifier = quantifier;
14212             }
14213 
14214             @Override
14215             public OnnxType type() {
14216                 return type;
14217             }
14218 
14219             @Override
14220             public Quantifier quantifier() {
14221                 return quantifier;
14222             }
14223         }
14224 
14225         public static final OnnxSchema SCHEMA = new OnnxSchemaRecord(
14226                 NAME,
14227                 List.of(Attribute.values()),
14228                 List.of(TypeConstraint.values()),
14229                 List.of(InputParameter.values()),
14230                 List.of(OutputParameter.values())
14231         );
14232 
14233         public LinearRegressor(ExternalizedOp def) {
14234             super(SCHEMA, def);
14235         }
14236 
14237         LinearRegressor(LinearRegressor that, CopyContext cc) {
14238             super(that, cc);
14239         }
14240 
14241         @Override
14242         public LinearRegressor transform(CopyContext cc, OpTransformer ot) {
14243             return new LinearRegressor(this, cc);
14244         }
14245 
14246         LinearRegressor(TypeElement resultType, Value X, java.util.Optional<String> post_transform, java.util.Optional<float[]> coefficients, java.util.Optional<Long> targets, java.util.Optional<float[]> intercepts) {
14247             super(SCHEMA, resultType, Set.of(), List.of(X), List.of(post_transform, coefficients, targets, intercepts));
14248         }
14249 
14250         @Override
14251         public SequencedSet<OnnxParameter> onnxOutputs() {
14252             return onnxOutputs(SCHEMA);
14253         }
14254 
14255         @Override
14256         public SequencedMap<OnnxParameter, Object> onnxInputs() {
14257             return onnxInputs(SCHEMA, List.of(X()));
14258         }
14259 
14260         public Value X() {
14261             return operands().get(0);
14262         }
14263 
14264         public java.util.Optional<String> post_transform() {
14265             String post_transform = Attribute.post_transform.access(String.class, onnxAttributes);
14266             return java.util.Optional.ofNullable(post_transform);
14267         }
14268 
14269         public java.util.Optional<float[]> coefficients() {
14270             float[] coefficients = Attribute.coefficients.access(float[].class, onnxAttributes);
14271             return java.util.Optional.ofNullable(coefficients).map(float[]::clone);
14272         }
14273 
14274         public java.util.Optional<Long> targets() {
14275             Long targets = Attribute.targets.access(Long.class, onnxAttributes);
14276             return java.util.Optional.ofNullable(targets);
14277         }
14278 
14279         public java.util.Optional<float[]> intercepts() {
14280             float[] intercepts = Attribute.intercepts.access(float[].class, onnxAttributes);
14281             return java.util.Optional.ofNullable(intercepts).map(float[]::clone);
14282         }
14283 
14284     }
14285 
14286     public static LinearRegressor LinearRegressor(TypeElement resultType, Value X, java.util.Optional<String> post_transform, java.util.Optional<float[]> coefficients, java.util.Optional<Long> targets, java.util.Optional<float[]> intercepts) {
14287         return new LinearRegressor(resultType, X, post_transform, coefficients, targets, intercepts);
14288     }
14289 
14290     @OpFactoryHelper.OpDeclaration(Log.NAME)
14291     public static final class Log extends OnnxOp {
14292         public static final String NAME = "Log";
14293 
14294         public enum Attribute implements OnnxAttribute.None { }
14295 
14296         public enum TypeConstraint implements OnnxTypeConstraint {
14297             T(new OnnxType.TypeVariable("T", List.of(OnnxType.tensor(OnnxType.float16()), OnnxType.tensor(OnnxType.float32()), OnnxType.tensor(OnnxType.float64()), OnnxType.tensor(OnnxType.bfloat16())))),
14298             ;
14299 
14300             final OnnxType.TypeVariable typeVariable;
14301 
14302             TypeConstraint(OnnxType.TypeVariable typeVariable) {
14303                 assert typeVariable.name().equals(name());
14304                 this.typeVariable = typeVariable;
14305             }
14306 
14307             @Override
14308             public OnnxType.TypeVariable typeVariable() {
14309                 return typeVariable;
14310             }
14311         }
14312 
14313         public enum InputParameter implements OnnxParameter {
14314             input(TypeConstraint.T.typeVariable(), Quantifier.REQUIRED),
14315             ;
14316 
14317             final OnnxType type;
14318             final Quantifier quantifier;
14319 
14320             InputParameter(OnnxType type, Quantifier quantifier) {
14321                 this.type = type;
14322                 this.quantifier = quantifier;
14323             }
14324 
14325             @Override
14326             public OnnxType type() {
14327                 return type;
14328             }
14329 
14330             @Override
14331             public Quantifier quantifier() {
14332                 return quantifier;
14333             }
14334         }
14335 
14336         public enum OutputParameter implements OnnxParameter {
14337             output(TypeConstraint.T.typeVariable(), Quantifier.REQUIRED),
14338             ;
14339 
14340             final OnnxType type;
14341             final Quantifier quantifier;
14342 
14343             OutputParameter(OnnxType type, Quantifier quantifier) {
14344                 this.type = type;
14345                 this.quantifier = quantifier;
14346             }
14347 
14348             @Override
14349             public OnnxType type() {
14350                 return type;
14351             }
14352 
14353             @Override
14354             public Quantifier quantifier() {
14355                 return quantifier;
14356             }
14357         }
14358 
14359         public static final OnnxSchema SCHEMA = new OnnxSchemaRecord(
14360                 NAME,
14361                 List.of(Attribute.values()),
14362                 List.of(TypeConstraint.values()),
14363                 List.of(InputParameter.values()),
14364                 List.of(OutputParameter.values())
14365         );
14366 
14367         public Log(ExternalizedOp def) {
14368             super(SCHEMA, def);
14369         }
14370 
14371         Log(Log that, CopyContext cc) {
14372             super(that, cc);
14373         }
14374 
14375         @Override
14376         public Log transform(CopyContext cc, OpTransformer ot) {
14377             return new Log(this, cc);
14378         }
14379 
14380         Log(TypeElement resultType, Value input) {
14381             super(SCHEMA, resultType, Set.of(), List.of(input), List.of());
14382         }
14383 
14384         @Override
14385         public SequencedSet<OnnxParameter> onnxOutputs() {
14386             return onnxOutputs(SCHEMA);
14387         }
14388 
14389         @Override
14390         public SequencedMap<OnnxParameter, Object> onnxInputs() {
14391             return onnxInputs(SCHEMA, List.of(input()));
14392         }
14393 
14394         public Value input() {
14395             return operands().get(0);
14396         }
14397 
14398     }
14399 
14400     public static Log Log(TypeElement resultType, Value input) {
14401         return new Log(resultType, input);
14402     }
14403 
14404     @OpFactoryHelper.OpDeclaration(LogSoftmax.NAME)
14405     public static final class LogSoftmax extends OnnxOp {
14406         public static final String NAME = "LogSoftmax";
14407 
14408         public enum Attribute implements OnnxAttribute {
14409             axis(Long.class, true, -1),
14410             ;
14411 
14412                 final Class<?> t;
14413                 final boolean optional;
14414                 final Object defaultValue;
14415 
14416                 Attribute(Class<?> type, boolean optional, Object defaultValue) {
14417                     this.t = type;
14418                     this.optional = optional;
14419                     this.defaultValue = defaultValue;
14420                     assert optional || defaultValue == null;
14421                 }
14422 
14423                 public Class<?> type() {
14424                     return t;
14425                 }
14426 
14427                 public boolean isOptional() {
14428                     return optional;
14429                 }
14430 
14431                 public Object defaultValue() {
14432                     return defaultValue;
14433                 }
14434         }
14435 
14436         public enum TypeConstraint implements OnnxTypeConstraint {
14437             T(new OnnxType.TypeVariable("T", List.of(OnnxType.tensor(OnnxType.float16()), OnnxType.tensor(OnnxType.float32()), OnnxType.tensor(OnnxType.float64()), OnnxType.tensor(OnnxType.bfloat16())))),
14438             ;
14439 
14440             final OnnxType.TypeVariable typeVariable;
14441 
14442             TypeConstraint(OnnxType.TypeVariable typeVariable) {
14443                 assert typeVariable.name().equals(name());
14444                 this.typeVariable = typeVariable;
14445             }
14446 
14447             @Override
14448             public OnnxType.TypeVariable typeVariable() {
14449                 return typeVariable;
14450             }
14451         }
14452 
14453         public enum InputParameter implements OnnxParameter {
14454             input(TypeConstraint.T.typeVariable(), Quantifier.REQUIRED),
14455             ;
14456 
14457             final OnnxType type;
14458             final Quantifier quantifier;
14459 
14460             InputParameter(OnnxType type, Quantifier quantifier) {
14461                 this.type = type;
14462                 this.quantifier = quantifier;
14463             }
14464 
14465             @Override
14466             public OnnxType type() {
14467                 return type;
14468             }
14469 
14470             @Override
14471             public Quantifier quantifier() {
14472                 return quantifier;
14473             }
14474         }
14475 
14476         public enum OutputParameter implements OnnxParameter {
14477             output(TypeConstraint.T.typeVariable(), Quantifier.REQUIRED),
14478             ;
14479 
14480             final OnnxType type;
14481             final Quantifier quantifier;
14482 
14483             OutputParameter(OnnxType type, Quantifier quantifier) {
14484                 this.type = type;
14485                 this.quantifier = quantifier;
14486             }
14487 
14488             @Override
14489             public OnnxType type() {
14490                 return type;
14491             }
14492 
14493             @Override
14494             public Quantifier quantifier() {
14495                 return quantifier;
14496             }
14497         }
14498 
14499         public static final OnnxSchema SCHEMA = new OnnxSchemaRecord(
14500                 NAME,
14501                 List.of(Attribute.values()),
14502                 List.of(TypeConstraint.values()),
14503                 List.of(InputParameter.values()),
14504                 List.of(OutputParameter.values())
14505         );
14506 
14507         public LogSoftmax(ExternalizedOp def) {
14508             super(SCHEMA, def);
14509         }
14510 
14511         LogSoftmax(LogSoftmax that, CopyContext cc) {
14512             super(that, cc);
14513         }
14514 
14515         @Override
14516         public LogSoftmax transform(CopyContext cc, OpTransformer ot) {
14517             return new LogSoftmax(this, cc);
14518         }
14519 
14520         LogSoftmax(TypeElement resultType, Value input, java.util.Optional<Long> axis) {
14521             super(SCHEMA, resultType, Set.of(), List.of(input), List.of(axis));
14522         }
14523 
14524         @Override
14525         public SequencedSet<OnnxParameter> onnxOutputs() {
14526             return onnxOutputs(SCHEMA);
14527         }
14528 
14529         @Override
14530         public SequencedMap<OnnxParameter, Object> onnxInputs() {
14531             return onnxInputs(SCHEMA, List.of(input()));
14532         }
14533 
14534         public Value input() {
14535             return operands().get(0);
14536         }
14537 
14538         public java.util.Optional<Long> axis() {
14539             Long axis = Attribute.axis.access(Long.class, onnxAttributes);
14540             return java.util.Optional.ofNullable(axis);
14541         }
14542 
14543     }
14544 
14545     public static LogSoftmax LogSoftmax(TypeElement resultType, Value input, java.util.Optional<Long> axis) {
14546         return new LogSoftmax(resultType, input, axis);
14547     }
14548 
14549     @OpFactoryHelper.OpDeclaration(LpNormalization.NAME)
14550     public static final class LpNormalization extends OnnxOp {
14551         public static final String NAME = "LpNormalization";
14552 
14553         public enum Attribute implements OnnxAttribute {
14554             p(Long.class, true, 2),
14555             axis(Long.class, true, -1),
14556             ;
14557 
14558                 final Class<?> t;
14559                 final boolean optional;
14560                 final Object defaultValue;
14561 
14562                 Attribute(Class<?> type, boolean optional, Object defaultValue) {
14563                     this.t = type;
14564                     this.optional = optional;
14565                     this.defaultValue = defaultValue;
14566                     assert optional || defaultValue == null;
14567                 }
14568 
14569                 public Class<?> type() {
14570                     return t;
14571                 }
14572 
14573                 public boolean isOptional() {
14574                     return optional;
14575                 }
14576 
14577                 public Object defaultValue() {
14578                     return defaultValue;
14579                 }
14580         }
14581 
14582         public enum TypeConstraint implements OnnxTypeConstraint {
14583             T(new OnnxType.TypeVariable("T", List.of(OnnxType.tensor(OnnxType.bfloat16()), OnnxType.tensor(OnnxType.float16()), OnnxType.tensor(OnnxType.float32()), OnnxType.tensor(OnnxType.float64())))),
14584             ;
14585 
14586             final OnnxType.TypeVariable typeVariable;
14587 
14588             TypeConstraint(OnnxType.TypeVariable typeVariable) {
14589                 assert typeVariable.name().equals(name());
14590                 this.typeVariable = typeVariable;
14591             }
14592 
14593             @Override
14594             public OnnxType.TypeVariable typeVariable() {
14595                 return typeVariable;
14596             }
14597         }
14598 
14599         public enum InputParameter implements OnnxParameter {
14600             input(TypeConstraint.T.typeVariable(), Quantifier.REQUIRED),
14601             ;
14602 
14603             final OnnxType type;
14604             final Quantifier quantifier;
14605 
14606             InputParameter(OnnxType type, Quantifier quantifier) {
14607                 this.type = type;
14608                 this.quantifier = quantifier;
14609             }
14610 
14611             @Override
14612             public OnnxType type() {
14613                 return type;
14614             }
14615 
14616             @Override
14617             public Quantifier quantifier() {
14618                 return quantifier;
14619             }
14620         }
14621 
14622         public enum OutputParameter implements OnnxParameter {
14623             output(TypeConstraint.T.typeVariable(), Quantifier.REQUIRED),
14624             ;
14625 
14626             final OnnxType type;
14627             final Quantifier quantifier;
14628 
14629             OutputParameter(OnnxType type, Quantifier quantifier) {
14630                 this.type = type;
14631                 this.quantifier = quantifier;
14632             }
14633 
14634             @Override
14635             public OnnxType type() {
14636                 return type;
14637             }
14638 
14639             @Override
14640             public Quantifier quantifier() {
14641                 return quantifier;
14642             }
14643         }
14644 
14645         public static final OnnxSchema SCHEMA = new OnnxSchemaRecord(
14646                 NAME,
14647                 List.of(Attribute.values()),
14648                 List.of(TypeConstraint.values()),
14649                 List.of(InputParameter.values()),
14650                 List.of(OutputParameter.values())
14651         );
14652 
14653         public LpNormalization(ExternalizedOp def) {
14654             super(SCHEMA, def);
14655         }
14656 
14657         LpNormalization(LpNormalization that, CopyContext cc) {
14658             super(that, cc);
14659         }
14660 
14661         @Override
14662         public LpNormalization transform(CopyContext cc, OpTransformer ot) {
14663             return new LpNormalization(this, cc);
14664         }
14665 
14666         LpNormalization(TypeElement resultType, Value input, java.util.Optional<Long> p, java.util.Optional<Long> axis) {
14667             super(SCHEMA, resultType, Set.of(), List.of(input), List.of(p, axis));
14668         }
14669 
14670         @Override
14671         public SequencedSet<OnnxParameter> onnxOutputs() {
14672             return onnxOutputs(SCHEMA);
14673         }
14674 
14675         @Override
14676         public SequencedMap<OnnxParameter, Object> onnxInputs() {
14677             return onnxInputs(SCHEMA, List.of(input()));
14678         }
14679 
14680         public Value input() {
14681             return operands().get(0);
14682         }
14683 
14684         public java.util.Optional<Long> p() {
14685             Long p = Attribute.p.access(Long.class, onnxAttributes);
14686             return java.util.Optional.ofNullable(p);
14687         }
14688 
14689         public java.util.Optional<Long> axis() {
14690             Long axis = Attribute.axis.access(Long.class, onnxAttributes);
14691             return java.util.Optional.ofNullable(axis);
14692         }
14693 
14694     }
14695 
14696     public static LpNormalization LpNormalization(TypeElement resultType, Value input, java.util.Optional<Long> p, java.util.Optional<Long> axis) {
14697         return new LpNormalization(resultType, input, p, axis);
14698     }
14699 
14700     @OpFactoryHelper.OpDeclaration(LpPool.NAME)
14701     public static final class LpPool extends OnnxOp {
14702         public static final String NAME = "LpPool";
14703 
14704         public enum Attribute implements OnnxAttribute {
14705             p(Long.class, true, 2),
14706             pads(long[].class, true, null),
14707             dilations(long[].class, true, null),
14708             auto_pad(String.class, true, "NOTSET"),
14709             ceil_mode(Long.class, true, 0),
14710             strides(long[].class, true, null),
14711             kernel_shape(long[].class, false, null),
14712             ;
14713 
14714                 final Class<?> t;
14715                 final boolean optional;
14716                 final Object defaultValue;
14717 
14718                 Attribute(Class<?> type, boolean optional, Object defaultValue) {
14719                     this.t = type;
14720                     this.optional = optional;
14721                     this.defaultValue = defaultValue;
14722                     assert optional || defaultValue == null;
14723                 }
14724 
14725                 public Class<?> type() {
14726                     return t;
14727                 }
14728 
14729                 public boolean isOptional() {
14730                     return optional;
14731                 }
14732 
14733                 public Object defaultValue() {
14734                     return defaultValue;
14735                 }
14736         }
14737 
14738         public enum TypeConstraint implements OnnxTypeConstraint {
14739             T(new OnnxType.TypeVariable("T", List.of(OnnxType.tensor(OnnxType.bfloat16()), OnnxType.tensor(OnnxType.float16()), OnnxType.tensor(OnnxType.float32()), OnnxType.tensor(OnnxType.float64())))),
14740             ;
14741 
14742             final OnnxType.TypeVariable typeVariable;
14743 
14744             TypeConstraint(OnnxType.TypeVariable typeVariable) {
14745                 assert typeVariable.name().equals(name());
14746                 this.typeVariable = typeVariable;
14747             }
14748 
14749             @Override
14750             public OnnxType.TypeVariable typeVariable() {
14751                 return typeVariable;
14752             }
14753         }
14754 
14755         public enum InputParameter implements OnnxParameter {
14756             X(TypeConstraint.T.typeVariable(), Quantifier.REQUIRED),
14757             ;
14758 
14759             final OnnxType type;
14760             final Quantifier quantifier;
14761 
14762             InputParameter(OnnxType type, Quantifier quantifier) {
14763                 this.type = type;
14764                 this.quantifier = quantifier;
14765             }
14766 
14767             @Override
14768             public OnnxType type() {
14769                 return type;
14770             }
14771 
14772             @Override
14773             public Quantifier quantifier() {
14774                 return quantifier;
14775             }
14776         }
14777 
14778         public enum OutputParameter implements OnnxParameter {
14779             Y(TypeConstraint.T.typeVariable(), Quantifier.REQUIRED),
14780             ;
14781 
14782             final OnnxType type;
14783             final Quantifier quantifier;
14784 
14785             OutputParameter(OnnxType type, Quantifier quantifier) {
14786                 this.type = type;
14787                 this.quantifier = quantifier;
14788             }
14789 
14790             @Override
14791             public OnnxType type() {
14792                 return type;
14793             }
14794 
14795             @Override
14796             public Quantifier quantifier() {
14797                 return quantifier;
14798             }
14799         }
14800 
14801         public static final OnnxSchema SCHEMA = new OnnxSchemaRecord(
14802                 NAME,
14803                 List.of(Attribute.values()),
14804                 List.of(TypeConstraint.values()),
14805                 List.of(InputParameter.values()),
14806                 List.of(OutputParameter.values())
14807         );
14808 
14809         public LpPool(ExternalizedOp def) {
14810             super(SCHEMA, def);
14811         }
14812 
14813         LpPool(LpPool that, CopyContext cc) {
14814             super(that, cc);
14815         }
14816 
14817         @Override
14818         public LpPool transform(CopyContext cc, OpTransformer ot) {
14819             return new LpPool(this, cc);
14820         }
14821 
14822         LpPool(TypeElement resultType, Value X, java.util.Optional<Long> p, java.util.Optional<long[]> pads, java.util.Optional<long[]> dilations, java.util.Optional<String> auto_pad, java.util.Optional<Long> ceil_mode, java.util.Optional<long[]> strides, long[] kernel_shape) {
14823             super(SCHEMA, resultType, Set.of(), List.of(X), List.of(p, pads, dilations, auto_pad, ceil_mode, strides, kernel_shape));
14824         }
14825 
14826         @Override
14827         public SequencedSet<OnnxParameter> onnxOutputs() {
14828             return onnxOutputs(SCHEMA);
14829         }
14830 
14831         @Override
14832         public SequencedMap<OnnxParameter, Object> onnxInputs() {
14833             return onnxInputs(SCHEMA, List.of(X()));
14834         }
14835 
14836         public Value X() {
14837             return operands().get(0);
14838         }
14839 
14840         public java.util.Optional<Long> p() {
14841             Long p = Attribute.p.access(Long.class, onnxAttributes);
14842             return java.util.Optional.ofNullable(p);
14843         }
14844 
14845         public java.util.Optional<long[]> pads() {
14846             long[] pads = Attribute.pads.access(long[].class, onnxAttributes);
14847             return java.util.Optional.ofNullable(pads).map(long[]::clone);
14848         }
14849 
14850         public java.util.Optional<long[]> dilations() {
14851             long[] dilations = Attribute.dilations.access(long[].class, onnxAttributes);
14852             return java.util.Optional.ofNullable(dilations).map(long[]::clone);
14853         }
14854 
14855         public java.util.Optional<String> auto_pad() {
14856             String auto_pad = Attribute.auto_pad.access(String.class, onnxAttributes);
14857             return java.util.Optional.ofNullable(auto_pad);
14858         }
14859 
14860         public java.util.Optional<Long> ceil_mode() {
14861             Long ceil_mode = Attribute.ceil_mode.access(Long.class, onnxAttributes);
14862             return java.util.Optional.ofNullable(ceil_mode);
14863         }
14864 
14865         public java.util.Optional<long[]> strides() {
14866             long[] strides = Attribute.strides.access(long[].class, onnxAttributes);
14867             return java.util.Optional.ofNullable(strides).map(long[]::clone);
14868         }
14869 
14870         public long[] kernel_shape() {
14871             long[] kernel_shape = Attribute.kernel_shape.access(long[].class, onnxAttributes);
14872             return kernel_shape.clone();
14873         }
14874 
14875     }
14876 
14877     public static LpPool LpPool(TypeElement resultType, Value X, java.util.Optional<Long> p, java.util.Optional<long[]> pads, java.util.Optional<long[]> dilations, java.util.Optional<String> auto_pad, java.util.Optional<Long> ceil_mode, java.util.Optional<long[]> strides, long[] kernel_shape) {
14878         return new LpPool(resultType, X, p, pads, dilations, auto_pad, ceil_mode, strides, kernel_shape);
14879     }
14880 
14881     @OpFactoryHelper.OpDeclaration(MatMul.NAME)
14882     public static final class MatMul extends OnnxOp {
14883         public static final String NAME = "MatMul";
14884 
14885         public enum Attribute implements OnnxAttribute.None { }
14886 
14887         public enum TypeConstraint implements OnnxTypeConstraint {
14888             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())))),
14889             ;
14890 
14891             final OnnxType.TypeVariable typeVariable;
14892 
14893             TypeConstraint(OnnxType.TypeVariable typeVariable) {
14894                 assert typeVariable.name().equals(name());
14895                 this.typeVariable = typeVariable;
14896             }
14897 
14898             @Override
14899             public OnnxType.TypeVariable typeVariable() {
14900                 return typeVariable;
14901             }
14902         }
14903 
14904         public enum InputParameter implements OnnxParameter {
14905             A(TypeConstraint.T.typeVariable(), Quantifier.REQUIRED),
14906             B(TypeConstraint.T.typeVariable(), Quantifier.REQUIRED),
14907             ;
14908 
14909             final OnnxType type;
14910             final Quantifier quantifier;
14911 
14912             InputParameter(OnnxType type, Quantifier quantifier) {
14913                 this.type = type;
14914                 this.quantifier = quantifier;
14915             }
14916 
14917             @Override
14918             public OnnxType type() {
14919                 return type;
14920             }
14921 
14922             @Override
14923             public Quantifier quantifier() {
14924                 return quantifier;
14925             }
14926         }
14927 
14928         public enum OutputParameter implements OnnxParameter {
14929             Y(TypeConstraint.T.typeVariable(), Quantifier.REQUIRED),
14930             ;
14931 
14932             final OnnxType type;
14933             final Quantifier quantifier;
14934 
14935             OutputParameter(OnnxType type, Quantifier quantifier) {
14936                 this.type = type;
14937                 this.quantifier = quantifier;
14938             }
14939 
14940             @Override
14941             public OnnxType type() {
14942                 return type;
14943             }
14944 
14945             @Override
14946             public Quantifier quantifier() {
14947                 return quantifier;
14948             }
14949         }
14950 
14951         public static final OnnxSchema SCHEMA = new OnnxSchemaRecord(
14952                 NAME,
14953                 List.of(Attribute.values()),
14954                 List.of(TypeConstraint.values()),
14955                 List.of(InputParameter.values()),
14956                 List.of(OutputParameter.values())
14957         );
14958 
14959         public MatMul(ExternalizedOp def) {
14960             super(SCHEMA, def);
14961         }
14962 
14963         MatMul(MatMul that, CopyContext cc) {
14964             super(that, cc);
14965         }
14966 
14967         @Override
14968         public MatMul transform(CopyContext cc, OpTransformer ot) {
14969             return new MatMul(this, cc);
14970         }
14971 
14972         MatMul(TypeElement resultType, Value A, Value B) {
14973             super(SCHEMA, resultType, Set.of(), List.of(A, B), List.of());
14974         }
14975 
14976         @Override
14977         public SequencedSet<OnnxParameter> onnxOutputs() {
14978             return onnxOutputs(SCHEMA);
14979         }
14980 
14981         @Override
14982         public SequencedMap<OnnxParameter, Object> onnxInputs() {
14983             return onnxInputs(SCHEMA, List.of(A(), B()));
14984         }
14985 
14986         public Value A() {
14987             return operands().get(0);
14988         }
14989 
14990         public Value B() {
14991             return operands().get(1);
14992         }
14993 
14994     }
14995 
14996     public static MatMul MatMul(TypeElement resultType, Value A, Value B) {
14997         return new MatMul(resultType, A, B);
14998     }
14999 
15000     @OpFactoryHelper.OpDeclaration(MatMulInteger.NAME)
15001     public static final class MatMulInteger extends OnnxOp {
15002         public static final String NAME = "MatMulInteger";
15003 
15004         public enum Attribute implements OnnxAttribute.None { }
15005 
15006         public enum TypeConstraint implements OnnxTypeConstraint {
15007             T1(new OnnxType.TypeVariable("T1", List.of(OnnxType.tensor(OnnxType.int8()), OnnxType.tensor(OnnxType.uint8())))),
15008             T2(new OnnxType.TypeVariable("T2", List.of(OnnxType.tensor(OnnxType.int8()), OnnxType.tensor(OnnxType.uint8())))),
15009             T3(new OnnxType.TypeVariable("T3", List.of(OnnxType.tensor(OnnxType.int32())))),
15010             ;
15011 
15012             final OnnxType.TypeVariable typeVariable;
15013 
15014             TypeConstraint(OnnxType.TypeVariable typeVariable) {
15015                 assert typeVariable.name().equals(name());
15016                 this.typeVariable = typeVariable;
15017             }
15018 
15019             @Override
15020             public OnnxType.TypeVariable typeVariable() {
15021                 return typeVariable;
15022             }
15023         }
15024 
15025         public enum InputParameter implements OnnxParameter {
15026             A(TypeConstraint.T1.typeVariable(), Quantifier.REQUIRED),
15027             B(TypeConstraint.T2.typeVariable(), Quantifier.REQUIRED),
15028             a_zero_point(TypeConstraint.T1.typeVariable(), Quantifier.OPTIONAL),
15029             b_zero_point(TypeConstraint.T2.typeVariable(), Quantifier.OPTIONAL),
15030             ;
15031 
15032             final OnnxType type;
15033             final Quantifier quantifier;
15034 
15035             InputParameter(OnnxType type, Quantifier quantifier) {
15036                 this.type = type;
15037                 this.quantifier = quantifier;
15038             }
15039 
15040             @Override
15041             public OnnxType type() {
15042                 return type;
15043             }
15044 
15045             @Override
15046             public Quantifier quantifier() {
15047                 return quantifier;
15048             }
15049         }
15050 
15051         public enum OutputParameter implements OnnxParameter {
15052             Y(TypeConstraint.T3.typeVariable(), Quantifier.REQUIRED),
15053             ;
15054 
15055             final OnnxType type;
15056             final Quantifier quantifier;
15057 
15058             OutputParameter(OnnxType type, Quantifier quantifier) {
15059                 this.type = type;
15060                 this.quantifier = quantifier;
15061             }
15062 
15063             @Override
15064             public OnnxType type() {
15065                 return type;
15066             }
15067 
15068             @Override
15069             public Quantifier quantifier() {
15070                 return quantifier;
15071             }
15072         }
15073 
15074         public static final OnnxSchema SCHEMA = new OnnxSchemaRecord(
15075                 NAME,
15076                 List.of(Attribute.values()),
15077                 List.of(TypeConstraint.values()),
15078                 List.of(InputParameter.values()),
15079                 List.of(OutputParameter.values())
15080         );
15081 
15082         public MatMulInteger(ExternalizedOp def) {
15083             super(SCHEMA, def);
15084         }
15085 
15086         MatMulInteger(MatMulInteger that, CopyContext cc) {
15087             super(that, cc);
15088         }
15089 
15090         @Override
15091         public MatMulInteger transform(CopyContext cc, OpTransformer ot) {
15092             return new MatMulInteger(this, cc);
15093         }
15094 
15095         MatMulInteger(TypeElement resultType, Value A, Value B, java.util.Optional<Value> a_zero_point, java.util.Optional<Value> b_zero_point) {
15096             super(SCHEMA, resultType, Set.of(), List.of(A, B, a_zero_point, b_zero_point), List.of());
15097         }
15098 
15099         @Override
15100         public SequencedSet<OnnxParameter> onnxOutputs() {
15101             return onnxOutputs(SCHEMA);
15102         }
15103 
15104         @Override
15105         public SequencedMap<OnnxParameter, Object> onnxInputs() {
15106             return onnxInputs(SCHEMA, List.of(A(), B(), a_zero_point(), b_zero_point()));
15107         }
15108 
15109         public Value A() {
15110             return operands().get(0);
15111         }
15112 
15113         public Value B() {
15114             return operands().get(1);
15115         }
15116 
15117         public java.util.Optional<Value> a_zero_point() {
15118             int i = optionalInputArguments.indexOf(InputParameter.a_zero_point);
15119             return i != -1 ? java.util.Optional.of(operands().get(2 + i)) : java.util.Optional.empty();
15120         }
15121 
15122         public java.util.Optional<Value> b_zero_point() {
15123             int i = optionalInputArguments.indexOf(InputParameter.b_zero_point);
15124             return i != -1 ? java.util.Optional.of(operands().get(2 + i)) : java.util.Optional.empty();
15125         }
15126 
15127     }
15128 
15129     public static MatMulInteger MatMulInteger(TypeElement resultType, Value A, Value B, java.util.Optional<Value> a_zero_point, java.util.Optional<Value> b_zero_point) {
15130         return new MatMulInteger(resultType, A, B, a_zero_point, b_zero_point);
15131     }
15132 
15133     @OpFactoryHelper.OpDeclaration(Max.NAME)
15134     public static final class Max extends OnnxOp {
15135         public static final String NAME = "Max";
15136 
15137         public enum Attribute implements OnnxAttribute.None { }
15138 
15139         public enum TypeConstraint implements OnnxTypeConstraint {
15140             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())))),
15141             ;
15142 
15143             final OnnxType.TypeVariable typeVariable;
15144 
15145             TypeConstraint(OnnxType.TypeVariable typeVariable) {
15146                 assert typeVariable.name().equals(name());
15147                 this.typeVariable = typeVariable;
15148             }
15149 
15150             @Override
15151             public OnnxType.TypeVariable typeVariable() {
15152                 return typeVariable;
15153             }
15154         }
15155 
15156         public enum InputParameter implements OnnxParameter {
15157             data_0(TypeConstraint.T.typeVariable(), Quantifier.VARIADIC),
15158             ;
15159 
15160             final OnnxType type;
15161             final Quantifier quantifier;
15162 
15163             InputParameter(OnnxType type, Quantifier quantifier) {
15164                 this.type = type;
15165                 this.quantifier = quantifier;
15166             }
15167 
15168             @Override
15169             public OnnxType type() {
15170                 return type;
15171             }
15172 
15173             @Override
15174             public Quantifier quantifier() {
15175                 return quantifier;
15176             }
15177         }
15178 
15179         public enum OutputParameter implements OnnxParameter {
15180             max(TypeConstraint.T.typeVariable(), Quantifier.REQUIRED),
15181             ;
15182 
15183             final OnnxType type;
15184             final Quantifier quantifier;
15185 
15186             OutputParameter(OnnxType type, Quantifier quantifier) {
15187                 this.type = type;
15188                 this.quantifier = quantifier;
15189             }
15190 
15191             @Override
15192             public OnnxType type() {
15193                 return type;
15194             }
15195 
15196             @Override
15197             public Quantifier quantifier() {
15198                 return quantifier;
15199             }
15200         }
15201 
15202         public static final OnnxSchema SCHEMA = new OnnxSchemaRecord(
15203                 NAME,
15204                 List.of(Attribute.values()),
15205                 List.of(TypeConstraint.values()),
15206                 List.of(InputParameter.values()),
15207                 List.of(OutputParameter.values())
15208         );
15209 
15210         public Max(ExternalizedOp def) {
15211             super(SCHEMA, def);
15212         }
15213 
15214         Max(Max that, CopyContext cc) {
15215             super(that, cc);
15216         }
15217 
15218         @Override
15219         public Max transform(CopyContext cc, OpTransformer ot) {
15220             return new Max(this, cc);
15221         }
15222 
15223         Max(TypeElement resultType, List<Value> data_0) {
15224             super(SCHEMA, resultType, Set.of(), List.of(data_0), List.of());
15225         }
15226 
15227         @Override
15228         public SequencedSet<OnnxParameter> onnxOutputs() {
15229             return onnxOutputs(SCHEMA);
15230         }
15231 
15232         @Override
15233         public SequencedMap<OnnxParameter, Object> onnxInputs() {
15234             return onnxInputs(SCHEMA, List.of(data_0()));
15235         }
15236 
15237         public List<Value> data_0() {
15238             return operands();
15239         }
15240 
15241     }
15242 
15243     public static Max Max(TypeElement resultType, List<Value> data_0) {
15244         return new Max(resultType, data_0);
15245     }
15246 
15247     @OpFactoryHelper.OpDeclaration(MaxPool.NAME)
15248     public static final class MaxPool extends OnnxOp {
15249         public static final String NAME = "MaxPool";
15250 
15251         public enum Attribute implements OnnxAttribute {
15252             pads(long[].class, true, null),
15253             dilations(long[].class, true, null),
15254             auto_pad(String.class, true, "NOTSET"),
15255             ceil_mode(Long.class, true, 0),
15256             storage_order(Long.class, true, 0),
15257             strides(long[].class, true, null),
15258             kernel_shape(long[].class, false, null),
15259             ;
15260 
15261                 final Class<?> t;
15262                 final boolean optional;
15263                 final Object defaultValue;
15264 
15265                 Attribute(Class<?> type, boolean optional, Object defaultValue) {
15266                     this.t = type;
15267                     this.optional = optional;
15268                     this.defaultValue = defaultValue;
15269                     assert optional || defaultValue == null;
15270                 }
15271 
15272                 public Class<?> type() {
15273                     return t;
15274                 }
15275 
15276                 public boolean isOptional() {
15277                     return optional;
15278                 }
15279 
15280                 public Object defaultValue() {
15281                     return defaultValue;
15282                 }
15283         }
15284 
15285         public enum TypeConstraint implements OnnxTypeConstraint {
15286             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())))),
15287             I(new OnnxType.TypeVariable("I", List.of(OnnxType.tensor(OnnxType.int64())))),
15288             ;
15289 
15290             final OnnxType.TypeVariable typeVariable;
15291 
15292             TypeConstraint(OnnxType.TypeVariable typeVariable) {
15293                 assert typeVariable.name().equals(name());
15294                 this.typeVariable = typeVariable;
15295             }
15296 
15297             @Override
15298             public OnnxType.TypeVariable typeVariable() {
15299                 return typeVariable;
15300             }
15301         }
15302 
15303         public enum InputParameter implements OnnxParameter {
15304             X(TypeConstraint.T.typeVariable(), Quantifier.REQUIRED),
15305             ;
15306 
15307             final OnnxType type;
15308             final Quantifier quantifier;
15309 
15310             InputParameter(OnnxType type, Quantifier quantifier) {
15311                 this.type = type;
15312                 this.quantifier = quantifier;
15313             }
15314 
15315             @Override
15316             public OnnxType type() {
15317                 return type;
15318             }
15319 
15320             @Override
15321             public Quantifier quantifier() {
15322                 return quantifier;
15323             }
15324         }
15325 
15326         public enum OutputParameter implements OnnxParameter {
15327             Y(TypeConstraint.T.typeVariable(), Quantifier.REQUIRED),
15328             Indices(TypeConstraint.I.typeVariable(), Quantifier.OPTIONAL),
15329             ;
15330 
15331             final OnnxType type;
15332             final Quantifier quantifier;
15333 
15334             OutputParameter(OnnxType type, Quantifier quantifier) {
15335                 this.type = type;
15336                 this.quantifier = quantifier;
15337             }
15338 
15339             @Override
15340             public OnnxType type() {
15341                 return type;
15342             }
15343 
15344             @Override
15345             public Quantifier quantifier() {
15346                 return quantifier;
15347             }
15348         }
15349 
15350         public static final OnnxSchema SCHEMA = new OnnxSchemaRecord(
15351                 NAME,
15352                 List.of(Attribute.values()),
15353                 List.of(TypeConstraint.values()),
15354                 List.of(InputParameter.values()),
15355                 List.of(OutputParameter.values())
15356         );
15357 
15358         public MaxPool(ExternalizedOp def) {
15359             super(SCHEMA, def);
15360         }
15361 
15362         MaxPool(MaxPool that, CopyContext cc) {
15363             super(that, cc);
15364         }
15365 
15366         @Override
15367         public MaxPool transform(CopyContext cc, OpTransformer ot) {
15368             return new MaxPool(this, cc);
15369         }
15370 
15371         MaxPool(TypeElement resultType, Set<OutputParameter> optionalOutputs, Value X, java.util.Optional<long[]> pads, java.util.Optional<long[]> dilations, java.util.Optional<String> auto_pad, java.util.Optional<Long> ceil_mode, java.util.Optional<Long> storage_order, java.util.Optional<long[]> strides, long[] kernel_shape) {
15372             super(SCHEMA, resultType, optionalOutputs, List.of(X), List.of(pads, dilations, auto_pad, ceil_mode, storage_order, strides, kernel_shape));
15373         }
15374 
15375         @Override
15376         public SequencedSet<OnnxParameter> onnxOutputs() {
15377             return onnxOutputs(SCHEMA);
15378         }
15379 
15380         @Override
15381         public SequencedMap<OnnxParameter, Object> onnxInputs() {
15382             return onnxInputs(SCHEMA, List.of(X()));
15383         }
15384 
15385         public Value X() {
15386             return operands().get(0);
15387         }
15388 
15389         public java.util.Optional<long[]> pads() {
15390             long[] pads = Attribute.pads.access(long[].class, onnxAttributes);
15391             return java.util.Optional.ofNullable(pads).map(long[]::clone);
15392         }
15393 
15394         public java.util.Optional<long[]> dilations() {
15395             long[] dilations = Attribute.dilations.access(long[].class, onnxAttributes);
15396             return java.util.Optional.ofNullable(dilations).map(long[]::clone);
15397         }
15398 
15399         public java.util.Optional<String> auto_pad() {
15400             String auto_pad = Attribute.auto_pad.access(String.class, onnxAttributes);
15401             return java.util.Optional.ofNullable(auto_pad);
15402         }
15403 
15404         public java.util.Optional<Long> ceil_mode() {
15405             Long ceil_mode = Attribute.ceil_mode.access(Long.class, onnxAttributes);
15406             return java.util.Optional.ofNullable(ceil_mode);
15407         }
15408 
15409         public java.util.Optional<Long> storage_order() {
15410             Long storage_order = Attribute.storage_order.access(Long.class, onnxAttributes);
15411             return java.util.Optional.ofNullable(storage_order);
15412         }
15413 
15414         public java.util.Optional<long[]> strides() {
15415             long[] strides = Attribute.strides.access(long[].class, onnxAttributes);
15416             return java.util.Optional.ofNullable(strides).map(long[]::clone);
15417         }
15418 
15419         public long[] kernel_shape() {
15420             long[] kernel_shape = Attribute.kernel_shape.access(long[].class, onnxAttributes);
15421             return kernel_shape.clone();
15422         }
15423 
15424     }
15425 
15426     public static MaxPool MaxPool(TypeElement resultType, Set<MaxPool.OutputParameter> optionalOutputs, Value X, java.util.Optional<long[]> pads, java.util.Optional<long[]> dilations, java.util.Optional<String> auto_pad, java.util.Optional<Long> ceil_mode, java.util.Optional<Long> storage_order, java.util.Optional<long[]> strides, long[] kernel_shape) {
15427         return new MaxPool(resultType, optionalOutputs, X, pads, dilations, auto_pad, ceil_mode, storage_order, strides, kernel_shape);
15428     }
15429 
15430     @OpFactoryHelper.OpDeclaration(MaxRoiPool.NAME)
15431     public static final class MaxRoiPool extends OnnxOp {
15432         public static final String NAME = "MaxRoiPool";
15433 
15434         public enum Attribute implements OnnxAttribute {
15435             spatial_scale(Float.class, true, 1.0f),
15436             pooled_shape(long[].class, false, null),
15437             ;
15438 
15439                 final Class<?> t;
15440                 final boolean optional;
15441                 final Object defaultValue;
15442 
15443                 Attribute(Class<?> type, boolean optional, Object defaultValue) {
15444                     this.t = type;
15445                     this.optional = optional;
15446                     this.defaultValue = defaultValue;
15447                     assert optional || defaultValue == null;
15448                 }
15449 
15450                 public Class<?> type() {
15451                     return t;
15452                 }
15453 
15454                 public boolean isOptional() {
15455                     return optional;
15456                 }
15457 
15458                 public Object defaultValue() {
15459                     return defaultValue;
15460                 }
15461         }
15462 
15463         public enum TypeConstraint implements OnnxTypeConstraint {
15464             T(new OnnxType.TypeVariable("T", List.of(OnnxType.tensor(OnnxType.bfloat16()), OnnxType.tensor(OnnxType.float16()), OnnxType.tensor(OnnxType.float32()), OnnxType.tensor(OnnxType.float64())))),
15465             ;
15466 
15467             final OnnxType.TypeVariable typeVariable;
15468 
15469             TypeConstraint(OnnxType.TypeVariable typeVariable) {
15470                 assert typeVariable.name().equals(name());
15471                 this.typeVariable = typeVariable;
15472             }
15473 
15474             @Override
15475             public OnnxType.TypeVariable typeVariable() {
15476                 return typeVariable;
15477             }
15478         }
15479 
15480         public enum InputParameter implements OnnxParameter {
15481             X(TypeConstraint.T.typeVariable(), Quantifier.REQUIRED),
15482             rois(TypeConstraint.T.typeVariable(), Quantifier.REQUIRED),
15483             ;
15484 
15485             final OnnxType type;
15486             final Quantifier quantifier;
15487 
15488             InputParameter(OnnxType type, Quantifier quantifier) {
15489                 this.type = type;
15490                 this.quantifier = quantifier;
15491             }
15492 
15493             @Override
15494             public OnnxType type() {
15495                 return type;
15496             }
15497 
15498             @Override
15499             public Quantifier quantifier() {
15500                 return quantifier;
15501             }
15502         }
15503 
15504         public enum OutputParameter implements OnnxParameter {
15505             Y(TypeConstraint.T.typeVariable(), Quantifier.REQUIRED),
15506             ;
15507 
15508             final OnnxType type;
15509             final Quantifier quantifier;
15510 
15511             OutputParameter(OnnxType type, Quantifier quantifier) {
15512                 this.type = type;
15513                 this.quantifier = quantifier;
15514             }
15515 
15516             @Override
15517             public OnnxType type() {
15518                 return type;
15519             }
15520 
15521             @Override
15522             public Quantifier quantifier() {
15523                 return quantifier;
15524             }
15525         }
15526 
15527         public static final OnnxSchema SCHEMA = new OnnxSchemaRecord(
15528                 NAME,
15529                 List.of(Attribute.values()),
15530                 List.of(TypeConstraint.values()),
15531                 List.of(InputParameter.values()),
15532                 List.of(OutputParameter.values())
15533         );
15534 
15535         public MaxRoiPool(ExternalizedOp def) {
15536             super(SCHEMA, def);
15537         }
15538 
15539         MaxRoiPool(MaxRoiPool that, CopyContext cc) {
15540             super(that, cc);
15541         }
15542 
15543         @Override
15544         public MaxRoiPool transform(CopyContext cc, OpTransformer ot) {
15545             return new MaxRoiPool(this, cc);
15546         }
15547 
15548         MaxRoiPool(TypeElement resultType, Value X, Value rois, java.util.Optional<Float> spatial_scale, long[] pooled_shape) {
15549             super(SCHEMA, resultType, Set.of(), List.of(X, rois), List.of(spatial_scale, pooled_shape));
15550         }
15551 
15552         @Override
15553         public SequencedSet<OnnxParameter> onnxOutputs() {
15554             return onnxOutputs(SCHEMA);
15555         }
15556 
15557         @Override
15558         public SequencedMap<OnnxParameter, Object> onnxInputs() {
15559             return onnxInputs(SCHEMA, List.of(X(), rois()));
15560         }
15561 
15562         public Value X() {
15563             return operands().get(0);
15564         }
15565 
15566         public Value rois() {
15567             return operands().get(1);
15568         }
15569 
15570         public java.util.Optional<Float> spatial_scale() {
15571             Float spatial_scale = Attribute.spatial_scale.access(Float.class, onnxAttributes);
15572             return java.util.Optional.ofNullable(spatial_scale);
15573         }
15574 
15575         public long[] pooled_shape() {
15576             long[] pooled_shape = Attribute.pooled_shape.access(long[].class, onnxAttributes);
15577             return pooled_shape.clone();
15578         }
15579 
15580     }
15581 
15582     public static MaxRoiPool MaxRoiPool(TypeElement resultType, Value X, Value rois, java.util.Optional<Float> spatial_scale, long[] pooled_shape) {
15583         return new MaxRoiPool(resultType, X, rois, spatial_scale, pooled_shape);
15584     }
15585 
15586     @OpFactoryHelper.OpDeclaration(MaxUnpool.NAME)
15587     public static final class MaxUnpool extends OnnxOp {
15588         public static final String NAME = "MaxUnpool";
15589 
15590         public enum Attribute implements OnnxAttribute {
15591             pads(long[].class, true, null),
15592             strides(long[].class, true, null),
15593             kernel_shape(long[].class, false, null),
15594             ;
15595 
15596                 final Class<?> t;
15597                 final boolean optional;
15598                 final Object defaultValue;
15599 
15600                 Attribute(Class<?> type, boolean optional, Object defaultValue) {
15601                     this.t = type;
15602                     this.optional = optional;
15603                     this.defaultValue = defaultValue;
15604                     assert optional || defaultValue == null;
15605                 }
15606 
15607                 public Class<?> type() {
15608                     return t;
15609                 }
15610 
15611                 public boolean isOptional() {
15612                     return optional;
15613                 }
15614 
15615                 public Object defaultValue() {
15616                     return defaultValue;
15617                 }
15618         }
15619 
15620         public enum TypeConstraint implements OnnxTypeConstraint {
15621             T1(new OnnxType.TypeVariable("T1", List.of(OnnxType.tensor(OnnxType.bfloat16()), OnnxType.tensor(OnnxType.float16()), OnnxType.tensor(OnnxType.float32()), OnnxType.tensor(OnnxType.float64())))),
15622             T2(new OnnxType.TypeVariable("T2", List.of(OnnxType.tensor(OnnxType.int64())))),
15623             ;
15624 
15625             final OnnxType.TypeVariable typeVariable;
15626 
15627             TypeConstraint(OnnxType.TypeVariable typeVariable) {
15628                 assert typeVariable.name().equals(name());
15629                 this.typeVariable = typeVariable;
15630             }
15631 
15632             @Override
15633             public OnnxType.TypeVariable typeVariable() {
15634                 return typeVariable;
15635             }
15636         }
15637 
15638         public enum InputParameter implements OnnxParameter {
15639             X(TypeConstraint.T1.typeVariable(), Quantifier.REQUIRED),
15640             I(TypeConstraint.T2.typeVariable(), Quantifier.REQUIRED),
15641             output_shape(TypeConstraint.T2.typeVariable(), Quantifier.OPTIONAL),
15642             ;
15643 
15644             final OnnxType type;
15645             final Quantifier quantifier;
15646 
15647             InputParameter(OnnxType type, Quantifier quantifier) {
15648                 this.type = type;
15649                 this.quantifier = quantifier;
15650             }
15651 
15652             @Override
15653             public OnnxType type() {
15654                 return type;
15655             }
15656 
15657             @Override
15658             public Quantifier quantifier() {
15659                 return quantifier;
15660             }
15661         }
15662 
15663         public enum OutputParameter implements OnnxParameter {
15664             output(TypeConstraint.T1.typeVariable(), Quantifier.REQUIRED),
15665             ;
15666 
15667             final OnnxType type;
15668             final Quantifier quantifier;
15669 
15670             OutputParameter(OnnxType type, Quantifier quantifier) {
15671                 this.type = type;
15672                 this.quantifier = quantifier;
15673             }
15674 
15675             @Override
15676             public OnnxType type() {
15677                 return type;
15678             }
15679 
15680             @Override
15681             public Quantifier quantifier() {
15682                 return quantifier;
15683             }
15684         }
15685 
15686         public static final OnnxSchema SCHEMA = new OnnxSchemaRecord(
15687                 NAME,
15688                 List.of(Attribute.values()),
15689                 List.of(TypeConstraint.values()),
15690                 List.of(InputParameter.values()),
15691                 List.of(OutputParameter.values())
15692         );
15693 
15694         public MaxUnpool(ExternalizedOp def) {
15695             super(SCHEMA, def);
15696         }
15697 
15698         MaxUnpool(MaxUnpool that, CopyContext cc) {
15699             super(that, cc);
15700         }
15701 
15702         @Override
15703         public MaxUnpool transform(CopyContext cc, OpTransformer ot) {
15704             return new MaxUnpool(this, cc);
15705         }
15706 
15707         MaxUnpool(TypeElement resultType, Value X, Value I, java.util.Optional<Value> output_shape, java.util.Optional<long[]> pads, java.util.Optional<long[]> strides, long[] kernel_shape) {
15708             super(SCHEMA, resultType, Set.of(), List.of(X, I, output_shape), List.of(pads, strides, kernel_shape));
15709         }
15710 
15711         @Override
15712         public SequencedSet<OnnxParameter> onnxOutputs() {
15713             return onnxOutputs(SCHEMA);
15714         }
15715 
15716         @Override
15717         public SequencedMap<OnnxParameter, Object> onnxInputs() {
15718             return onnxInputs(SCHEMA, List.of(X(), I(), output_shape()));
15719         }
15720 
15721         public Value X() {
15722             return operands().get(0);
15723         }
15724 
15725         public Value I() {
15726             return operands().get(1);
15727         }
15728 
15729         public java.util.Optional<Value> output_shape() {
15730             int i = optionalInputArguments.indexOf(InputParameter.output_shape);
15731             return i != -1 ? java.util.Optional.of(operands().get(2 + i)) : java.util.Optional.empty();
15732         }
15733 
15734         public java.util.Optional<long[]> pads() {
15735             long[] pads = Attribute.pads.access(long[].class, onnxAttributes);
15736             return java.util.Optional.ofNullable(pads).map(long[]::clone);
15737         }
15738 
15739         public java.util.Optional<long[]> strides() {
15740             long[] strides = Attribute.strides.access(long[].class, onnxAttributes);
15741             return java.util.Optional.ofNullable(strides).map(long[]::clone);
15742         }
15743 
15744         public long[] kernel_shape() {
15745             long[] kernel_shape = Attribute.kernel_shape.access(long[].class, onnxAttributes);
15746             return kernel_shape.clone();
15747         }
15748 
15749     }
15750 
15751     public static MaxUnpool MaxUnpool(TypeElement resultType, Value X, Value I, java.util.Optional<Value> output_shape, java.util.Optional<long[]> pads, java.util.Optional<long[]> strides, long[] kernel_shape) {
15752         return new MaxUnpool(resultType, X, I, output_shape, pads, strides, kernel_shape);
15753     }
15754 
15755     @OpFactoryHelper.OpDeclaration(Mean.NAME)
15756     public static final class Mean extends OnnxOp {
15757         public static final String NAME = "Mean";
15758 
15759         public enum Attribute implements OnnxAttribute.None { }
15760 
15761         public enum TypeConstraint implements OnnxTypeConstraint {
15762             T(new OnnxType.TypeVariable("T", List.of(OnnxType.tensor(OnnxType.float16()), OnnxType.tensor(OnnxType.float32()), OnnxType.tensor(OnnxType.float64()), OnnxType.tensor(OnnxType.bfloat16())))),
15763             ;
15764 
15765             final OnnxType.TypeVariable typeVariable;
15766 
15767             TypeConstraint(OnnxType.TypeVariable typeVariable) {
15768                 assert typeVariable.name().equals(name());
15769                 this.typeVariable = typeVariable;
15770             }
15771 
15772             @Override
15773             public OnnxType.TypeVariable typeVariable() {
15774                 return typeVariable;
15775             }
15776         }
15777 
15778         public enum InputParameter implements OnnxParameter {
15779             data_0(TypeConstraint.T.typeVariable(), Quantifier.VARIADIC),
15780             ;
15781 
15782             final OnnxType type;
15783             final Quantifier quantifier;
15784 
15785             InputParameter(OnnxType type, Quantifier quantifier) {
15786                 this.type = type;
15787                 this.quantifier = quantifier;
15788             }
15789 
15790             @Override
15791             public OnnxType type() {
15792                 return type;
15793             }
15794 
15795             @Override
15796             public Quantifier quantifier() {
15797                 return quantifier;
15798             }
15799         }
15800 
15801         public enum OutputParameter implements OnnxParameter {
15802             mean(TypeConstraint.T.typeVariable(), Quantifier.REQUIRED),
15803             ;
15804 
15805             final OnnxType type;
15806             final Quantifier quantifier;
15807 
15808             OutputParameter(OnnxType type, Quantifier quantifier) {
15809                 this.type = type;
15810                 this.quantifier = quantifier;
15811             }
15812 
15813             @Override
15814             public OnnxType type() {
15815                 return type;
15816             }
15817 
15818             @Override
15819             public Quantifier quantifier() {
15820                 return quantifier;
15821             }
15822         }
15823 
15824         public static final OnnxSchema SCHEMA = new OnnxSchemaRecord(
15825                 NAME,
15826                 List.of(Attribute.values()),
15827                 List.of(TypeConstraint.values()),
15828                 List.of(InputParameter.values()),
15829                 List.of(OutputParameter.values())
15830         );
15831 
15832         public Mean(ExternalizedOp def) {
15833             super(SCHEMA, def);
15834         }
15835 
15836         Mean(Mean that, CopyContext cc) {
15837             super(that, cc);
15838         }
15839 
15840         @Override
15841         public Mean transform(CopyContext cc, OpTransformer ot) {
15842             return new Mean(this, cc);
15843         }
15844 
15845         Mean(TypeElement resultType, List<Value> data_0) {
15846             super(SCHEMA, resultType, Set.of(), List.of(data_0), List.of());
15847         }
15848 
15849         @Override
15850         public SequencedSet<OnnxParameter> onnxOutputs() {
15851             return onnxOutputs(SCHEMA);
15852         }
15853 
15854         @Override
15855         public SequencedMap<OnnxParameter, Object> onnxInputs() {
15856             return onnxInputs(SCHEMA, List.of(data_0()));
15857         }
15858 
15859         public List<Value> data_0() {
15860             return operands();
15861         }
15862 
15863     }
15864 
15865     public static Mean Mean(TypeElement resultType, List<Value> data_0) {
15866         return new Mean(resultType, data_0);
15867     }
15868 
15869     @OpFactoryHelper.OpDeclaration(MeanVarianceNormalization.NAME)
15870     public static final class MeanVarianceNormalization extends OnnxOp {
15871         public static final String NAME = "MeanVarianceNormalization";
15872 
15873         public enum Attribute implements OnnxAttribute {
15874             axes(long[].class, true, null),
15875             ;
15876 
15877                 final Class<?> t;
15878                 final boolean optional;
15879                 final Object defaultValue;
15880 
15881                 Attribute(Class<?> type, boolean optional, Object defaultValue) {
15882                     this.t = type;
15883                     this.optional = optional;
15884                     this.defaultValue = defaultValue;
15885                     assert optional || defaultValue == null;
15886                 }
15887 
15888                 public Class<?> type() {
15889                     return t;
15890                 }
15891 
15892                 public boolean isOptional() {
15893                     return optional;
15894                 }
15895 
15896                 public Object defaultValue() {
15897                     return defaultValue;
15898                 }
15899         }
15900 
15901         public enum TypeConstraint implements OnnxTypeConstraint {
15902             T(new OnnxType.TypeVariable("T", List.of(OnnxType.tensor(OnnxType.float16()), OnnxType.tensor(OnnxType.float32()), OnnxType.tensor(OnnxType.float64()), OnnxType.tensor(OnnxType.bfloat16())))),
15903             ;
15904 
15905             final OnnxType.TypeVariable typeVariable;
15906 
15907             TypeConstraint(OnnxType.TypeVariable typeVariable) {
15908                 assert typeVariable.name().equals(name());
15909                 this.typeVariable = typeVariable;
15910             }
15911 
15912             @Override
15913             public OnnxType.TypeVariable typeVariable() {
15914                 return typeVariable;
15915             }
15916         }
15917 
15918         public enum InputParameter implements OnnxParameter {
15919             X(TypeConstraint.T.typeVariable(), Quantifier.REQUIRED),
15920             ;
15921 
15922             final OnnxType type;
15923             final Quantifier quantifier;
15924 
15925             InputParameter(OnnxType type, Quantifier quantifier) {
15926                 this.type = type;
15927                 this.quantifier = quantifier;
15928             }
15929 
15930             @Override
15931             public OnnxType type() {
15932                 return type;
15933             }
15934 
15935             @Override
15936             public Quantifier quantifier() {
15937                 return quantifier;
15938             }
15939         }
15940 
15941         public enum OutputParameter implements OnnxParameter {
15942             Y(TypeConstraint.T.typeVariable(), Quantifier.REQUIRED),
15943             ;
15944 
15945             final OnnxType type;
15946             final Quantifier quantifier;
15947 
15948             OutputParameter(OnnxType type, Quantifier quantifier) {
15949                 this.type = type;
15950                 this.quantifier = quantifier;
15951             }
15952 
15953             @Override
15954             public OnnxType type() {
15955                 return type;
15956             }
15957 
15958             @Override
15959             public Quantifier quantifier() {
15960                 return quantifier;
15961             }
15962         }
15963 
15964         public static final OnnxSchema SCHEMA = new OnnxSchemaRecord(
15965                 NAME,
15966                 List.of(Attribute.values()),
15967                 List.of(TypeConstraint.values()),
15968                 List.of(InputParameter.values()),
15969                 List.of(OutputParameter.values())
15970         );
15971 
15972         public MeanVarianceNormalization(ExternalizedOp def) {
15973             super(SCHEMA, def);
15974         }
15975 
15976         MeanVarianceNormalization(MeanVarianceNormalization that, CopyContext cc) {
15977             super(that, cc);
15978         }
15979 
15980         @Override
15981         public MeanVarianceNormalization transform(CopyContext cc, OpTransformer ot) {
15982             return new MeanVarianceNormalization(this, cc);
15983         }
15984 
15985         MeanVarianceNormalization(TypeElement resultType, Value X, java.util.Optional<long[]> axes) {
15986             super(SCHEMA, resultType, Set.of(), List.of(X), List.of(axes));
15987         }
15988 
15989         @Override
15990         public SequencedSet<OnnxParameter> onnxOutputs() {
15991             return onnxOutputs(SCHEMA);
15992         }
15993 
15994         @Override
15995         public SequencedMap<OnnxParameter, Object> onnxInputs() {
15996             return onnxInputs(SCHEMA, List.of(X()));
15997         }
15998 
15999         public Value X() {
16000             return operands().get(0);
16001         }
16002 
16003         public java.util.Optional<long[]> axes() {
16004             long[] axes = Attribute.axes.access(long[].class, onnxAttributes);
16005             return java.util.Optional.ofNullable(axes).map(long[]::clone);
16006         }
16007 
16008     }
16009 
16010     public static MeanVarianceNormalization MeanVarianceNormalization(TypeElement resultType, Value X, java.util.Optional<long[]> axes) {
16011         return new MeanVarianceNormalization(resultType, X, axes);
16012     }
16013 
16014     @OpFactoryHelper.OpDeclaration(MelWeightMatrix.NAME)
16015     public static final class MelWeightMatrix extends OnnxOp {
16016         public static final String NAME = "MelWeightMatrix";
16017 
16018         public enum Attribute implements OnnxAttribute {
16019             output_datatype(Long.class, true, 1),
16020             ;
16021 
16022                 final Class<?> t;
16023                 final boolean optional;
16024                 final Object defaultValue;
16025 
16026                 Attribute(Class<?> type, boolean optional, Object defaultValue) {
16027                     this.t = type;
16028                     this.optional = optional;
16029                     this.defaultValue = defaultValue;
16030                     assert optional || defaultValue == null;
16031                 }
16032 
16033                 public Class<?> type() {
16034                     return t;
16035                 }
16036 
16037                 public boolean isOptional() {
16038                     return optional;
16039                 }
16040 
16041                 public Object defaultValue() {
16042                     return defaultValue;
16043                 }
16044         }
16045 
16046         public enum TypeConstraint implements OnnxTypeConstraint {
16047             T1(new OnnxType.TypeVariable("T1", List.of(OnnxType.tensor(OnnxType.int32()), OnnxType.tensor(OnnxType.int64())))),
16048             T2(new OnnxType.TypeVariable("T2", List.of(OnnxType.tensor(OnnxType.float32()), OnnxType.tensor(OnnxType.float16()), OnnxType.tensor(OnnxType.float64()), OnnxType.tensor(OnnxType.bfloat16())))),
16049             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())))),
16050             ;
16051 
16052             final OnnxType.TypeVariable typeVariable;
16053 
16054             TypeConstraint(OnnxType.TypeVariable typeVariable) {
16055                 assert typeVariable.name().equals(name());
16056                 this.typeVariable = typeVariable;
16057             }
16058 
16059             @Override
16060             public OnnxType.TypeVariable typeVariable() {
16061                 return typeVariable;
16062             }
16063         }
16064 
16065         public enum InputParameter implements OnnxParameter {
16066             num_mel_bins(TypeConstraint.T1.typeVariable(), Quantifier.REQUIRED),
16067             dft_length(TypeConstraint.T1.typeVariable(), Quantifier.REQUIRED),
16068             sample_rate(TypeConstraint.T1.typeVariable(), Quantifier.REQUIRED),
16069             lower_edge_hertz(TypeConstraint.T2.typeVariable(), Quantifier.REQUIRED),
16070             upper_edge_hertz(TypeConstraint.T2.typeVariable(), Quantifier.REQUIRED),
16071             ;
16072 
16073             final OnnxType type;
16074             final Quantifier quantifier;
16075 
16076             InputParameter(OnnxType type, Quantifier quantifier) {
16077                 this.type = type;
16078                 this.quantifier = quantifier;
16079             }
16080 
16081             @Override
16082             public OnnxType type() {
16083                 return type;
16084             }
16085 
16086             @Override
16087             public Quantifier quantifier() {
16088                 return quantifier;
16089             }
16090         }
16091 
16092         public enum OutputParameter implements OnnxParameter {
16093             output(TypeConstraint.T3.typeVariable(), Quantifier.REQUIRED),
16094             ;
16095 
16096             final OnnxType type;
16097             final Quantifier quantifier;
16098 
16099             OutputParameter(OnnxType type, Quantifier quantifier) {
16100                 this.type = type;
16101                 this.quantifier = quantifier;
16102             }
16103 
16104             @Override
16105             public OnnxType type() {
16106                 return type;
16107             }
16108 
16109             @Override
16110             public Quantifier quantifier() {
16111                 return quantifier;
16112             }
16113         }
16114 
16115         public static final OnnxSchema SCHEMA = new OnnxSchemaRecord(
16116                 NAME,
16117                 List.of(Attribute.values()),
16118                 List.of(TypeConstraint.values()),
16119                 List.of(InputParameter.values()),
16120                 List.of(OutputParameter.values())
16121         );
16122 
16123         public MelWeightMatrix(ExternalizedOp def) {
16124             super(SCHEMA, def);
16125         }
16126 
16127         MelWeightMatrix(MelWeightMatrix that, CopyContext cc) {
16128             super(that, cc);
16129         }
16130 
16131         @Override
16132         public MelWeightMatrix transform(CopyContext cc, OpTransformer ot) {
16133             return new MelWeightMatrix(this, cc);
16134         }
16135 
16136         MelWeightMatrix(TypeElement resultType, Value num_mel_bins, Value dft_length, Value sample_rate, Value lower_edge_hertz, Value upper_edge_hertz, java.util.Optional<Long> output_datatype) {
16137             super(SCHEMA, resultType, Set.of(), List.of(num_mel_bins, dft_length, sample_rate, lower_edge_hertz, upper_edge_hertz), List.of(output_datatype));
16138         }
16139 
16140         @Override
16141         public SequencedSet<OnnxParameter> onnxOutputs() {
16142             return onnxOutputs(SCHEMA);
16143         }
16144 
16145         @Override
16146         public SequencedMap<OnnxParameter, Object> onnxInputs() {
16147             return onnxInputs(SCHEMA, List.of(num_mel_bins(), dft_length(), sample_rate(), lower_edge_hertz(), upper_edge_hertz()));
16148         }
16149 
16150         public Value num_mel_bins() {
16151             return operands().get(0);
16152         }
16153 
16154         public Value dft_length() {
16155             return operands().get(1);
16156         }
16157 
16158         public Value sample_rate() {
16159             return operands().get(2);
16160         }
16161 
16162         public Value lower_edge_hertz() {
16163             return operands().get(3);
16164         }
16165 
16166         public Value upper_edge_hertz() {
16167             return operands().get(4);
16168         }
16169 
16170         public java.util.Optional<Long> output_datatype() {
16171             Long output_datatype = Attribute.output_datatype.access(Long.class, onnxAttributes);
16172             return java.util.Optional.ofNullable(output_datatype);
16173         }
16174 
16175     }
16176 
16177     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<Long> output_datatype) {
16178         return new MelWeightMatrix(resultType, num_mel_bins, dft_length, sample_rate, lower_edge_hertz, upper_edge_hertz, output_datatype);
16179     }
16180 
16181     @OpFactoryHelper.OpDeclaration(Min.NAME)
16182     public static final class Min extends OnnxOp {
16183         public static final String NAME = "Min";
16184 
16185         public enum Attribute implements OnnxAttribute.None { }
16186 
16187         public enum TypeConstraint implements OnnxTypeConstraint {
16188             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())))),
16189             ;
16190 
16191             final OnnxType.TypeVariable typeVariable;
16192 
16193             TypeConstraint(OnnxType.TypeVariable typeVariable) {
16194                 assert typeVariable.name().equals(name());
16195                 this.typeVariable = typeVariable;
16196             }
16197 
16198             @Override
16199             public OnnxType.TypeVariable typeVariable() {
16200                 return typeVariable;
16201             }
16202         }
16203 
16204         public enum InputParameter implements OnnxParameter {
16205             data_0(TypeConstraint.T.typeVariable(), Quantifier.VARIADIC),
16206             ;
16207 
16208             final OnnxType type;
16209             final Quantifier quantifier;
16210 
16211             InputParameter(OnnxType type, Quantifier quantifier) {
16212                 this.type = type;
16213                 this.quantifier = quantifier;
16214             }
16215 
16216             @Override
16217             public OnnxType type() {
16218                 return type;
16219             }
16220 
16221             @Override
16222             public Quantifier quantifier() {
16223                 return quantifier;
16224             }
16225         }
16226 
16227         public enum OutputParameter implements OnnxParameter {
16228             min(TypeConstraint.T.typeVariable(), Quantifier.REQUIRED),
16229             ;
16230 
16231             final OnnxType type;
16232             final Quantifier quantifier;
16233 
16234             OutputParameter(OnnxType type, Quantifier quantifier) {
16235                 this.type = type;
16236                 this.quantifier = quantifier;
16237             }
16238 
16239             @Override
16240             public OnnxType type() {
16241                 return type;
16242             }
16243 
16244             @Override
16245             public Quantifier quantifier() {
16246                 return quantifier;
16247             }
16248         }
16249 
16250         public static final OnnxSchema SCHEMA = new OnnxSchemaRecord(
16251                 NAME,
16252                 List.of(Attribute.values()),
16253                 List.of(TypeConstraint.values()),
16254                 List.of(InputParameter.values()),
16255                 List.of(OutputParameter.values())
16256         );
16257 
16258         public Min(ExternalizedOp def) {
16259             super(SCHEMA, def);
16260         }
16261 
16262         Min(Min that, CopyContext cc) {
16263             super(that, cc);
16264         }
16265 
16266         @Override
16267         public Min transform(CopyContext cc, OpTransformer ot) {
16268             return new Min(this, cc);
16269         }
16270 
16271         Min(TypeElement resultType, List<Value> data_0) {
16272             super(SCHEMA, resultType, Set.of(), List.of(data_0), List.of());
16273         }
16274 
16275         @Override
16276         public SequencedSet<OnnxParameter> onnxOutputs() {
16277             return onnxOutputs(SCHEMA);
16278         }
16279 
16280         @Override
16281         public SequencedMap<OnnxParameter, Object> onnxInputs() {
16282             return onnxInputs(SCHEMA, List.of(data_0()));
16283         }
16284 
16285         public List<Value> data_0() {
16286             return operands();
16287         }
16288 
16289     }
16290 
16291     public static Min Min(TypeElement resultType, List<Value> data_0) {
16292         return new Min(resultType, data_0);
16293     }
16294 
16295     @OpFactoryHelper.OpDeclaration(Mish.NAME)
16296     public static final class Mish extends OnnxOp {
16297         public static final String NAME = "Mish";
16298 
16299         public enum Attribute implements OnnxAttribute.None { }
16300 
16301         public enum TypeConstraint implements OnnxTypeConstraint {
16302             T(new OnnxType.TypeVariable("T", List.of(OnnxType.tensor(OnnxType.bfloat16()), OnnxType.tensor(OnnxType.float16()), OnnxType.tensor(OnnxType.float32()), OnnxType.tensor(OnnxType.float64())))),
16303             ;
16304 
16305             final OnnxType.TypeVariable typeVariable;
16306 
16307             TypeConstraint(OnnxType.TypeVariable typeVariable) {
16308                 assert typeVariable.name().equals(name());
16309                 this.typeVariable = typeVariable;
16310             }
16311 
16312             @Override
16313             public OnnxType.TypeVariable typeVariable() {
16314                 return typeVariable;
16315             }
16316         }
16317 
16318         public enum InputParameter implements OnnxParameter {
16319             X(TypeConstraint.T.typeVariable(), Quantifier.REQUIRED),
16320             ;
16321 
16322             final OnnxType type;
16323             final Quantifier quantifier;
16324 
16325             InputParameter(OnnxType type, Quantifier quantifier) {
16326                 this.type = type;
16327                 this.quantifier = quantifier;
16328             }
16329 
16330             @Override
16331             public OnnxType type() {
16332                 return type;
16333             }
16334 
16335             @Override
16336             public Quantifier quantifier() {
16337                 return quantifier;
16338             }
16339         }
16340 
16341         public enum OutputParameter implements OnnxParameter {
16342             Y(TypeConstraint.T.typeVariable(), Quantifier.REQUIRED),
16343             ;
16344 
16345             final OnnxType type;
16346             final Quantifier quantifier;
16347 
16348             OutputParameter(OnnxType type, Quantifier quantifier) {
16349                 this.type = type;
16350                 this.quantifier = quantifier;
16351             }
16352 
16353             @Override
16354             public OnnxType type() {
16355                 return type;
16356             }
16357 
16358             @Override
16359             public Quantifier quantifier() {
16360                 return quantifier;
16361             }
16362         }
16363 
16364         public static final OnnxSchema SCHEMA = new OnnxSchemaRecord(
16365                 NAME,
16366                 List.of(Attribute.values()),
16367                 List.of(TypeConstraint.values()),
16368                 List.of(InputParameter.values()),
16369                 List.of(OutputParameter.values())
16370         );
16371 
16372         public Mish(ExternalizedOp def) {
16373             super(SCHEMA, def);
16374         }
16375 
16376         Mish(Mish that, CopyContext cc) {
16377             super(that, cc);
16378         }
16379 
16380         @Override
16381         public Mish transform(CopyContext cc, OpTransformer ot) {
16382             return new Mish(this, cc);
16383         }
16384 
16385         Mish(TypeElement resultType, Value X) {
16386             super(SCHEMA, resultType, Set.of(), List.of(X), List.of());
16387         }
16388 
16389         @Override
16390         public SequencedSet<OnnxParameter> onnxOutputs() {
16391             return onnxOutputs(SCHEMA);
16392         }
16393 
16394         @Override
16395         public SequencedMap<OnnxParameter, Object> onnxInputs() {
16396             return onnxInputs(SCHEMA, List.of(X()));
16397         }
16398 
16399         public Value X() {
16400             return operands().get(0);
16401         }
16402 
16403     }
16404 
16405     public static Mish Mish(TypeElement resultType, Value X) {
16406         return new Mish(resultType, X);
16407     }
16408 
16409     @OpFactoryHelper.OpDeclaration(Mod.NAME)
16410     public static final class Mod extends OnnxOp {
16411         public static final String NAME = "Mod";
16412 
16413         public enum Attribute implements OnnxAttribute {
16414             fmod(Long.class, true, 0),
16415             ;
16416 
16417                 final Class<?> t;
16418                 final boolean optional;
16419                 final Object defaultValue;
16420 
16421                 Attribute(Class<?> type, boolean optional, Object defaultValue) {
16422                     this.t = type;
16423                     this.optional = optional;
16424                     this.defaultValue = defaultValue;
16425                     assert optional || defaultValue == null;
16426                 }
16427 
16428                 public Class<?> type() {
16429                     return t;
16430                 }
16431 
16432                 public boolean isOptional() {
16433                     return optional;
16434                 }
16435 
16436                 public Object defaultValue() {
16437                     return defaultValue;
16438                 }
16439         }
16440 
16441         public enum TypeConstraint implements OnnxTypeConstraint {
16442             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())))),
16443             ;
16444 
16445             final OnnxType.TypeVariable typeVariable;
16446 
16447             TypeConstraint(OnnxType.TypeVariable typeVariable) {
16448                 assert typeVariable.name().equals(name());
16449                 this.typeVariable = typeVariable;
16450             }
16451 
16452             @Override
16453             public OnnxType.TypeVariable typeVariable() {
16454                 return typeVariable;
16455             }
16456         }
16457 
16458         public enum InputParameter implements OnnxParameter {
16459             A(TypeConstraint.T.typeVariable(), Quantifier.REQUIRED),
16460             B(TypeConstraint.T.typeVariable(), Quantifier.REQUIRED),
16461             ;
16462 
16463             final OnnxType type;
16464             final Quantifier quantifier;
16465 
16466             InputParameter(OnnxType type, Quantifier quantifier) {
16467                 this.type = type;
16468                 this.quantifier = quantifier;
16469             }
16470 
16471             @Override
16472             public OnnxType type() {
16473                 return type;
16474             }
16475 
16476             @Override
16477             public Quantifier quantifier() {
16478                 return quantifier;
16479             }
16480         }
16481 
16482         public enum OutputParameter implements OnnxParameter {
16483             C(TypeConstraint.T.typeVariable(), Quantifier.REQUIRED),
16484             ;
16485 
16486             final OnnxType type;
16487             final Quantifier quantifier;
16488 
16489             OutputParameter(OnnxType type, Quantifier quantifier) {
16490                 this.type = type;
16491                 this.quantifier = quantifier;
16492             }
16493 
16494             @Override
16495             public OnnxType type() {
16496                 return type;
16497             }
16498 
16499             @Override
16500             public Quantifier quantifier() {
16501                 return quantifier;
16502             }
16503         }
16504 
16505         public static final OnnxSchema SCHEMA = new OnnxSchemaRecord(
16506                 NAME,
16507                 List.of(Attribute.values()),
16508                 List.of(TypeConstraint.values()),
16509                 List.of(InputParameter.values()),
16510                 List.of(OutputParameter.values())
16511         );
16512 
16513         public Mod(ExternalizedOp def) {
16514             super(SCHEMA, def);
16515         }
16516 
16517         Mod(Mod that, CopyContext cc) {
16518             super(that, cc);
16519         }
16520 
16521         @Override
16522         public Mod transform(CopyContext cc, OpTransformer ot) {
16523             return new Mod(this, cc);
16524         }
16525 
16526         Mod(TypeElement resultType, Value A, Value B, java.util.Optional<Long> fmod) {
16527             super(SCHEMA, resultType, Set.of(), List.of(A, B), List.of(fmod));
16528         }
16529 
16530         @Override
16531         public SequencedSet<OnnxParameter> onnxOutputs() {
16532             return onnxOutputs(SCHEMA);
16533         }
16534 
16535         @Override
16536         public SequencedMap<OnnxParameter, Object> onnxInputs() {
16537             return onnxInputs(SCHEMA, List.of(A(), B()));
16538         }
16539 
16540         public Value A() {
16541             return operands().get(0);
16542         }
16543 
16544         public Value B() {
16545             return operands().get(1);
16546         }
16547 
16548         public java.util.Optional<Long> fmod() {
16549             Long fmod = Attribute.fmod.access(Long.class, onnxAttributes);
16550             return java.util.Optional.ofNullable(fmod);
16551         }
16552 
16553     }
16554 
16555     public static Mod Mod(TypeElement resultType, Value A, Value B, java.util.Optional<Long> fmod) {
16556         return new Mod(resultType, A, B, fmod);
16557     }
16558 
16559     @OpFactoryHelper.OpDeclaration(Momentum.NAME)
16560     public static final class Momentum extends OnnxOp {
16561         public static final String NAME = "Momentum";
16562 
16563         public enum Attribute implements OnnxAttribute {
16564             mode(String.class, false, null),
16565             norm_coefficient(Float.class, false, null),
16566             alpha(Float.class, false, null),
16567             beta(Float.class, false, null),
16568             ;
16569 
16570                 final Class<?> t;
16571                 final boolean optional;
16572                 final Object defaultValue;
16573 
16574                 Attribute(Class<?> type, boolean optional, Object defaultValue) {
16575                     this.t = type;
16576                     this.optional = optional;
16577                     this.defaultValue = defaultValue;
16578                     assert optional || defaultValue == null;
16579                 }
16580 
16581                 public Class<?> type() {
16582                     return t;
16583                 }
16584 
16585                 public boolean isOptional() {
16586                     return optional;
16587                 }
16588 
16589                 public Object defaultValue() {
16590                     return defaultValue;
16591                 }
16592         }
16593 
16594         public enum TypeConstraint implements OnnxTypeConstraint {
16595             T1(new OnnxType.TypeVariable("T1", List.of(OnnxType.tensor(OnnxType.float32()), OnnxType.tensor(OnnxType.float64())))),
16596             T2(new OnnxType.TypeVariable("T2", List.of(OnnxType.tensor(OnnxType.int64())))),
16597             T3(new OnnxType.TypeVariable("T3", List.of(OnnxType.tensor(OnnxType.float32()), OnnxType.tensor(OnnxType.float64())))),
16598             ;
16599 
16600             final OnnxType.TypeVariable typeVariable;
16601 
16602             TypeConstraint(OnnxType.TypeVariable typeVariable) {
16603                 assert typeVariable.name().equals(name());
16604                 this.typeVariable = typeVariable;
16605             }
16606 
16607             @Override
16608             public OnnxType.TypeVariable typeVariable() {
16609                 return typeVariable;
16610             }
16611         }
16612 
16613         public enum InputParameter implements OnnxParameter {
16614             R(TypeConstraint.T1.typeVariable(), Quantifier.REQUIRED),
16615             T(TypeConstraint.T2.typeVariable(), Quantifier.REQUIRED),
16616             inputs(TypeConstraint.T3.typeVariable(), Quantifier.VARIADIC),
16617             ;
16618 
16619             final OnnxType type;
16620             final Quantifier quantifier;
16621 
16622             InputParameter(OnnxType type, Quantifier quantifier) {
16623                 this.type = type;
16624                 this.quantifier = quantifier;
16625             }
16626 
16627             @Override
16628             public OnnxType type() {
16629                 return type;
16630             }
16631 
16632             @Override
16633             public Quantifier quantifier() {
16634                 return quantifier;
16635             }
16636         }
16637 
16638         public enum OutputParameter implements OnnxParameter {
16639             outputs(TypeConstraint.T3.typeVariable(), Quantifier.VARIADIC),
16640             ;
16641 
16642             final OnnxType type;
16643             final Quantifier quantifier;
16644 
16645             OutputParameter(OnnxType type, Quantifier quantifier) {
16646                 this.type = type;
16647                 this.quantifier = quantifier;
16648             }
16649 
16650             @Override
16651             public OnnxType type() {
16652                 return type;
16653             }
16654 
16655             @Override
16656             public Quantifier quantifier() {
16657                 return quantifier;
16658             }
16659         }
16660 
16661         public static final OnnxSchema SCHEMA = new OnnxSchemaRecord(
16662                 NAME,
16663                 List.of(Attribute.values()),
16664                 List.of(TypeConstraint.values()),
16665                 List.of(InputParameter.values()),
16666                 List.of(OutputParameter.values())
16667         );
16668 
16669         public Momentum(ExternalizedOp def) {
16670             super(SCHEMA, def);
16671         }
16672 
16673         Momentum(Momentum that, CopyContext cc) {
16674             super(that, cc);
16675         }
16676 
16677         @Override
16678         public Momentum transform(CopyContext cc, OpTransformer ot) {
16679             return new Momentum(this, cc);
16680         }
16681 
16682         Momentum(TypeElement resultType, Value R, Value T, List<Value> inputs, String mode, float norm_coefficient, float alpha, float beta) {
16683             super(SCHEMA, resultType, Set.of(), List.of(R, T, inputs), List.of(mode, norm_coefficient, alpha, beta));
16684         }
16685 
16686         @Override
16687         public SequencedSet<OnnxParameter> onnxOutputs() {
16688             return onnxOutputs(SCHEMA);
16689         }
16690 
16691         @Override
16692         public SequencedMap<OnnxParameter, Object> onnxInputs() {
16693             return onnxInputs(SCHEMA, List.of(R(), T(), inputs()));
16694         }
16695 
16696         public Value R() {
16697             return operands().get(0);
16698         }
16699 
16700         public Value T() {
16701             return operands().get(1);
16702         }
16703 
16704         public List<Value> inputs() {
16705             return operands().subList(2, operands().size());
16706         }
16707 
16708         public String mode() {
16709             String mode = Attribute.mode.access(String.class, onnxAttributes);
16710             return mode;
16711         }
16712 
16713         public float norm_coefficient() {
16714             float norm_coefficient = Attribute.norm_coefficient.access(Float.class, onnxAttributes);
16715             return norm_coefficient;
16716         }
16717 
16718         public float alpha() {
16719             float alpha = Attribute.alpha.access(Float.class, onnxAttributes);
16720             return alpha;
16721         }
16722 
16723         public float beta() {
16724             float beta = Attribute.beta.access(Float.class, onnxAttributes);
16725             return beta;
16726         }
16727 
16728     }
16729 
16730     public static Momentum Momentum(TypeElement resultType, Value R, Value T, List<Value> inputs, String mode, float norm_coefficient, float alpha, float beta) {
16731         return new Momentum(resultType, R, T, inputs, mode, norm_coefficient, alpha, beta);
16732     }
16733 
16734     @OpFactoryHelper.OpDeclaration(Mul.NAME)
16735     public static final class Mul extends OnnxOp {
16736         public static final String NAME = "Mul";
16737 
16738         public enum Attribute implements OnnxAttribute.None { }
16739 
16740         public enum TypeConstraint implements OnnxTypeConstraint {
16741             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())))),
16742             ;
16743 
16744             final OnnxType.TypeVariable typeVariable;
16745 
16746             TypeConstraint(OnnxType.TypeVariable typeVariable) {
16747                 assert typeVariable.name().equals(name());
16748                 this.typeVariable = typeVariable;
16749             }
16750 
16751             @Override
16752             public OnnxType.TypeVariable typeVariable() {
16753                 return typeVariable;
16754             }
16755         }
16756 
16757         public enum InputParameter implements OnnxParameter {
16758             A(TypeConstraint.T.typeVariable(), Quantifier.REQUIRED),
16759             B(TypeConstraint.T.typeVariable(), Quantifier.REQUIRED),
16760             ;
16761 
16762             final OnnxType type;
16763             final Quantifier quantifier;
16764 
16765             InputParameter(OnnxType type, Quantifier quantifier) {
16766                 this.type = type;
16767                 this.quantifier = quantifier;
16768             }
16769 
16770             @Override
16771             public OnnxType type() {
16772                 return type;
16773             }
16774 
16775             @Override
16776             public Quantifier quantifier() {
16777                 return quantifier;
16778             }
16779         }
16780 
16781         public enum OutputParameter implements OnnxParameter {
16782             C(TypeConstraint.T.typeVariable(), Quantifier.REQUIRED),
16783             ;
16784 
16785             final OnnxType type;
16786             final Quantifier quantifier;
16787 
16788             OutputParameter(OnnxType type, Quantifier quantifier) {
16789                 this.type = type;
16790                 this.quantifier = quantifier;
16791             }
16792 
16793             @Override
16794             public OnnxType type() {
16795                 return type;
16796             }
16797 
16798             @Override
16799             public Quantifier quantifier() {
16800                 return quantifier;
16801             }
16802         }
16803 
16804         public static final OnnxSchema SCHEMA = new OnnxSchemaRecord(
16805                 NAME,
16806                 List.of(Attribute.values()),
16807                 List.of(TypeConstraint.values()),
16808                 List.of(InputParameter.values()),
16809                 List.of(OutputParameter.values())
16810         );
16811 
16812         public Mul(ExternalizedOp def) {
16813             super(SCHEMA, def);
16814         }
16815 
16816         Mul(Mul that, CopyContext cc) {
16817             super(that, cc);
16818         }
16819 
16820         @Override
16821         public Mul transform(CopyContext cc, OpTransformer ot) {
16822             return new Mul(this, cc);
16823         }
16824 
16825         Mul(TypeElement resultType, Value A, Value B) {
16826             super(SCHEMA, resultType, Set.of(), List.of(A, B), List.of());
16827         }
16828 
16829         @Override
16830         public SequencedSet<OnnxParameter> onnxOutputs() {
16831             return onnxOutputs(SCHEMA);
16832         }
16833 
16834         @Override
16835         public SequencedMap<OnnxParameter, Object> onnxInputs() {
16836             return onnxInputs(SCHEMA, List.of(A(), B()));
16837         }
16838 
16839         public Value A() {
16840             return operands().get(0);
16841         }
16842 
16843         public Value B() {
16844             return operands().get(1);
16845         }
16846 
16847     }
16848 
16849     public static Mul Mul(TypeElement resultType, Value A, Value B) {
16850         return new Mul(resultType, A, B);
16851     }
16852 
16853     @OpFactoryHelper.OpDeclaration(Multinomial.NAME)
16854     public static final class Multinomial extends OnnxOp {
16855         public static final String NAME = "Multinomial";
16856 
16857         public enum Attribute implements OnnxAttribute {
16858             seed(Float.class, true, null),
16859             sample_size(Long.class, true, 1),
16860             dtype(Long.class, true, 6),
16861             ;
16862 
16863                 final Class<?> t;
16864                 final boolean optional;
16865                 final Object defaultValue;
16866 
16867                 Attribute(Class<?> type, boolean optional, Object defaultValue) {
16868                     this.t = type;
16869                     this.optional = optional;
16870                     this.defaultValue = defaultValue;
16871                     assert optional || defaultValue == null;
16872                 }
16873 
16874                 public Class<?> type() {
16875                     return t;
16876                 }
16877 
16878                 public boolean isOptional() {
16879                     return optional;
16880                 }
16881 
16882                 public Object defaultValue() {
16883                     return defaultValue;
16884                 }
16885         }
16886 
16887         public enum TypeConstraint implements OnnxTypeConstraint {
16888             T1(new OnnxType.TypeVariable("T1", List.of(OnnxType.tensor(OnnxType.bfloat16()), OnnxType.tensor(OnnxType.float16()), OnnxType.tensor(OnnxType.float32()), OnnxType.tensor(OnnxType.float64())))),
16889             T2(new OnnxType.TypeVariable("T2", List.of(OnnxType.tensor(OnnxType.int32()), OnnxType.tensor(OnnxType.int64())))),
16890             ;
16891 
16892             final OnnxType.TypeVariable typeVariable;
16893 
16894             TypeConstraint(OnnxType.TypeVariable typeVariable) {
16895                 assert typeVariable.name().equals(name());
16896                 this.typeVariable = typeVariable;
16897             }
16898 
16899             @Override
16900             public OnnxType.TypeVariable typeVariable() {
16901                 return typeVariable;
16902             }
16903         }
16904 
16905         public enum InputParameter implements OnnxParameter {
16906             input(TypeConstraint.T1.typeVariable(), Quantifier.REQUIRED),
16907             ;
16908 
16909             final OnnxType type;
16910             final Quantifier quantifier;
16911 
16912             InputParameter(OnnxType type, Quantifier quantifier) {
16913                 this.type = type;
16914                 this.quantifier = quantifier;
16915             }
16916 
16917             @Override
16918             public OnnxType type() {
16919                 return type;
16920             }
16921 
16922             @Override
16923             public Quantifier quantifier() {
16924                 return quantifier;
16925             }
16926         }
16927 
16928         public enum OutputParameter implements OnnxParameter {
16929             output(TypeConstraint.T2.typeVariable(), Quantifier.REQUIRED),
16930             ;
16931 
16932             final OnnxType type;
16933             final Quantifier quantifier;
16934 
16935             OutputParameter(OnnxType type, Quantifier quantifier) {
16936                 this.type = type;
16937                 this.quantifier = quantifier;
16938             }
16939 
16940             @Override
16941             public OnnxType type() {
16942                 return type;
16943             }
16944 
16945             @Override
16946             public Quantifier quantifier() {
16947                 return quantifier;
16948             }
16949         }
16950 
16951         public static final OnnxSchema SCHEMA = new OnnxSchemaRecord(
16952                 NAME,
16953                 List.of(Attribute.values()),
16954                 List.of(TypeConstraint.values()),
16955                 List.of(InputParameter.values()),
16956                 List.of(OutputParameter.values())
16957         );
16958 
16959         public Multinomial(ExternalizedOp def) {
16960             super(SCHEMA, def);
16961         }
16962 
16963         Multinomial(Multinomial that, CopyContext cc) {
16964             super(that, cc);
16965         }
16966 
16967         @Override
16968         public Multinomial transform(CopyContext cc, OpTransformer ot) {
16969             return new Multinomial(this, cc);
16970         }
16971 
16972         Multinomial(TypeElement resultType, Value input, java.util.Optional<Float> seed, java.util.Optional<Long> sample_size, java.util.Optional<Long> dtype) {
16973             super(SCHEMA, resultType, Set.of(), List.of(input), List.of(seed, sample_size, dtype));
16974         }
16975 
16976         @Override
16977         public SequencedSet<OnnxParameter> onnxOutputs() {
16978             return onnxOutputs(SCHEMA);
16979         }
16980 
16981         @Override
16982         public SequencedMap<OnnxParameter, Object> onnxInputs() {
16983             return onnxInputs(SCHEMA, List.of(input()));
16984         }
16985 
16986         public Value input() {
16987             return operands().get(0);
16988         }
16989 
16990         public java.util.Optional<Float> seed() {
16991             Float seed = Attribute.seed.access(Float.class, onnxAttributes);
16992             return java.util.Optional.ofNullable(seed);
16993         }
16994 
16995         public java.util.Optional<Long> sample_size() {
16996             Long sample_size = Attribute.sample_size.access(Long.class, onnxAttributes);
16997             return java.util.Optional.ofNullable(sample_size);
16998         }
16999 
17000         public java.util.Optional<Long> dtype() {
17001             Long dtype = Attribute.dtype.access(Long.class, onnxAttributes);
17002             return java.util.Optional.ofNullable(dtype);
17003         }
17004 
17005     }
17006 
17007     public static Multinomial Multinomial(TypeElement resultType, Value input, java.util.Optional<Float> seed, java.util.Optional<Long> sample_size, java.util.Optional<Long> dtype) {
17008         return new Multinomial(resultType, input, seed, sample_size, dtype);
17009     }
17010 
17011     @OpFactoryHelper.OpDeclaration(Neg.NAME)
17012     public static final class Neg extends OnnxOp {
17013         public static final String NAME = "Neg";
17014 
17015         public enum Attribute implements OnnxAttribute.None { }
17016 
17017         public enum TypeConstraint implements OnnxTypeConstraint {
17018             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())))),
17019             ;
17020 
17021             final OnnxType.TypeVariable typeVariable;
17022 
17023             TypeConstraint(OnnxType.TypeVariable typeVariable) {
17024                 assert typeVariable.name().equals(name());
17025                 this.typeVariable = typeVariable;
17026             }
17027 
17028             @Override
17029             public OnnxType.TypeVariable typeVariable() {
17030                 return typeVariable;
17031             }
17032         }
17033 
17034         public enum InputParameter implements OnnxParameter {
17035             X(TypeConstraint.T.typeVariable(), Quantifier.REQUIRED),
17036             ;
17037 
17038             final OnnxType type;
17039             final Quantifier quantifier;
17040 
17041             InputParameter(OnnxType type, Quantifier quantifier) {
17042                 this.type = type;
17043                 this.quantifier = quantifier;
17044             }
17045 
17046             @Override
17047             public OnnxType type() {
17048                 return type;
17049             }
17050 
17051             @Override
17052             public Quantifier quantifier() {
17053                 return quantifier;
17054             }
17055         }
17056 
17057         public enum OutputParameter implements OnnxParameter {
17058             Y(TypeConstraint.T.typeVariable(), Quantifier.REQUIRED),
17059             ;
17060 
17061             final OnnxType type;
17062             final Quantifier quantifier;
17063 
17064             OutputParameter(OnnxType type, Quantifier quantifier) {
17065                 this.type = type;
17066                 this.quantifier = quantifier;
17067             }
17068 
17069             @Override
17070             public OnnxType type() {
17071                 return type;
17072             }
17073 
17074             @Override
17075             public Quantifier quantifier() {
17076                 return quantifier;
17077             }
17078         }
17079 
17080         public static final OnnxSchema SCHEMA = new OnnxSchemaRecord(
17081                 NAME,
17082                 List.of(Attribute.values()),
17083                 List.of(TypeConstraint.values()),
17084                 List.of(InputParameter.values()),
17085                 List.of(OutputParameter.values())
17086         );
17087 
17088         public Neg(ExternalizedOp def) {
17089             super(SCHEMA, def);
17090         }
17091 
17092         Neg(Neg that, CopyContext cc) {
17093             super(that, cc);
17094         }
17095 
17096         @Override
17097         public Neg transform(CopyContext cc, OpTransformer ot) {
17098             return new Neg(this, cc);
17099         }
17100 
17101         Neg(TypeElement resultType, Value X) {
17102             super(SCHEMA, resultType, Set.of(), List.of(X), List.of());
17103         }
17104 
17105         @Override
17106         public SequencedSet<OnnxParameter> onnxOutputs() {
17107             return onnxOutputs(SCHEMA);
17108         }
17109 
17110         @Override
17111         public SequencedMap<OnnxParameter, Object> onnxInputs() {
17112             return onnxInputs(SCHEMA, List.of(X()));
17113         }
17114 
17115         public Value X() {
17116             return operands().get(0);
17117         }
17118 
17119     }
17120 
17121     public static Neg Neg(TypeElement resultType, Value X) {
17122         return new Neg(resultType, X);
17123     }
17124 
17125     @OpFactoryHelper.OpDeclaration(NegativeLogLikelihoodLoss.NAME)
17126     public static final class NegativeLogLikelihoodLoss extends OnnxOp {
17127         public static final String NAME = "NegativeLogLikelihoodLoss";
17128 
17129         public enum Attribute implements OnnxAttribute {
17130             ignore_index(Long.class, true, null),
17131             reduction(String.class, true, "mean"),
17132             ;
17133 
17134                 final Class<?> t;
17135                 final boolean optional;
17136                 final Object defaultValue;
17137 
17138                 Attribute(Class<?> type, boolean optional, Object defaultValue) {
17139                     this.t = type;
17140                     this.optional = optional;
17141                     this.defaultValue = defaultValue;
17142                     assert optional || defaultValue == null;
17143                 }
17144 
17145                 public Class<?> type() {
17146                     return t;
17147                 }
17148 
17149                 public boolean isOptional() {
17150                     return optional;
17151                 }
17152 
17153                 public Object defaultValue() {
17154                     return defaultValue;
17155                 }
17156         }
17157 
17158         public enum TypeConstraint implements OnnxTypeConstraint {
17159             T(new OnnxType.TypeVariable("T", List.of(OnnxType.tensor(OnnxType.bfloat16()), OnnxType.tensor(OnnxType.float16()), OnnxType.tensor(OnnxType.float32()), OnnxType.tensor(OnnxType.float64())))),
17160             Tind(new OnnxType.TypeVariable("Tind", List.of(OnnxType.tensor(OnnxType.int32()), OnnxType.tensor(OnnxType.int64())))),
17161             ;
17162 
17163             final OnnxType.TypeVariable typeVariable;
17164 
17165             TypeConstraint(OnnxType.TypeVariable typeVariable) {
17166                 assert typeVariable.name().equals(name());
17167                 this.typeVariable = typeVariable;
17168             }
17169 
17170             @Override
17171             public OnnxType.TypeVariable typeVariable() {
17172                 return typeVariable;
17173             }
17174         }
17175 
17176         public enum InputParameter implements OnnxParameter {
17177             input(TypeConstraint.T.typeVariable(), Quantifier.REQUIRED),
17178             target(TypeConstraint.Tind.typeVariable(), Quantifier.REQUIRED),
17179             weight(TypeConstraint.T.typeVariable(), Quantifier.OPTIONAL),
17180             ;
17181 
17182             final OnnxType type;
17183             final Quantifier quantifier;
17184 
17185             InputParameter(OnnxType type, Quantifier quantifier) {
17186                 this.type = type;
17187                 this.quantifier = quantifier;
17188             }
17189 
17190             @Override
17191             public OnnxType type() {
17192                 return type;
17193             }
17194 
17195             @Override
17196             public Quantifier quantifier() {
17197                 return quantifier;
17198             }
17199         }
17200 
17201         public enum OutputParameter implements OnnxParameter {
17202             loss(TypeConstraint.T.typeVariable(), Quantifier.REQUIRED),
17203             ;
17204 
17205             final OnnxType type;
17206             final Quantifier quantifier;
17207 
17208             OutputParameter(OnnxType type, Quantifier quantifier) {
17209                 this.type = type;
17210                 this.quantifier = quantifier;
17211             }
17212 
17213             @Override
17214             public OnnxType type() {
17215                 return type;
17216             }
17217 
17218             @Override
17219             public Quantifier quantifier() {
17220                 return quantifier;
17221             }
17222         }
17223 
17224         public static final OnnxSchema SCHEMA = new OnnxSchemaRecord(
17225                 NAME,
17226                 List.of(Attribute.values()),
17227                 List.of(TypeConstraint.values()),
17228                 List.of(InputParameter.values()),
17229                 List.of(OutputParameter.values())
17230         );
17231 
17232         public NegativeLogLikelihoodLoss(ExternalizedOp def) {
17233             super(SCHEMA, def);
17234         }
17235 
17236         NegativeLogLikelihoodLoss(NegativeLogLikelihoodLoss that, CopyContext cc) {
17237             super(that, cc);
17238         }
17239 
17240         @Override
17241         public NegativeLogLikelihoodLoss transform(CopyContext cc, OpTransformer ot) {
17242             return new NegativeLogLikelihoodLoss(this, cc);
17243         }
17244 
17245         NegativeLogLikelihoodLoss(TypeElement resultType, Value input, Value target, java.util.Optional<Value> weight, java.util.Optional<Long> ignore_index, java.util.Optional<String> reduction) {
17246             super(SCHEMA, resultType, Set.of(), List.of(input, target, weight), List.of(ignore_index, reduction));
17247         }
17248 
17249         @Override
17250         public SequencedSet<OnnxParameter> onnxOutputs() {
17251             return onnxOutputs(SCHEMA);
17252         }
17253 
17254         @Override
17255         public SequencedMap<OnnxParameter, Object> onnxInputs() {
17256             return onnxInputs(SCHEMA, List.of(input(), target(), weight()));
17257         }
17258 
17259         public Value input() {
17260             return operands().get(0);
17261         }
17262 
17263         public Value target() {
17264             return operands().get(1);
17265         }
17266 
17267         public java.util.Optional<Value> weight() {
17268             int i = optionalInputArguments.indexOf(InputParameter.weight);
17269             return i != -1 ? java.util.Optional.of(operands().get(2 + i)) : java.util.Optional.empty();
17270         }
17271 
17272         public java.util.Optional<Long> ignore_index() {
17273             Long ignore_index = Attribute.ignore_index.access(Long.class, onnxAttributes);
17274             return java.util.Optional.ofNullable(ignore_index);
17275         }
17276 
17277         public java.util.Optional<String> reduction() {
17278             String reduction = Attribute.reduction.access(String.class, onnxAttributes);
17279             return java.util.Optional.ofNullable(reduction);
17280         }
17281 
17282     }
17283 
17284     public static NegativeLogLikelihoodLoss NegativeLogLikelihoodLoss(TypeElement resultType, Value input, Value target, java.util.Optional<Value> weight, java.util.Optional<Long> ignore_index, java.util.Optional<String> reduction) {
17285         return new NegativeLogLikelihoodLoss(resultType, input, target, weight, ignore_index, reduction);
17286     }
17287 
17288     @OpFactoryHelper.OpDeclaration(NonMaxSuppression.NAME)
17289     public static final class NonMaxSuppression extends OnnxOp {
17290         public static final String NAME = "NonMaxSuppression";
17291 
17292         public enum Attribute implements OnnxAttribute {
17293             center_point_box(Long.class, true, 0),
17294             ;
17295 
17296                 final Class<?> t;
17297                 final boolean optional;
17298                 final Object defaultValue;
17299 
17300                 Attribute(Class<?> type, boolean optional, Object defaultValue) {
17301                     this.t = type;
17302                     this.optional = optional;
17303                     this.defaultValue = defaultValue;
17304                     assert optional || defaultValue == null;
17305                 }
17306 
17307                 public Class<?> type() {
17308                     return t;
17309                 }
17310 
17311                 public boolean isOptional() {
17312                     return optional;
17313                 }
17314 
17315                 public Object defaultValue() {
17316                     return defaultValue;
17317                 }
17318         }
17319 
17320         public enum TypeConstraint implements OnnxTypeConstraint.None { }
17321 
17322         public enum InputParameter implements OnnxParameter {
17323             boxes(OnnxType.tensor(OnnxType.float32()), Quantifier.REQUIRED),
17324             scores(OnnxType.tensor(OnnxType.float32()), Quantifier.REQUIRED),
17325             max_output_boxes_per_class(OnnxType.tensor(OnnxType.int64()), Quantifier.OPTIONAL),
17326             iou_threshold(OnnxType.tensor(OnnxType.float32()), Quantifier.OPTIONAL),
17327             score_threshold(OnnxType.tensor(OnnxType.float32()), Quantifier.OPTIONAL),
17328             ;
17329 
17330             final OnnxType type;
17331             final Quantifier quantifier;
17332 
17333             InputParameter(OnnxType type, Quantifier quantifier) {
17334                 this.type = type;
17335                 this.quantifier = quantifier;
17336             }
17337 
17338             @Override
17339             public OnnxType type() {
17340                 return type;
17341             }
17342 
17343             @Override
17344             public Quantifier quantifier() {
17345                 return quantifier;
17346             }
17347         }
17348 
17349         public enum OutputParameter implements OnnxParameter {
17350             selected_indices(OnnxType.tensor(OnnxType.int64()), Quantifier.REQUIRED),
17351             ;
17352 
17353             final OnnxType type;
17354             final Quantifier quantifier;
17355 
17356             OutputParameter(OnnxType type, Quantifier quantifier) {
17357                 this.type = type;
17358                 this.quantifier = quantifier;
17359             }
17360 
17361             @Override
17362             public OnnxType type() {
17363                 return type;
17364             }
17365 
17366             @Override
17367             public Quantifier quantifier() {
17368                 return quantifier;
17369             }
17370         }
17371 
17372         public static final OnnxSchema SCHEMA = new OnnxSchemaRecord(
17373                 NAME,
17374                 List.of(Attribute.values()),
17375                 List.of(TypeConstraint.values()),
17376                 List.of(InputParameter.values()),
17377                 List.of(OutputParameter.values())
17378         );
17379 
17380         public NonMaxSuppression(ExternalizedOp def) {
17381             super(SCHEMA, def);
17382         }
17383 
17384         NonMaxSuppression(NonMaxSuppression that, CopyContext cc) {
17385             super(that, cc);
17386         }
17387 
17388         @Override
17389         public NonMaxSuppression transform(CopyContext cc, OpTransformer ot) {
17390             return new NonMaxSuppression(this, cc);
17391         }
17392 
17393         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<Long> center_point_box) {
17394             super(SCHEMA, resultType, Set.of(), List.of(boxes, scores, max_output_boxes_per_class, iou_threshold, score_threshold), List.of(center_point_box));
17395         }
17396 
17397         @Override
17398         public SequencedSet<OnnxParameter> onnxOutputs() {
17399             return onnxOutputs(SCHEMA);
17400         }
17401 
17402         @Override
17403         public SequencedMap<OnnxParameter, Object> onnxInputs() {
17404             return onnxInputs(SCHEMA, List.of(boxes(), scores(), max_output_boxes_per_class(), iou_threshold(), score_threshold()));
17405         }
17406 
17407         public Value boxes() {
17408             return operands().get(0);
17409         }
17410 
17411         public Value scores() {
17412             return operands().get(1);
17413         }
17414 
17415         public java.util.Optional<Value> max_output_boxes_per_class() {
17416             int i = optionalInputArguments.indexOf(InputParameter.max_output_boxes_per_class);
17417             return i != -1 ? java.util.Optional.of(operands().get(2 + i)) : java.util.Optional.empty();
17418         }
17419 
17420         public java.util.Optional<Value> iou_threshold() {
17421             int i = optionalInputArguments.indexOf(InputParameter.iou_threshold);
17422             return i != -1 ? java.util.Optional.of(operands().get(2 + i)) : java.util.Optional.empty();
17423         }
17424 
17425         public java.util.Optional<Value> score_threshold() {
17426             int i = optionalInputArguments.indexOf(InputParameter.score_threshold);
17427             return i != -1 ? java.util.Optional.of(operands().get(2 + i)) : java.util.Optional.empty();
17428         }
17429 
17430         public java.util.Optional<Long> center_point_box() {
17431             Long center_point_box = Attribute.center_point_box.access(Long.class, onnxAttributes);
17432             return java.util.Optional.ofNullable(center_point_box);
17433         }
17434 
17435     }
17436 
17437     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<Long> center_point_box) {
17438         return new NonMaxSuppression(resultType, boxes, scores, max_output_boxes_per_class, iou_threshold, score_threshold, center_point_box);
17439     }
17440 
17441     @OpFactoryHelper.OpDeclaration(NonZero.NAME)
17442     public static final class NonZero extends OnnxOp {
17443         public static final String NAME = "NonZero";
17444 
17445         public enum Attribute implements OnnxAttribute.None { }
17446 
17447         public enum TypeConstraint implements OnnxTypeConstraint {
17448             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())))),
17449             ;
17450 
17451             final OnnxType.TypeVariable typeVariable;
17452 
17453             TypeConstraint(OnnxType.TypeVariable typeVariable) {
17454                 assert typeVariable.name().equals(name());
17455                 this.typeVariable = typeVariable;
17456             }
17457 
17458             @Override
17459             public OnnxType.TypeVariable typeVariable() {
17460                 return typeVariable;
17461             }
17462         }
17463 
17464         public enum InputParameter implements OnnxParameter {
17465             X(TypeConstraint.T.typeVariable(), Quantifier.REQUIRED),
17466             ;
17467 
17468             final OnnxType type;
17469             final Quantifier quantifier;
17470 
17471             InputParameter(OnnxType type, Quantifier quantifier) {
17472                 this.type = type;
17473                 this.quantifier = quantifier;
17474             }
17475 
17476             @Override
17477             public OnnxType type() {
17478                 return type;
17479             }
17480 
17481             @Override
17482             public Quantifier quantifier() {
17483                 return quantifier;
17484             }
17485         }
17486 
17487         public enum OutputParameter implements OnnxParameter {
17488             Y(OnnxType.tensor(OnnxType.int64()), Quantifier.REQUIRED),
17489             ;
17490 
17491             final OnnxType type;
17492             final Quantifier quantifier;
17493 
17494             OutputParameter(OnnxType type, Quantifier quantifier) {
17495                 this.type = type;
17496                 this.quantifier = quantifier;
17497             }
17498 
17499             @Override
17500             public OnnxType type() {
17501                 return type;
17502             }
17503 
17504             @Override
17505             public Quantifier quantifier() {
17506                 return quantifier;
17507             }
17508         }
17509 
17510         public static final OnnxSchema SCHEMA = new OnnxSchemaRecord(
17511                 NAME,
17512                 List.of(Attribute.values()),
17513                 List.of(TypeConstraint.values()),
17514                 List.of(InputParameter.values()),
17515                 List.of(OutputParameter.values())
17516         );
17517 
17518         public NonZero(ExternalizedOp def) {
17519             super(SCHEMA, def);
17520         }
17521 
17522         NonZero(NonZero that, CopyContext cc) {
17523             super(that, cc);
17524         }
17525 
17526         @Override
17527         public NonZero transform(CopyContext cc, OpTransformer ot) {
17528             return new NonZero(this, cc);
17529         }
17530 
17531         NonZero(TypeElement resultType, Value X) {
17532             super(SCHEMA, resultType, Set.of(), List.of(X), List.of());
17533         }
17534 
17535         @Override
17536         public SequencedSet<OnnxParameter> onnxOutputs() {
17537             return onnxOutputs(SCHEMA);
17538         }
17539 
17540         @Override
17541         public SequencedMap<OnnxParameter, Object> onnxInputs() {
17542             return onnxInputs(SCHEMA, List.of(X()));
17543         }
17544 
17545         public Value X() {
17546             return operands().get(0);
17547         }
17548 
17549     }
17550 
17551     public static NonZero NonZero(TypeElement resultType, Value X) {
17552         return new NonZero(resultType, X);
17553     }
17554 
17555     @OpFactoryHelper.OpDeclaration(Normalizer.NAME)
17556     public static final class Normalizer extends OnnxOp {
17557         public static final String NAME = "Normalizer";
17558 
17559         public enum Attribute implements OnnxAttribute {
17560             norm(String.class, true, "MAX"),
17561             ;
17562 
17563                 final Class<?> t;
17564                 final boolean optional;
17565                 final Object defaultValue;
17566 
17567                 Attribute(Class<?> type, boolean optional, Object defaultValue) {
17568                     this.t = type;
17569                     this.optional = optional;
17570                     this.defaultValue = defaultValue;
17571                     assert optional || defaultValue == null;
17572                 }
17573 
17574                 public Class<?> type() {
17575                     return t;
17576                 }
17577 
17578                 public boolean isOptional() {
17579                     return optional;
17580                 }
17581 
17582                 public Object defaultValue() {
17583                     return defaultValue;
17584                 }
17585         }
17586 
17587         public enum TypeConstraint implements OnnxTypeConstraint {
17588             T(new OnnxType.TypeVariable("T", List.of(OnnxType.tensor(OnnxType.float32()), OnnxType.tensor(OnnxType.float64()), OnnxType.tensor(OnnxType.int64()), OnnxType.tensor(OnnxType.int32())))),
17589             ;
17590 
17591             final OnnxType.TypeVariable typeVariable;
17592 
17593             TypeConstraint(OnnxType.TypeVariable typeVariable) {
17594                 assert typeVariable.name().equals(name());
17595                 this.typeVariable = typeVariable;
17596             }
17597 
17598             @Override
17599             public OnnxType.TypeVariable typeVariable() {
17600                 return typeVariable;
17601             }
17602         }
17603 
17604         public enum InputParameter implements OnnxParameter {
17605             X(TypeConstraint.T.typeVariable(), Quantifier.REQUIRED),
17606             ;
17607 
17608             final OnnxType type;
17609             final Quantifier quantifier;
17610 
17611             InputParameter(OnnxType type, Quantifier quantifier) {
17612                 this.type = type;
17613                 this.quantifier = quantifier;
17614             }
17615 
17616             @Override
17617             public OnnxType type() {
17618                 return type;
17619             }
17620 
17621             @Override
17622             public Quantifier quantifier() {
17623                 return quantifier;
17624             }
17625         }
17626 
17627         public enum OutputParameter implements OnnxParameter {
17628             Y(OnnxType.tensor(OnnxType.float32()), Quantifier.REQUIRED),
17629             ;
17630 
17631             final OnnxType type;
17632             final Quantifier quantifier;
17633 
17634             OutputParameter(OnnxType type, Quantifier quantifier) {
17635                 this.type = type;
17636                 this.quantifier = quantifier;
17637             }
17638 
17639             @Override
17640             public OnnxType type() {
17641                 return type;
17642             }
17643 
17644             @Override
17645             public Quantifier quantifier() {
17646                 return quantifier;
17647             }
17648         }
17649 
17650         public static final OnnxSchema SCHEMA = new OnnxSchemaRecord(
17651                 NAME,
17652                 List.of(Attribute.values()),
17653                 List.of(TypeConstraint.values()),
17654                 List.of(InputParameter.values()),
17655                 List.of(OutputParameter.values())
17656         );
17657 
17658         public Normalizer(ExternalizedOp def) {
17659             super(SCHEMA, def);
17660         }
17661 
17662         Normalizer(Normalizer that, CopyContext cc) {
17663             super(that, cc);
17664         }
17665 
17666         @Override
17667         public Normalizer transform(CopyContext cc, OpTransformer ot) {
17668             return new Normalizer(this, cc);
17669         }
17670 
17671         Normalizer(TypeElement resultType, Value X, java.util.Optional<String> norm) {
17672             super(SCHEMA, resultType, Set.of(), List.of(X), List.of(norm));
17673         }
17674 
17675         @Override
17676         public SequencedSet<OnnxParameter> onnxOutputs() {
17677             return onnxOutputs(SCHEMA);
17678         }
17679 
17680         @Override
17681         public SequencedMap<OnnxParameter, Object> onnxInputs() {
17682             return onnxInputs(SCHEMA, List.of(X()));
17683         }
17684 
17685         public Value X() {
17686             return operands().get(0);
17687         }
17688 
17689         public java.util.Optional<String> norm() {
17690             String norm = Attribute.norm.access(String.class, onnxAttributes);
17691             return java.util.Optional.ofNullable(norm);
17692         }
17693 
17694     }
17695 
17696     public static Normalizer Normalizer(TypeElement resultType, Value X, java.util.Optional<String> norm) {
17697         return new Normalizer(resultType, X, norm);
17698     }
17699 
17700     @OpFactoryHelper.OpDeclaration(Not.NAME)
17701     public static final class Not extends OnnxOp {
17702         public static final String NAME = "Not";
17703 
17704         public enum Attribute implements OnnxAttribute.None { }
17705 
17706         public enum TypeConstraint implements OnnxTypeConstraint {
17707             T(new OnnxType.TypeVariable("T", List.of(OnnxType.tensor(OnnxType.bool())))),
17708             ;
17709 
17710             final OnnxType.TypeVariable typeVariable;
17711 
17712             TypeConstraint(OnnxType.TypeVariable typeVariable) {
17713                 assert typeVariable.name().equals(name());
17714                 this.typeVariable = typeVariable;
17715             }
17716 
17717             @Override
17718             public OnnxType.TypeVariable typeVariable() {
17719                 return typeVariable;
17720             }
17721         }
17722 
17723         public enum InputParameter implements OnnxParameter {
17724             X(TypeConstraint.T.typeVariable(), Quantifier.REQUIRED),
17725             ;
17726 
17727             final OnnxType type;
17728             final Quantifier quantifier;
17729 
17730             InputParameter(OnnxType type, Quantifier quantifier) {
17731                 this.type = type;
17732                 this.quantifier = quantifier;
17733             }
17734 
17735             @Override
17736             public OnnxType type() {
17737                 return type;
17738             }
17739 
17740             @Override
17741             public Quantifier quantifier() {
17742                 return quantifier;
17743             }
17744         }
17745 
17746         public enum OutputParameter implements OnnxParameter {
17747             Y(TypeConstraint.T.typeVariable(), Quantifier.REQUIRED),
17748             ;
17749 
17750             final OnnxType type;
17751             final Quantifier quantifier;
17752 
17753             OutputParameter(OnnxType type, Quantifier quantifier) {
17754                 this.type = type;
17755                 this.quantifier = quantifier;
17756             }
17757 
17758             @Override
17759             public OnnxType type() {
17760                 return type;
17761             }
17762 
17763             @Override
17764             public Quantifier quantifier() {
17765                 return quantifier;
17766             }
17767         }
17768 
17769         public static final OnnxSchema SCHEMA = new OnnxSchemaRecord(
17770                 NAME,
17771                 List.of(Attribute.values()),
17772                 List.of(TypeConstraint.values()),
17773                 List.of(InputParameter.values()),
17774                 List.of(OutputParameter.values())
17775         );
17776 
17777         public Not(ExternalizedOp def) {
17778             super(SCHEMA, def);
17779         }
17780 
17781         Not(Not that, CopyContext cc) {
17782             super(that, cc);
17783         }
17784 
17785         @Override
17786         public Not transform(CopyContext cc, OpTransformer ot) {
17787             return new Not(this, cc);
17788         }
17789 
17790         Not(TypeElement resultType, Value X) {
17791             super(SCHEMA, resultType, Set.of(), List.of(X), List.of());
17792         }
17793 
17794         @Override
17795         public SequencedSet<OnnxParameter> onnxOutputs() {
17796             return onnxOutputs(SCHEMA);
17797         }
17798 
17799         @Override
17800         public SequencedMap<OnnxParameter, Object> onnxInputs() {
17801             return onnxInputs(SCHEMA, List.of(X()));
17802         }
17803 
17804         public Value X() {
17805             return operands().get(0);
17806         }
17807 
17808     }
17809 
17810     public static Not Not(TypeElement resultType, Value X) {
17811         return new Not(resultType, X);
17812     }
17813 
17814     @OpFactoryHelper.OpDeclaration(OneHot.NAME)
17815     public static final class OneHot extends OnnxOp {
17816         public static final String NAME = "OneHot";
17817 
17818         public enum Attribute implements OnnxAttribute {
17819             axis(Long.class, true, -1),
17820             ;
17821 
17822                 final Class<?> t;
17823                 final boolean optional;
17824                 final Object defaultValue;
17825 
17826                 Attribute(Class<?> type, boolean optional, Object defaultValue) {
17827                     this.t = type;
17828                     this.optional = optional;
17829                     this.defaultValue = defaultValue;
17830                     assert optional || defaultValue == null;
17831                 }
17832 
17833                 public Class<?> type() {
17834                     return t;
17835                 }
17836 
17837                 public boolean isOptional() {
17838                     return optional;
17839                 }
17840 
17841                 public Object defaultValue() {
17842                     return defaultValue;
17843                 }
17844         }
17845 
17846         public enum TypeConstraint implements OnnxTypeConstraint {
17847             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())))),
17848             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())))),
17849             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())))),
17850             ;
17851 
17852             final OnnxType.TypeVariable typeVariable;
17853 
17854             TypeConstraint(OnnxType.TypeVariable typeVariable) {
17855                 assert typeVariable.name().equals(name());
17856                 this.typeVariable = typeVariable;
17857             }
17858 
17859             @Override
17860             public OnnxType.TypeVariable typeVariable() {
17861                 return typeVariable;
17862             }
17863         }
17864 
17865         public enum InputParameter implements OnnxParameter {
17866             indices(TypeConstraint.T1.typeVariable(), Quantifier.REQUIRED),
17867             depth(TypeConstraint.T2.typeVariable(), Quantifier.REQUIRED),
17868             values(TypeConstraint.T3.typeVariable(), Quantifier.REQUIRED),
17869             ;
17870 
17871             final OnnxType type;
17872             final Quantifier quantifier;
17873 
17874             InputParameter(OnnxType type, Quantifier quantifier) {
17875                 this.type = type;
17876                 this.quantifier = quantifier;
17877             }
17878 
17879             @Override
17880             public OnnxType type() {
17881                 return type;
17882             }
17883 
17884             @Override
17885             public Quantifier quantifier() {
17886                 return quantifier;
17887             }
17888         }
17889 
17890         public enum OutputParameter implements OnnxParameter {
17891             output(TypeConstraint.T3.typeVariable(), Quantifier.REQUIRED),
17892             ;
17893 
17894             final OnnxType type;
17895             final Quantifier quantifier;
17896 
17897             OutputParameter(OnnxType type, Quantifier quantifier) {
17898                 this.type = type;
17899                 this.quantifier = quantifier;
17900             }
17901 
17902             @Override
17903             public OnnxType type() {
17904                 return type;
17905             }
17906 
17907             @Override
17908             public Quantifier quantifier() {
17909                 return quantifier;
17910             }
17911         }
17912 
17913         public static final OnnxSchema SCHEMA = new OnnxSchemaRecord(
17914                 NAME,
17915                 List.of(Attribute.values()),
17916                 List.of(TypeConstraint.values()),
17917                 List.of(InputParameter.values()),
17918                 List.of(OutputParameter.values())
17919         );
17920 
17921         public OneHot(ExternalizedOp def) {
17922             super(SCHEMA, def);
17923         }
17924 
17925         OneHot(OneHot that, CopyContext cc) {
17926             super(that, cc);
17927         }
17928 
17929         @Override
17930         public OneHot transform(CopyContext cc, OpTransformer ot) {
17931             return new OneHot(this, cc);
17932         }
17933 
17934         OneHot(TypeElement resultType, Value indices, Value depth, Value values, java.util.Optional<Long> axis) {
17935             super(SCHEMA, resultType, Set.of(), List.of(indices, depth, values), List.of(axis));
17936         }
17937 
17938         @Override
17939         public SequencedSet<OnnxParameter> onnxOutputs() {
17940             return onnxOutputs(SCHEMA);
17941         }
17942 
17943         @Override
17944         public SequencedMap<OnnxParameter, Object> onnxInputs() {
17945             return onnxInputs(SCHEMA, List.of(indices(), depth(), values()));
17946         }
17947 
17948         public Value indices() {
17949             return operands().get(0);
17950         }
17951 
17952         public Value depth() {
17953             return operands().get(1);
17954         }
17955 
17956         public Value values() {
17957             return operands().get(2);
17958         }
17959 
17960         public java.util.Optional<Long> axis() {
17961             Long axis = Attribute.axis.access(Long.class, onnxAttributes);
17962             return java.util.Optional.ofNullable(axis);
17963         }
17964 
17965     }
17966 
17967     public static OneHot OneHot(TypeElement resultType, Value indices, Value depth, Value values, java.util.Optional<Long> axis) {
17968         return new OneHot(resultType, indices, depth, values, axis);
17969     }
17970 
17971     @OpFactoryHelper.OpDeclaration(OneHotEncoder.NAME)
17972     public static final class OneHotEncoder extends OnnxOp {
17973         public static final String NAME = "OneHotEncoder";
17974 
17975         public enum Attribute implements OnnxAttribute {
17976             cats_strings(String[].class, true, null),
17977             cats_int64s(long[].class, true, null),
17978             zeros(Long.class, true, 1),
17979             ;
17980 
17981                 final Class<?> t;
17982                 final boolean optional;
17983                 final Object defaultValue;
17984 
17985                 Attribute(Class<?> type, boolean optional, Object defaultValue) {
17986                     this.t = type;
17987                     this.optional = optional;
17988                     this.defaultValue = defaultValue;
17989                     assert optional || defaultValue == null;
17990                 }
17991 
17992                 public Class<?> type() {
17993                     return t;
17994                 }
17995 
17996                 public boolean isOptional() {
17997                     return optional;
17998                 }
17999 
18000                 public Object defaultValue() {
18001                     return defaultValue;
18002                 }
18003         }
18004 
18005         public enum TypeConstraint implements OnnxTypeConstraint {
18006             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())))),
18007             ;
18008 
18009             final OnnxType.TypeVariable typeVariable;
18010 
18011             TypeConstraint(OnnxType.TypeVariable typeVariable) {
18012                 assert typeVariable.name().equals(name());
18013                 this.typeVariable = typeVariable;
18014             }
18015 
18016             @Override
18017             public OnnxType.TypeVariable typeVariable() {
18018                 return typeVariable;
18019             }
18020         }
18021 
18022         public enum InputParameter implements OnnxParameter {
18023             X(TypeConstraint.T.typeVariable(), Quantifier.REQUIRED),
18024             ;
18025 
18026             final OnnxType type;
18027             final Quantifier quantifier;
18028 
18029             InputParameter(OnnxType type, Quantifier quantifier) {
18030                 this.type = type;
18031                 this.quantifier = quantifier;
18032             }
18033 
18034             @Override
18035             public OnnxType type() {
18036                 return type;
18037             }
18038 
18039             @Override
18040             public Quantifier quantifier() {
18041                 return quantifier;
18042             }
18043         }
18044 
18045         public enum OutputParameter implements OnnxParameter {
18046             Y(OnnxType.tensor(OnnxType.float32()), Quantifier.REQUIRED),
18047             ;
18048 
18049             final OnnxType type;
18050             final Quantifier quantifier;
18051 
18052             OutputParameter(OnnxType type, Quantifier quantifier) {
18053                 this.type = type;
18054                 this.quantifier = quantifier;
18055             }
18056 
18057             @Override
18058             public OnnxType type() {
18059                 return type;
18060             }
18061 
18062             @Override
18063             public Quantifier quantifier() {
18064                 return quantifier;
18065             }
18066         }
18067 
18068         public static final OnnxSchema SCHEMA = new OnnxSchemaRecord(
18069                 NAME,
18070                 List.of(Attribute.values()),
18071                 List.of(TypeConstraint.values()),
18072                 List.of(InputParameter.values()),
18073                 List.of(OutputParameter.values())
18074         );
18075 
18076         public OneHotEncoder(ExternalizedOp def) {
18077             super(SCHEMA, def);
18078         }
18079 
18080         OneHotEncoder(OneHotEncoder that, CopyContext cc) {
18081             super(that, cc);
18082         }
18083 
18084         @Override
18085         public OneHotEncoder transform(CopyContext cc, OpTransformer ot) {
18086             return new OneHotEncoder(this, cc);
18087         }
18088 
18089         OneHotEncoder(TypeElement resultType, Value X, java.util.Optional<String[]> cats_strings, java.util.Optional<long[]> cats_int64s, java.util.Optional<Long> zeros) {
18090             super(SCHEMA, resultType, Set.of(), List.of(X), List.of(cats_strings, cats_int64s, zeros));
18091         }
18092 
18093         @Override
18094         public SequencedSet<OnnxParameter> onnxOutputs() {
18095             return onnxOutputs(SCHEMA);
18096         }
18097 
18098         @Override
18099         public SequencedMap<OnnxParameter, Object> onnxInputs() {
18100             return onnxInputs(SCHEMA, List.of(X()));
18101         }
18102 
18103         public Value X() {
18104             return operands().get(0);
18105         }
18106 
18107         public java.util.Optional<String[]> cats_strings() {
18108             String[] cats_strings = Attribute.cats_strings.access(String[].class, onnxAttributes);
18109             return java.util.Optional.ofNullable(cats_strings).map(String[]::clone);
18110         }
18111 
18112         public java.util.Optional<long[]> cats_int64s() {
18113             long[] cats_int64s = Attribute.cats_int64s.access(long[].class, onnxAttributes);
18114             return java.util.Optional.ofNullable(cats_int64s).map(long[]::clone);
18115         }
18116 
18117         public java.util.Optional<Long> zeros() {
18118             Long zeros = Attribute.zeros.access(Long.class, onnxAttributes);
18119             return java.util.Optional.ofNullable(zeros);
18120         }
18121 
18122     }
18123 
18124     public static OneHotEncoder OneHotEncoder(TypeElement resultType, Value X, java.util.Optional<String[]> cats_strings, java.util.Optional<long[]> cats_int64s, java.util.Optional<Long> zeros) {
18125         return new OneHotEncoder(resultType, X, cats_strings, cats_int64s, zeros);
18126     }
18127 
18128     @OpFactoryHelper.OpDeclaration(Optional.NAME)
18129     public static final class Optional extends OnnxOp {
18130         public static final String NAME = "Optional";
18131 
18132         public enum Attribute implements OnnxAttribute {
18133             type(Object.class, true, null),
18134             ;
18135 
18136                 final Class<?> t;
18137                 final boolean optional;
18138                 final Object defaultValue;
18139 
18140                 Attribute(Class<?> type, boolean optional, Object defaultValue) {
18141                     this.t = type;
18142                     this.optional = optional;
18143                     this.defaultValue = defaultValue;
18144                     assert optional || defaultValue == null;
18145                 }
18146 
18147                 public Class<?> type() {
18148                     return t;
18149                 }
18150 
18151                 public boolean isOptional() {
18152                     return optional;
18153                 }
18154 
18155                 public Object defaultValue() {
18156                     return defaultValue;
18157                 }
18158         }
18159 
18160         public enum TypeConstraint implements OnnxTypeConstraint {
18161             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()))))),
18162             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()))))),
18163             ;
18164 
18165             final OnnxType.TypeVariable typeVariable;
18166 
18167             TypeConstraint(OnnxType.TypeVariable typeVariable) {
18168                 assert typeVariable.name().equals(name());
18169                 this.typeVariable = typeVariable;
18170             }
18171 
18172             @Override
18173             public OnnxType.TypeVariable typeVariable() {
18174                 return typeVariable;
18175             }
18176         }
18177 
18178         public enum InputParameter implements OnnxParameter {
18179             input(TypeConstraint.V.typeVariable(), Quantifier.OPTIONAL),
18180             ;
18181 
18182             final OnnxType type;
18183             final Quantifier quantifier;
18184 
18185             InputParameter(OnnxType type, Quantifier quantifier) {
18186                 this.type = type;
18187                 this.quantifier = quantifier;
18188             }
18189 
18190             @Override
18191             public OnnxType type() {
18192                 return type;
18193             }
18194 
18195             @Override
18196             public Quantifier quantifier() {
18197                 return quantifier;
18198             }
18199         }
18200 
18201         public enum OutputParameter implements OnnxParameter {
18202             output(TypeConstraint.O.typeVariable(), Quantifier.REQUIRED),
18203             ;
18204 
18205             final OnnxType type;
18206             final Quantifier quantifier;
18207 
18208             OutputParameter(OnnxType type, Quantifier quantifier) {
18209                 this.type = type;
18210                 this.quantifier = quantifier;
18211             }
18212 
18213             @Override
18214             public OnnxType type() {
18215                 return type;
18216             }
18217 
18218             @Override
18219             public Quantifier quantifier() {
18220                 return quantifier;
18221             }
18222         }
18223 
18224         public static final OnnxSchema SCHEMA = new OnnxSchemaRecord(
18225                 NAME,
18226                 List.of(Attribute.values()),
18227                 List.of(TypeConstraint.values()),
18228                 List.of(InputParameter.values()),
18229                 List.of(OutputParameter.values())
18230         );
18231 
18232         public Optional(ExternalizedOp def) {
18233             super(SCHEMA, def);
18234         }
18235 
18236         Optional(Optional that, CopyContext cc) {
18237             super(that, cc);
18238         }
18239 
18240         @Override
18241         public Optional transform(CopyContext cc, OpTransformer ot) {
18242             return new Optional(this, cc);
18243         }
18244 
18245         Optional(TypeElement resultType, java.util.Optional<Value> input, java.util.Optional<Object> type) {
18246             super(SCHEMA, resultType, Set.of(), List.of(input), List.of(type));
18247         }
18248 
18249         @Override
18250         public SequencedSet<OnnxParameter> onnxOutputs() {
18251             return onnxOutputs(SCHEMA);
18252         }
18253 
18254         @Override
18255         public SequencedMap<OnnxParameter, Object> onnxInputs() {
18256             return onnxInputs(SCHEMA, List.of(input()));
18257         }
18258 
18259         public java.util.Optional<Value> input() {
18260             int i = optionalInputArguments.indexOf(InputParameter.input);
18261             return i != -1 ? java.util.Optional.of(operands().get(0 + i)) : java.util.Optional.empty();
18262         }
18263 
18264         public java.util.Optional<Object> type() {
18265             Object type = Attribute.type.access(Object.class, onnxAttributes);
18266             return java.util.Optional.ofNullable(type);
18267         }
18268 
18269     }
18270 
18271     public static Optional Optional(TypeElement resultType, java.util.Optional<Value> input, java.util.Optional<Object> type) {
18272         return new Optional(resultType, input, type);
18273     }
18274 
18275     @OpFactoryHelper.OpDeclaration(OptionalGetElement.NAME)
18276     public static final class OptionalGetElement extends OnnxOp {
18277         public static final String NAME = "OptionalGetElement";
18278 
18279         public enum Attribute implements OnnxAttribute.None { }
18280 
18281         public enum TypeConstraint implements OnnxTypeConstraint {
18282             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()))))),
18283             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()))))),
18284             ;
18285 
18286             final OnnxType.TypeVariable typeVariable;
18287 
18288             TypeConstraint(OnnxType.TypeVariable typeVariable) {
18289                 assert typeVariable.name().equals(name());
18290                 this.typeVariable = typeVariable;
18291             }
18292 
18293             @Override
18294             public OnnxType.TypeVariable typeVariable() {
18295                 return typeVariable;
18296             }
18297         }
18298 
18299         public enum InputParameter implements OnnxParameter {
18300             input(TypeConstraint.O.typeVariable(), Quantifier.REQUIRED),
18301             ;
18302 
18303             final OnnxType type;
18304             final Quantifier quantifier;
18305 
18306             InputParameter(OnnxType type, Quantifier quantifier) {
18307                 this.type = type;
18308                 this.quantifier = quantifier;
18309             }
18310 
18311             @Override
18312             public OnnxType type() {
18313                 return type;
18314             }
18315 
18316             @Override
18317             public Quantifier quantifier() {
18318                 return quantifier;
18319             }
18320         }
18321 
18322         public enum OutputParameter implements OnnxParameter {
18323             output(TypeConstraint.V.typeVariable(), Quantifier.REQUIRED),
18324             ;
18325 
18326             final OnnxType type;
18327             final Quantifier quantifier;
18328 
18329             OutputParameter(OnnxType type, Quantifier quantifier) {
18330                 this.type = type;
18331                 this.quantifier = quantifier;
18332             }
18333 
18334             @Override
18335             public OnnxType type() {
18336                 return type;
18337             }
18338 
18339             @Override
18340             public Quantifier quantifier() {
18341                 return quantifier;
18342             }
18343         }
18344 
18345         public static final OnnxSchema SCHEMA = new OnnxSchemaRecord(
18346                 NAME,
18347                 List.of(Attribute.values()),
18348                 List.of(TypeConstraint.values()),
18349                 List.of(InputParameter.values()),
18350                 List.of(OutputParameter.values())
18351         );
18352 
18353         public OptionalGetElement(ExternalizedOp def) {
18354             super(SCHEMA, def);
18355         }
18356 
18357         OptionalGetElement(OptionalGetElement that, CopyContext cc) {
18358             super(that, cc);
18359         }
18360 
18361         @Override
18362         public OptionalGetElement transform(CopyContext cc, OpTransformer ot) {
18363             return new OptionalGetElement(this, cc);
18364         }
18365 
18366         OptionalGetElement(TypeElement resultType, Value input) {
18367             super(SCHEMA, resultType, Set.of(), List.of(input), List.of());
18368         }
18369 
18370         @Override
18371         public SequencedSet<OnnxParameter> onnxOutputs() {
18372             return onnxOutputs(SCHEMA);
18373         }
18374 
18375         @Override
18376         public SequencedMap<OnnxParameter, Object> onnxInputs() {
18377             return onnxInputs(SCHEMA, List.of(input()));
18378         }
18379 
18380         public Value input() {
18381             return operands().get(0);
18382         }
18383 
18384     }
18385 
18386     public static OptionalGetElement OptionalGetElement(TypeElement resultType, Value input) {
18387         return new OptionalGetElement(resultType, input);
18388     }
18389 
18390     @OpFactoryHelper.OpDeclaration(OptionalHasElement.NAME)
18391     public static final class OptionalHasElement extends OnnxOp {
18392         public static final String NAME = "OptionalHasElement";
18393 
18394         public enum Attribute implements OnnxAttribute.None { }
18395 
18396         public enum TypeConstraint implements OnnxTypeConstraint {
18397             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()))))),
18398             B(new OnnxType.TypeVariable("B", List.of(OnnxType.tensor(OnnxType.bool())))),
18399             ;
18400 
18401             final OnnxType.TypeVariable typeVariable;
18402 
18403             TypeConstraint(OnnxType.TypeVariable typeVariable) {
18404                 assert typeVariable.name().equals(name());
18405                 this.typeVariable = typeVariable;
18406             }
18407 
18408             @Override
18409             public OnnxType.TypeVariable typeVariable() {
18410                 return typeVariable;
18411             }
18412         }
18413 
18414         public enum InputParameter implements OnnxParameter {
18415             input(TypeConstraint.O.typeVariable(), Quantifier.OPTIONAL),
18416             ;
18417 
18418             final OnnxType type;
18419             final Quantifier quantifier;
18420 
18421             InputParameter(OnnxType type, Quantifier quantifier) {
18422                 this.type = type;
18423                 this.quantifier = quantifier;
18424             }
18425 
18426             @Override
18427             public OnnxType type() {
18428                 return type;
18429             }
18430 
18431             @Override
18432             public Quantifier quantifier() {
18433                 return quantifier;
18434             }
18435         }
18436 
18437         public enum OutputParameter implements OnnxParameter {
18438             output(TypeConstraint.B.typeVariable(), Quantifier.REQUIRED),
18439             ;
18440 
18441             final OnnxType type;
18442             final Quantifier quantifier;
18443 
18444             OutputParameter(OnnxType type, Quantifier quantifier) {
18445                 this.type = type;
18446                 this.quantifier = quantifier;
18447             }
18448 
18449             @Override
18450             public OnnxType type() {
18451                 return type;
18452             }
18453 
18454             @Override
18455             public Quantifier quantifier() {
18456                 return quantifier;
18457             }
18458         }
18459 
18460         public static final OnnxSchema SCHEMA = new OnnxSchemaRecord(
18461                 NAME,
18462                 List.of(Attribute.values()),
18463                 List.of(TypeConstraint.values()),
18464                 List.of(InputParameter.values()),
18465                 List.of(OutputParameter.values())
18466         );
18467 
18468         public OptionalHasElement(ExternalizedOp def) {
18469             super(SCHEMA, def);
18470         }
18471 
18472         OptionalHasElement(OptionalHasElement that, CopyContext cc) {
18473             super(that, cc);
18474         }
18475 
18476         @Override
18477         public OptionalHasElement transform(CopyContext cc, OpTransformer ot) {
18478             return new OptionalHasElement(this, cc);
18479         }
18480 
18481         OptionalHasElement(TypeElement resultType, java.util.Optional<Value> input) {
18482             super(SCHEMA, resultType, Set.of(), List.of(input), List.of());
18483         }
18484 
18485         @Override
18486         public SequencedSet<OnnxParameter> onnxOutputs() {
18487             return onnxOutputs(SCHEMA);
18488         }
18489 
18490         @Override
18491         public SequencedMap<OnnxParameter, Object> onnxInputs() {
18492             return onnxInputs(SCHEMA, List.of(input()));
18493         }
18494 
18495         public java.util.Optional<Value> input() {
18496             int i = optionalInputArguments.indexOf(InputParameter.input);
18497             return i != -1 ? java.util.Optional.of(operands().get(0 + i)) : java.util.Optional.empty();
18498         }
18499 
18500     }
18501 
18502     public static OptionalHasElement OptionalHasElement(TypeElement resultType, java.util.Optional<Value> input) {
18503         return new OptionalHasElement(resultType, input);
18504     }
18505 
18506     @OpFactoryHelper.OpDeclaration(Or.NAME)
18507     public static final class Or extends OnnxOp {
18508         public static final String NAME = "Or";
18509 
18510         public enum Attribute implements OnnxAttribute.None { }
18511 
18512         public enum TypeConstraint implements OnnxTypeConstraint {
18513             T(new OnnxType.TypeVariable("T", List.of(OnnxType.tensor(OnnxType.bool())))),
18514             T1(new OnnxType.TypeVariable("T1", List.of(OnnxType.tensor(OnnxType.bool())))),
18515             ;
18516 
18517             final OnnxType.TypeVariable typeVariable;
18518 
18519             TypeConstraint(OnnxType.TypeVariable typeVariable) {
18520                 assert typeVariable.name().equals(name());
18521                 this.typeVariable = typeVariable;
18522             }
18523 
18524             @Override
18525             public OnnxType.TypeVariable typeVariable() {
18526                 return typeVariable;
18527             }
18528         }
18529 
18530         public enum InputParameter implements OnnxParameter {
18531             A(TypeConstraint.T.typeVariable(), Quantifier.REQUIRED),
18532             B(TypeConstraint.T.typeVariable(), Quantifier.REQUIRED),
18533             ;
18534 
18535             final OnnxType type;
18536             final Quantifier quantifier;
18537 
18538             InputParameter(OnnxType type, Quantifier quantifier) {
18539                 this.type = type;
18540                 this.quantifier = quantifier;
18541             }
18542 
18543             @Override
18544             public OnnxType type() {
18545                 return type;
18546             }
18547 
18548             @Override
18549             public Quantifier quantifier() {
18550                 return quantifier;
18551             }
18552         }
18553 
18554         public enum OutputParameter implements OnnxParameter {
18555             C(TypeConstraint.T1.typeVariable(), Quantifier.REQUIRED),
18556             ;
18557 
18558             final OnnxType type;
18559             final Quantifier quantifier;
18560 
18561             OutputParameter(OnnxType type, Quantifier quantifier) {
18562                 this.type = type;
18563                 this.quantifier = quantifier;
18564             }
18565 
18566             @Override
18567             public OnnxType type() {
18568                 return type;
18569             }
18570 
18571             @Override
18572             public Quantifier quantifier() {
18573                 return quantifier;
18574             }
18575         }
18576 
18577         public static final OnnxSchema SCHEMA = new OnnxSchemaRecord(
18578                 NAME,
18579                 List.of(Attribute.values()),
18580                 List.of(TypeConstraint.values()),
18581                 List.of(InputParameter.values()),
18582                 List.of(OutputParameter.values())
18583         );
18584 
18585         public Or(ExternalizedOp def) {
18586             super(SCHEMA, def);
18587         }
18588 
18589         Or(Or that, CopyContext cc) {
18590             super(that, cc);
18591         }
18592 
18593         @Override
18594         public Or transform(CopyContext cc, OpTransformer ot) {
18595             return new Or(this, cc);
18596         }
18597 
18598         Or(TypeElement resultType, Value A, Value B) {
18599             super(SCHEMA, resultType, Set.of(), List.of(A, B), List.of());
18600         }
18601 
18602         @Override
18603         public SequencedSet<OnnxParameter> onnxOutputs() {
18604             return onnxOutputs(SCHEMA);
18605         }
18606 
18607         @Override
18608         public SequencedMap<OnnxParameter, Object> onnxInputs() {
18609             return onnxInputs(SCHEMA, List.of(A(), B()));
18610         }
18611 
18612         public Value A() {
18613             return operands().get(0);
18614         }
18615 
18616         public Value B() {
18617             return operands().get(1);
18618         }
18619 
18620     }
18621 
18622     public static Or Or(TypeElement resultType, Value A, Value B) {
18623         return new Or(resultType, A, B);
18624     }
18625 
18626     @OpFactoryHelper.OpDeclaration(PRelu.NAME)
18627     public static final class PRelu extends OnnxOp {
18628         public static final String NAME = "PRelu";
18629 
18630         public enum Attribute implements OnnxAttribute.None { }
18631 
18632         public enum TypeConstraint implements OnnxTypeConstraint {
18633             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())))),
18634             ;
18635 
18636             final OnnxType.TypeVariable typeVariable;
18637 
18638             TypeConstraint(OnnxType.TypeVariable typeVariable) {
18639                 assert typeVariable.name().equals(name());
18640                 this.typeVariable = typeVariable;
18641             }
18642 
18643             @Override
18644             public OnnxType.TypeVariable typeVariable() {
18645                 return typeVariable;
18646             }
18647         }
18648 
18649         public enum InputParameter implements OnnxParameter {
18650             X(TypeConstraint.T.typeVariable(), Quantifier.REQUIRED),
18651             slope(TypeConstraint.T.typeVariable(), Quantifier.REQUIRED),
18652             ;
18653 
18654             final OnnxType type;
18655             final Quantifier quantifier;
18656 
18657             InputParameter(OnnxType type, Quantifier quantifier) {
18658                 this.type = type;
18659                 this.quantifier = quantifier;
18660             }
18661 
18662             @Override
18663             public OnnxType type() {
18664                 return type;
18665             }
18666 
18667             @Override
18668             public Quantifier quantifier() {
18669                 return quantifier;
18670             }
18671         }
18672 
18673         public enum OutputParameter implements OnnxParameter {
18674             Y(TypeConstraint.T.typeVariable(), Quantifier.REQUIRED),
18675             ;
18676 
18677             final OnnxType type;
18678             final Quantifier quantifier;
18679 
18680             OutputParameter(OnnxType type, Quantifier quantifier) {
18681                 this.type = type;
18682                 this.quantifier = quantifier;
18683             }
18684 
18685             @Override
18686             public OnnxType type() {
18687                 return type;
18688             }
18689 
18690             @Override
18691             public Quantifier quantifier() {
18692                 return quantifier;
18693             }
18694         }
18695 
18696         public static final OnnxSchema SCHEMA = new OnnxSchemaRecord(
18697                 NAME,
18698                 List.of(Attribute.values()),
18699                 List.of(TypeConstraint.values()),
18700                 List.of(InputParameter.values()),
18701                 List.of(OutputParameter.values())
18702         );
18703 
18704         public PRelu(ExternalizedOp def) {
18705             super(SCHEMA, def);
18706         }
18707 
18708         PRelu(PRelu that, CopyContext cc) {
18709             super(that, cc);
18710         }
18711 
18712         @Override
18713         public PRelu transform(CopyContext cc, OpTransformer ot) {
18714             return new PRelu(this, cc);
18715         }
18716 
18717         PRelu(TypeElement resultType, Value X, Value slope) {
18718             super(SCHEMA, resultType, Set.of(), List.of(X, slope), List.of());
18719         }
18720 
18721         @Override
18722         public SequencedSet<OnnxParameter> onnxOutputs() {
18723             return onnxOutputs(SCHEMA);
18724         }
18725 
18726         @Override
18727         public SequencedMap<OnnxParameter, Object> onnxInputs() {
18728             return onnxInputs(SCHEMA, List.of(X(), slope()));
18729         }
18730 
18731         public Value X() {
18732             return operands().get(0);
18733         }
18734 
18735         public Value slope() {
18736             return operands().get(1);
18737         }
18738 
18739     }
18740 
18741     public static PRelu PRelu(TypeElement resultType, Value X, Value slope) {
18742         return new PRelu(resultType, X, slope);
18743     }
18744 
18745     @OpFactoryHelper.OpDeclaration(Pad.NAME)
18746     public static final class Pad extends OnnxOp {
18747         public static final String NAME = "Pad";
18748 
18749         public enum Attribute implements OnnxAttribute {
18750             mode(String.class, true, "constant"),
18751             ;
18752 
18753                 final Class<?> t;
18754                 final boolean optional;
18755                 final Object defaultValue;
18756 
18757                 Attribute(Class<?> type, boolean optional, Object defaultValue) {
18758                     this.t = type;
18759                     this.optional = optional;
18760                     this.defaultValue = defaultValue;
18761                     assert optional || defaultValue == null;
18762                 }
18763 
18764                 public Class<?> type() {
18765                     return t;
18766                 }
18767 
18768                 public boolean isOptional() {
18769                     return optional;
18770                 }
18771 
18772                 public Object defaultValue() {
18773                     return defaultValue;
18774                 }
18775         }
18776 
18777         public enum TypeConstraint implements OnnxTypeConstraint {
18778             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())))),
18779             Tind(new OnnxType.TypeVariable("Tind", List.of(OnnxType.tensor(OnnxType.int32()), OnnxType.tensor(OnnxType.int64())))),
18780             ;
18781 
18782             final OnnxType.TypeVariable typeVariable;
18783 
18784             TypeConstraint(OnnxType.TypeVariable typeVariable) {
18785                 assert typeVariable.name().equals(name());
18786                 this.typeVariable = typeVariable;
18787             }
18788 
18789             @Override
18790             public OnnxType.TypeVariable typeVariable() {
18791                 return typeVariable;
18792             }
18793         }
18794 
18795         public enum InputParameter implements OnnxParameter {
18796             data(TypeConstraint.T.typeVariable(), Quantifier.REQUIRED),
18797             pads(OnnxType.tensor(OnnxType.int64()), Quantifier.REQUIRED),
18798             constant_value(TypeConstraint.T.typeVariable(), Quantifier.OPTIONAL),
18799             axes(TypeConstraint.Tind.typeVariable(), Quantifier.OPTIONAL),
18800             ;
18801 
18802             final OnnxType type;
18803             final Quantifier quantifier;
18804 
18805             InputParameter(OnnxType type, Quantifier quantifier) {
18806                 this.type = type;
18807                 this.quantifier = quantifier;
18808             }
18809 
18810             @Override
18811             public OnnxType type() {
18812                 return type;
18813             }
18814 
18815             @Override
18816             public Quantifier quantifier() {
18817                 return quantifier;
18818             }
18819         }
18820 
18821         public enum OutputParameter implements OnnxParameter {
18822             output(TypeConstraint.T.typeVariable(), Quantifier.REQUIRED),
18823             ;
18824 
18825             final OnnxType type;
18826             final Quantifier quantifier;
18827 
18828             OutputParameter(OnnxType type, Quantifier quantifier) {
18829                 this.type = type;
18830                 this.quantifier = quantifier;
18831             }
18832 
18833             @Override
18834             public OnnxType type() {
18835                 return type;
18836             }
18837 
18838             @Override
18839             public Quantifier quantifier() {
18840                 return quantifier;
18841             }
18842         }
18843 
18844         public static final OnnxSchema SCHEMA = new OnnxSchemaRecord(
18845                 NAME,
18846                 List.of(Attribute.values()),
18847                 List.of(TypeConstraint.values()),
18848                 List.of(InputParameter.values()),
18849                 List.of(OutputParameter.values())
18850         );
18851 
18852         public Pad(ExternalizedOp def) {
18853             super(SCHEMA, def);
18854         }
18855 
18856         Pad(Pad that, CopyContext cc) {
18857             super(that, cc);
18858         }
18859 
18860         @Override
18861         public Pad transform(CopyContext cc, OpTransformer ot) {
18862             return new Pad(this, cc);
18863         }
18864 
18865         Pad(TypeElement resultType, Value data, Value pads, java.util.Optional<Value> constant_value, java.util.Optional<Value> axes, java.util.Optional<String> mode) {
18866             super(SCHEMA, resultType, Set.of(), List.of(data, pads, constant_value, axes), List.of(mode));
18867         }
18868 
18869         @Override
18870         public SequencedSet<OnnxParameter> onnxOutputs() {
18871             return onnxOutputs(SCHEMA);
18872         }
18873 
18874         @Override
18875         public SequencedMap<OnnxParameter, Object> onnxInputs() {
18876             return onnxInputs(SCHEMA, List.of(data(), pads(), constant_value(), axes()));
18877         }
18878 
18879         public Value data() {
18880             return operands().get(0);
18881         }
18882 
18883         public Value pads() {
18884             return operands().get(1);
18885         }
18886 
18887         public java.util.Optional<Value> constant_value() {
18888             int i = optionalInputArguments.indexOf(InputParameter.constant_value);
18889             return i != -1 ? java.util.Optional.of(operands().get(2 + i)) : java.util.Optional.empty();
18890         }
18891 
18892         public java.util.Optional<Value> axes() {
18893             int i = optionalInputArguments.indexOf(InputParameter.axes);
18894             return i != -1 ? java.util.Optional.of(operands().get(2 + i)) : java.util.Optional.empty();
18895         }
18896 
18897         public java.util.Optional<String> mode() {
18898             String mode = Attribute.mode.access(String.class, onnxAttributes);
18899             return java.util.Optional.ofNullable(mode);
18900         }
18901 
18902     }
18903 
18904     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) {
18905         return new Pad(resultType, data, pads, constant_value, axes, mode);
18906     }
18907 
18908     @OpFactoryHelper.OpDeclaration(Pow.NAME)
18909     public static final class Pow extends OnnxOp {
18910         public static final String NAME = "Pow";
18911 
18912         public enum Attribute implements OnnxAttribute.None { }
18913 
18914         public enum TypeConstraint implements OnnxTypeConstraint {
18915             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())))),
18916             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())))),
18917             ;
18918 
18919             final OnnxType.TypeVariable typeVariable;
18920 
18921             TypeConstraint(OnnxType.TypeVariable typeVariable) {
18922                 assert typeVariable.name().equals(name());
18923                 this.typeVariable = typeVariable;
18924             }
18925 
18926             @Override
18927             public OnnxType.TypeVariable typeVariable() {
18928                 return typeVariable;
18929             }
18930         }
18931 
18932         public enum InputParameter implements OnnxParameter {
18933             X(TypeConstraint.T.typeVariable(), Quantifier.REQUIRED),
18934             Y(TypeConstraint.T1.typeVariable(), Quantifier.REQUIRED),
18935             ;
18936 
18937             final OnnxType type;
18938             final Quantifier quantifier;
18939 
18940             InputParameter(OnnxType type, Quantifier quantifier) {
18941                 this.type = type;
18942                 this.quantifier = quantifier;
18943             }
18944 
18945             @Override
18946             public OnnxType type() {
18947                 return type;
18948             }
18949 
18950             @Override
18951             public Quantifier quantifier() {
18952                 return quantifier;
18953             }
18954         }
18955 
18956         public enum OutputParameter implements OnnxParameter {
18957             Z(TypeConstraint.T.typeVariable(), Quantifier.REQUIRED),
18958             ;
18959 
18960             final OnnxType type;
18961             final Quantifier quantifier;
18962 
18963             OutputParameter(OnnxType type, Quantifier quantifier) {
18964                 this.type = type;
18965                 this.quantifier = quantifier;
18966             }
18967 
18968             @Override
18969             public OnnxType type() {
18970                 return type;
18971             }
18972 
18973             @Override
18974             public Quantifier quantifier() {
18975                 return quantifier;
18976             }
18977         }
18978 
18979         public static final OnnxSchema SCHEMA = new OnnxSchemaRecord(
18980                 NAME,
18981                 List.of(Attribute.values()),
18982                 List.of(TypeConstraint.values()),
18983                 List.of(InputParameter.values()),
18984                 List.of(OutputParameter.values())
18985         );
18986 
18987         public Pow(ExternalizedOp def) {
18988             super(SCHEMA, def);
18989         }
18990 
18991         Pow(Pow that, CopyContext cc) {
18992             super(that, cc);
18993         }
18994 
18995         @Override
18996         public Pow transform(CopyContext cc, OpTransformer ot) {
18997             return new Pow(this, cc);
18998         }
18999 
19000         Pow(TypeElement resultType, Value X, Value Y) {
19001             super(SCHEMA, resultType, Set.of(), List.of(X, Y), List.of());
19002         }
19003 
19004         @Override
19005         public SequencedSet<OnnxParameter> onnxOutputs() {
19006             return onnxOutputs(SCHEMA);
19007         }
19008 
19009         @Override
19010         public SequencedMap<OnnxParameter, Object> onnxInputs() {
19011             return onnxInputs(SCHEMA, List.of(X(), Y()));
19012         }
19013 
19014         public Value X() {
19015             return operands().get(0);
19016         }
19017 
19018         public Value Y() {
19019             return operands().get(1);
19020         }
19021 
19022     }
19023 
19024     public static Pow Pow(TypeElement resultType, Value X, Value Y) {
19025         return new Pow(resultType, X, Y);
19026     }
19027 
19028     @OpFactoryHelper.OpDeclaration(QLinearConv.NAME)
19029     public static final class QLinearConv extends OnnxOp {
19030         public static final String NAME = "QLinearConv";
19031 
19032         public enum Attribute implements OnnxAttribute {
19033             pads(long[].class, true, null),
19034             dilations(long[].class, true, null),
19035             auto_pad(String.class, true, "NOTSET"),
19036             strides(long[].class, true, null),
19037             group(Long.class, true, 1),
19038             kernel_shape(long[].class, true, null),
19039             ;
19040 
19041                 final Class<?> t;
19042                 final boolean optional;
19043                 final Object defaultValue;
19044 
19045                 Attribute(Class<?> type, boolean optional, Object defaultValue) {
19046                     this.t = type;
19047                     this.optional = optional;
19048                     this.defaultValue = defaultValue;
19049                     assert optional || defaultValue == null;
19050                 }
19051 
19052                 public Class<?> type() {
19053                     return t;
19054                 }
19055 
19056                 public boolean isOptional() {
19057                     return optional;
19058                 }
19059 
19060                 public Object defaultValue() {
19061                     return defaultValue;
19062                 }
19063         }
19064 
19065         public enum TypeConstraint implements OnnxTypeConstraint {
19066             T1(new OnnxType.TypeVariable("T1", List.of(OnnxType.tensor(OnnxType.int8()), OnnxType.tensor(OnnxType.uint8())))),
19067             T2(new OnnxType.TypeVariable("T2", List.of(OnnxType.tensor(OnnxType.int8()), OnnxType.tensor(OnnxType.uint8())))),
19068             T3(new OnnxType.TypeVariable("T3", List.of(OnnxType.tensor(OnnxType.int8()), OnnxType.tensor(OnnxType.uint8())))),
19069             T4(new OnnxType.TypeVariable("T4", List.of(OnnxType.tensor(OnnxType.int32())))),
19070             ;
19071 
19072             final OnnxType.TypeVariable typeVariable;
19073 
19074             TypeConstraint(OnnxType.TypeVariable typeVariable) {
19075                 assert typeVariable.name().equals(name());
19076                 this.typeVariable = typeVariable;
19077             }
19078 
19079             @Override
19080             public OnnxType.TypeVariable typeVariable() {
19081                 return typeVariable;
19082             }
19083         }
19084 
19085         public enum InputParameter implements OnnxParameter {
19086             x(TypeConstraint.T1.typeVariable(), Quantifier.REQUIRED),
19087             x_scale(OnnxType.tensor(OnnxType.float32()), Quantifier.REQUIRED),
19088             x_zero_point(TypeConstraint.T1.typeVariable(), Quantifier.REQUIRED),
19089             w(TypeConstraint.T2.typeVariable(), Quantifier.REQUIRED),
19090             w_scale(OnnxType.tensor(OnnxType.float32()), Quantifier.REQUIRED),
19091             w_zero_point(TypeConstraint.T2.typeVariable(), Quantifier.REQUIRED),
19092             y_scale(OnnxType.tensor(OnnxType.float32()), Quantifier.REQUIRED),
19093             y_zero_point(TypeConstraint.T3.typeVariable(), Quantifier.REQUIRED),
19094             B(TypeConstraint.T4.typeVariable(), Quantifier.OPTIONAL),
19095             ;
19096 
19097             final OnnxType type;
19098             final Quantifier quantifier;
19099 
19100             InputParameter(OnnxType type, Quantifier quantifier) {
19101                 this.type = type;
19102                 this.quantifier = quantifier;
19103             }
19104 
19105             @Override
19106             public OnnxType type() {
19107                 return type;
19108             }
19109 
19110             @Override
19111             public Quantifier quantifier() {
19112                 return quantifier;
19113             }
19114         }
19115 
19116         public enum OutputParameter implements OnnxParameter {
19117             y(TypeConstraint.T3.typeVariable(), Quantifier.REQUIRED),
19118             ;
19119 
19120             final OnnxType type;
19121             final Quantifier quantifier;
19122 
19123             OutputParameter(OnnxType type, Quantifier quantifier) {
19124                 this.type = type;
19125                 this.quantifier = quantifier;
19126             }
19127 
19128             @Override
19129             public OnnxType type() {
19130                 return type;
19131             }
19132 
19133             @Override
19134             public Quantifier quantifier() {
19135                 return quantifier;
19136             }
19137         }
19138 
19139         public static final OnnxSchema SCHEMA = new OnnxSchemaRecord(
19140                 NAME,
19141                 List.of(Attribute.values()),
19142                 List.of(TypeConstraint.values()),
19143                 List.of(InputParameter.values()),
19144                 List.of(OutputParameter.values())
19145         );
19146 
19147         public QLinearConv(ExternalizedOp def) {
19148             super(SCHEMA, def);
19149         }
19150 
19151         QLinearConv(QLinearConv that, CopyContext cc) {
19152             super(that, cc);
19153         }
19154 
19155         @Override
19156         public QLinearConv transform(CopyContext cc, OpTransformer ot) {
19157             return new QLinearConv(this, cc);
19158         }
19159 
19160         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<long[]> pads, java.util.Optional<long[]> dilations, java.util.Optional<String> auto_pad, java.util.Optional<long[]> strides, java.util.Optional<Long> group, java.util.Optional<long[]> kernel_shape) {
19161             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));
19162         }
19163 
19164         @Override
19165         public SequencedSet<OnnxParameter> onnxOutputs() {
19166             return onnxOutputs(SCHEMA);
19167         }
19168 
19169         @Override
19170         public SequencedMap<OnnxParameter, Object> onnxInputs() {
19171             return onnxInputs(SCHEMA, List.of(x(), x_scale(), x_zero_point(), w(), w_scale(), w_zero_point(), y_scale(), y_zero_point(), B()));
19172         }
19173 
19174         public Value x() {
19175             return operands().get(0);
19176         }
19177 
19178         public Value x_scale() {
19179             return operands().get(1);
19180         }
19181 
19182         public Value x_zero_point() {
19183             return operands().get(2);
19184         }
19185 
19186         public Value w() {
19187             return operands().get(3);
19188         }
19189 
19190         public Value w_scale() {
19191             return operands().get(4);
19192         }
19193 
19194         public Value w_zero_point() {
19195             return operands().get(5);
19196         }
19197 
19198         public Value y_scale() {
19199             return operands().get(6);
19200         }
19201 
19202         public Value y_zero_point() {
19203             return operands().get(7);
19204         }
19205 
19206         public java.util.Optional<Value> B() {
19207             int i = optionalInputArguments.indexOf(InputParameter.B);
19208             return i != -1 ? java.util.Optional.of(operands().get(8 + i)) : java.util.Optional.empty();
19209         }
19210 
19211         public java.util.Optional<long[]> pads() {
19212             long[] pads = Attribute.pads.access(long[].class, onnxAttributes);
19213             return java.util.Optional.ofNullable(pads).map(long[]::clone);
19214         }
19215 
19216         public java.util.Optional<long[]> dilations() {
19217             long[] dilations = Attribute.dilations.access(long[].class, onnxAttributes);
19218             return java.util.Optional.ofNullable(dilations).map(long[]::clone);
19219         }
19220 
19221         public java.util.Optional<String> auto_pad() {
19222             String auto_pad = Attribute.auto_pad.access(String.class, onnxAttributes);
19223             return java.util.Optional.ofNullable(auto_pad);
19224         }
19225 
19226         public java.util.Optional<long[]> strides() {
19227             long[] strides = Attribute.strides.access(long[].class, onnxAttributes);
19228             return java.util.Optional.ofNullable(strides).map(long[]::clone);
19229         }
19230 
19231         public java.util.Optional<Long> group() {
19232             Long group = Attribute.group.access(Long.class, onnxAttributes);
19233             return java.util.Optional.ofNullable(group);
19234         }
19235 
19236         public java.util.Optional<long[]> kernel_shape() {
19237             long[] kernel_shape = Attribute.kernel_shape.access(long[].class, onnxAttributes);
19238             return java.util.Optional.ofNullable(kernel_shape).map(long[]::clone);
19239         }
19240 
19241     }
19242 
19243     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<long[]> pads, java.util.Optional<long[]> dilations, java.util.Optional<String> auto_pad, java.util.Optional<long[]> strides, java.util.Optional<Long> group, java.util.Optional<long[]> kernel_shape) {
19244         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);
19245     }
19246 
19247     @OpFactoryHelper.OpDeclaration(QLinearMatMul.NAME)
19248     public static final class QLinearMatMul extends OnnxOp {
19249         public static final String NAME = "QLinearMatMul";
19250 
19251         public enum Attribute implements OnnxAttribute.None { }
19252 
19253         public enum TypeConstraint implements OnnxTypeConstraint {
19254             TS(new OnnxType.TypeVariable("TS", List.of(OnnxType.tensor(OnnxType.float32()), OnnxType.tensor(OnnxType.float16()), OnnxType.tensor(OnnxType.bfloat16())))),
19255             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())))),
19256             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())))),
19257             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())))),
19258             ;
19259 
19260             final OnnxType.TypeVariable typeVariable;
19261 
19262             TypeConstraint(OnnxType.TypeVariable typeVariable) {
19263                 assert typeVariable.name().equals(name());
19264                 this.typeVariable = typeVariable;
19265             }
19266 
19267             @Override
19268             public OnnxType.TypeVariable typeVariable() {
19269                 return typeVariable;
19270             }
19271         }
19272 
19273         public enum InputParameter implements OnnxParameter {
19274             a(TypeConstraint.T1.typeVariable(), Quantifier.REQUIRED),
19275             a_scale(TypeConstraint.TS.typeVariable(), Quantifier.REQUIRED),
19276             a_zero_point(TypeConstraint.T1.typeVariable(), Quantifier.REQUIRED),
19277             b(TypeConstraint.T2.typeVariable(), Quantifier.REQUIRED),
19278             b_scale(TypeConstraint.TS.typeVariable(), Quantifier.REQUIRED),
19279             b_zero_point(TypeConstraint.T2.typeVariable(), Quantifier.REQUIRED),
19280             y_scale(TypeConstraint.TS.typeVariable(), Quantifier.REQUIRED),
19281             y_zero_point(TypeConstraint.T3.typeVariable(), Quantifier.REQUIRED),
19282             ;
19283 
19284             final OnnxType type;
19285             final Quantifier quantifier;
19286 
19287             InputParameter(OnnxType type, Quantifier quantifier) {
19288                 this.type = type;
19289                 this.quantifier = quantifier;
19290             }
19291 
19292             @Override
19293             public OnnxType type() {
19294                 return type;
19295             }
19296 
19297             @Override
19298             public Quantifier quantifier() {
19299                 return quantifier;
19300             }
19301         }
19302 
19303         public enum OutputParameter implements OnnxParameter {
19304             y(TypeConstraint.T3.typeVariable(), Quantifier.REQUIRED),
19305             ;
19306 
19307             final OnnxType type;
19308             final Quantifier quantifier;
19309 
19310             OutputParameter(OnnxType type, Quantifier quantifier) {
19311                 this.type = type;
19312                 this.quantifier = quantifier;
19313             }
19314 
19315             @Override
19316             public OnnxType type() {
19317                 return type;
19318             }
19319 
19320             @Override
19321             public Quantifier quantifier() {
19322                 return quantifier;
19323             }
19324         }
19325 
19326         public static final OnnxSchema SCHEMA = new OnnxSchemaRecord(
19327                 NAME,
19328                 List.of(Attribute.values()),
19329                 List.of(TypeConstraint.values()),
19330                 List.of(InputParameter.values()),
19331                 List.of(OutputParameter.values())
19332         );
19333 
19334         public QLinearMatMul(ExternalizedOp def) {
19335             super(SCHEMA, def);
19336         }
19337 
19338         QLinearMatMul(QLinearMatMul that, CopyContext cc) {
19339             super(that, cc);
19340         }
19341 
19342         @Override
19343         public QLinearMatMul transform(CopyContext cc, OpTransformer ot) {
19344             return new QLinearMatMul(this, cc);
19345         }
19346 
19347         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) {
19348             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());
19349         }
19350 
19351         @Override
19352         public SequencedSet<OnnxParameter> onnxOutputs() {
19353             return onnxOutputs(SCHEMA);
19354         }
19355 
19356         @Override
19357         public SequencedMap<OnnxParameter, Object> onnxInputs() {
19358             return onnxInputs(SCHEMA, List.of(a(), a_scale(), a_zero_point(), b(), b_scale(), b_zero_point(), y_scale(), y_zero_point()));
19359         }
19360 
19361         public Value a() {
19362             return operands().get(0);
19363         }
19364 
19365         public Value a_scale() {
19366             return operands().get(1);
19367         }
19368 
19369         public Value a_zero_point() {
19370             return operands().get(2);
19371         }
19372 
19373         public Value b() {
19374             return operands().get(3);
19375         }
19376 
19377         public Value b_scale() {
19378             return operands().get(4);
19379         }
19380 
19381         public Value b_zero_point() {
19382             return operands().get(5);
19383         }
19384 
19385         public Value y_scale() {
19386             return operands().get(6);
19387         }
19388 
19389         public Value y_zero_point() {
19390             return operands().get(7);
19391         }
19392 
19393     }
19394 
19395     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) {
19396         return new QLinearMatMul(resultType, a, a_scale, a_zero_point, b, b_scale, b_zero_point, y_scale, y_zero_point);
19397     }
19398 
19399     @OpFactoryHelper.OpDeclaration(QuantizeLinear.NAME)
19400     public static final class QuantizeLinear extends OnnxOp {
19401         public static final String NAME = "QuantizeLinear";
19402 
19403         public enum Attribute implements OnnxAttribute {
19404             output_dtype(Long.class, true, 0),
19405             saturate(Long.class, true, 1),
19406             axis(Long.class, true, 1),
19407             block_size(Long.class, true, 0),
19408             ;
19409 
19410                 final Class<?> t;
19411                 final boolean optional;
19412                 final Object defaultValue;
19413 
19414                 Attribute(Class<?> type, boolean optional, Object defaultValue) {
19415                     this.t = type;
19416                     this.optional = optional;
19417                     this.defaultValue = defaultValue;
19418                     assert optional || defaultValue == null;
19419                 }
19420 
19421                 public Class<?> type() {
19422                     return t;
19423                 }
19424 
19425                 public boolean isOptional() {
19426                     return optional;
19427                 }
19428 
19429                 public Object defaultValue() {
19430                     return defaultValue;
19431                 }
19432         }
19433 
19434         public enum TypeConstraint implements OnnxTypeConstraint {
19435             T1(new OnnxType.TypeVariable("T1", List.of(OnnxType.tensor(OnnxType.float32()), OnnxType.tensor(OnnxType.float16()), OnnxType.tensor(OnnxType.bfloat16()), OnnxType.tensor(OnnxType.int32())))),
19436             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())))),
19437             ;
19438 
19439             final OnnxType.TypeVariable typeVariable;
19440 
19441             TypeConstraint(OnnxType.TypeVariable typeVariable) {
19442                 assert typeVariable.name().equals(name());
19443                 this.typeVariable = typeVariable;
19444             }
19445 
19446             @Override
19447             public OnnxType.TypeVariable typeVariable() {
19448                 return typeVariable;
19449             }
19450         }
19451 
19452         public enum InputParameter implements OnnxParameter {
19453             x(TypeConstraint.T1.typeVariable(), Quantifier.REQUIRED),
19454             y_scale(TypeConstraint.T1.typeVariable(), Quantifier.REQUIRED),
19455             y_zero_point(TypeConstraint.T2.typeVariable(), Quantifier.OPTIONAL),
19456             ;
19457 
19458             final OnnxType type;
19459             final Quantifier quantifier;
19460 
19461             InputParameter(OnnxType type, Quantifier quantifier) {
19462                 this.type = type;
19463                 this.quantifier = quantifier;
19464             }
19465 
19466             @Override
19467             public OnnxType type() {
19468                 return type;
19469             }
19470 
19471             @Override
19472             public Quantifier quantifier() {
19473                 return quantifier;
19474             }
19475         }
19476 
19477         public enum OutputParameter implements OnnxParameter {
19478             y(TypeConstraint.T2.typeVariable(), Quantifier.REQUIRED),
19479             ;
19480 
19481             final OnnxType type;
19482             final Quantifier quantifier;
19483 
19484             OutputParameter(OnnxType type, Quantifier quantifier) {
19485                 this.type = type;
19486                 this.quantifier = quantifier;
19487             }
19488 
19489             @Override
19490             public OnnxType type() {
19491                 return type;
19492             }
19493 
19494             @Override
19495             public Quantifier quantifier() {
19496                 return quantifier;
19497             }
19498         }
19499 
19500         public static final OnnxSchema SCHEMA = new OnnxSchemaRecord(
19501                 NAME,
19502                 List.of(Attribute.values()),
19503                 List.of(TypeConstraint.values()),
19504                 List.of(InputParameter.values()),
19505                 List.of(OutputParameter.values())
19506         );
19507 
19508         public QuantizeLinear(ExternalizedOp def) {
19509             super(SCHEMA, def);
19510         }
19511 
19512         QuantizeLinear(QuantizeLinear that, CopyContext cc) {
19513             super(that, cc);
19514         }
19515 
19516         @Override
19517         public QuantizeLinear transform(CopyContext cc, OpTransformer ot) {
19518             return new QuantizeLinear(this, cc);
19519         }
19520 
19521         QuantizeLinear(TypeElement resultType, Value x, Value y_scale, java.util.Optional<Value> y_zero_point, java.util.Optional<Long> output_dtype, java.util.Optional<Long> saturate, java.util.Optional<Long> axis, java.util.Optional<Long> block_size) {
19522             super(SCHEMA, resultType, Set.of(), List.of(x, y_scale, y_zero_point), List.of(output_dtype, saturate, axis, block_size));
19523         }
19524 
19525         @Override
19526         public SequencedSet<OnnxParameter> onnxOutputs() {
19527             return onnxOutputs(SCHEMA);
19528         }
19529 
19530         @Override
19531         public SequencedMap<OnnxParameter, Object> onnxInputs() {
19532             return onnxInputs(SCHEMA, List.of(x(), y_scale(), y_zero_point()));
19533         }
19534 
19535         public Value x() {
19536             return operands().get(0);
19537         }
19538 
19539         public Value y_scale() {
19540             return operands().get(1);
19541         }
19542 
19543         public java.util.Optional<Value> y_zero_point() {
19544             int i = optionalInputArguments.indexOf(InputParameter.y_zero_point);
19545             return i != -1 ? java.util.Optional.of(operands().get(2 + i)) : java.util.Optional.empty();
19546         }
19547 
19548         public java.util.Optional<Long> output_dtype() {
19549             Long output_dtype = Attribute.output_dtype.access(Long.class, onnxAttributes);
19550             return java.util.Optional.ofNullable(output_dtype);
19551         }
19552 
19553         public java.util.Optional<Long> saturate() {
19554             Long saturate = Attribute.saturate.access(Long.class, onnxAttributes);
19555             return java.util.Optional.ofNullable(saturate);
19556         }
19557 
19558         public java.util.Optional<Long> axis() {
19559             Long axis = Attribute.axis.access(Long.class, onnxAttributes);
19560             return java.util.Optional.ofNullable(axis);
19561         }
19562 
19563         public java.util.Optional<Long> block_size() {
19564             Long block_size = Attribute.block_size.access(Long.class, onnxAttributes);
19565             return java.util.Optional.ofNullable(block_size);
19566         }
19567 
19568     }
19569 
19570     public static QuantizeLinear QuantizeLinear(TypeElement resultType, Value x, Value y_scale, java.util.Optional<Value> y_zero_point, java.util.Optional<Long> output_dtype, java.util.Optional<Long> saturate, java.util.Optional<Long> axis, java.util.Optional<Long> block_size) {
19571         return new QuantizeLinear(resultType, x, y_scale, y_zero_point, output_dtype, saturate, axis, block_size);
19572     }
19573 
19574     @OpFactoryHelper.OpDeclaration(RNN.NAME)
19575     public static final class RNN extends OnnxOp {
19576         public static final String NAME = "RNN";
19577 
19578         public enum Attribute implements OnnxAttribute {
19579             layout(Long.class, true, 0),
19580             activation_alpha(float[].class, true, null),
19581             hidden_size(Long.class, true, null),
19582             activation_beta(float[].class, true, null),
19583             activations(String[].class, true, null),
19584             clip(Float.class, true, null),
19585             direction(String.class, true, "forward"),
19586             ;
19587 
19588                 final Class<?> t;
19589                 final boolean optional;
19590                 final Object defaultValue;
19591 
19592                 Attribute(Class<?> type, boolean optional, Object defaultValue) {
19593                     this.t = type;
19594                     this.optional = optional;
19595                     this.defaultValue = defaultValue;
19596                     assert optional || defaultValue == null;
19597                 }
19598 
19599                 public Class<?> type() {
19600                     return t;
19601                 }
19602 
19603                 public boolean isOptional() {
19604                     return optional;
19605                 }
19606 
19607                 public Object defaultValue() {
19608                     return defaultValue;
19609                 }
19610         }
19611 
19612         public enum TypeConstraint implements OnnxTypeConstraint {
19613             T(new OnnxType.TypeVariable("T", List.of(OnnxType.tensor(OnnxType.bfloat16()), OnnxType.tensor(OnnxType.float16()), OnnxType.tensor(OnnxType.float32()), OnnxType.tensor(OnnxType.float64())))),
19614             T1(new OnnxType.TypeVariable("T1", List.of(OnnxType.tensor(OnnxType.int32())))),
19615             ;
19616 
19617             final OnnxType.TypeVariable typeVariable;
19618 
19619             TypeConstraint(OnnxType.TypeVariable typeVariable) {
19620                 assert typeVariable.name().equals(name());
19621                 this.typeVariable = typeVariable;
19622             }
19623 
19624             @Override
19625             public OnnxType.TypeVariable typeVariable() {
19626                 return typeVariable;
19627             }
19628         }
19629 
19630         public enum InputParameter implements OnnxParameter {
19631             X(TypeConstraint.T.typeVariable(), Quantifier.REQUIRED),
19632             W(TypeConstraint.T.typeVariable(), Quantifier.REQUIRED),
19633             R(TypeConstraint.T.typeVariable(), Quantifier.REQUIRED),
19634             B(TypeConstraint.T.typeVariable(), Quantifier.OPTIONAL),
19635             sequence_lens(TypeConstraint.T1.typeVariable(), Quantifier.OPTIONAL),
19636             initial_h(TypeConstraint.T.typeVariable(), Quantifier.OPTIONAL),
19637             ;
19638 
19639             final OnnxType type;
19640             final Quantifier quantifier;
19641 
19642             InputParameter(OnnxType type, Quantifier quantifier) {
19643                 this.type = type;
19644                 this.quantifier = quantifier;
19645             }
19646 
19647             @Override
19648             public OnnxType type() {
19649                 return type;
19650             }
19651 
19652             @Override
19653             public Quantifier quantifier() {
19654                 return quantifier;
19655             }
19656         }
19657 
19658         public enum OutputParameter implements OnnxParameter {
19659             Y(TypeConstraint.T.typeVariable(), Quantifier.OPTIONAL),
19660             Y_h(TypeConstraint.T.typeVariable(), Quantifier.OPTIONAL),
19661             ;
19662 
19663             final OnnxType type;
19664             final Quantifier quantifier;
19665 
19666             OutputParameter(OnnxType type, Quantifier quantifier) {
19667                 this.type = type;
19668                 this.quantifier = quantifier;
19669             }
19670 
19671             @Override
19672             public OnnxType type() {
19673                 return type;
19674             }
19675 
19676             @Override
19677             public Quantifier quantifier() {
19678                 return quantifier;
19679             }
19680         }
19681 
19682         public static final OnnxSchema SCHEMA = new OnnxSchemaRecord(
19683                 NAME,
19684                 List.of(Attribute.values()),
19685                 List.of(TypeConstraint.values()),
19686                 List.of(InputParameter.values()),
19687                 List.of(OutputParameter.values())
19688         );
19689 
19690         public RNN(ExternalizedOp def) {
19691             super(SCHEMA, def);
19692         }
19693 
19694         RNN(RNN that, CopyContext cc) {
19695             super(that, cc);
19696         }
19697 
19698         @Override
19699         public RNN transform(CopyContext cc, OpTransformer ot) {
19700             return new RNN(this, cc);
19701         }
19702 
19703         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<Long> layout, java.util.Optional<float[]> activation_alpha, java.util.Optional<Long> hidden_size, java.util.Optional<float[]> activation_beta, java.util.Optional<String[]> activations, java.util.Optional<Float> clip, java.util.Optional<String> direction) {
19704             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));
19705         }
19706 
19707         @Override
19708         public SequencedSet<OnnxParameter> onnxOutputs() {
19709             return onnxOutputs(SCHEMA);
19710         }
19711 
19712         @Override
19713         public SequencedMap<OnnxParameter, Object> onnxInputs() {
19714             return onnxInputs(SCHEMA, List.of(X(), W(), R(), B(), sequence_lens(), initial_h()));
19715         }
19716 
19717         public Value X() {
19718             return operands().get(0);
19719         }
19720 
19721         public Value W() {
19722             return operands().get(1);
19723         }
19724 
19725         public Value R() {
19726             return operands().get(2);
19727         }
19728 
19729         public java.util.Optional<Value> B() {
19730             int i = optionalInputArguments.indexOf(InputParameter.B);
19731             return i != -1 ? java.util.Optional.of(operands().get(3 + i)) : java.util.Optional.empty();
19732         }
19733 
19734         public java.util.Optional<Value> sequence_lens() {
19735             int i = optionalInputArguments.indexOf(InputParameter.sequence_lens);
19736             return i != -1 ? java.util.Optional.of(operands().get(3 + i)) : java.util.Optional.empty();
19737         }
19738 
19739         public java.util.Optional<Value> initial_h() {
19740             int i = optionalInputArguments.indexOf(InputParameter.initial_h);
19741             return i != -1 ? java.util.Optional.of(operands().get(3 + i)) : java.util.Optional.empty();
19742         }
19743 
19744         public java.util.Optional<Long> layout() {
19745             Long layout = Attribute.layout.access(Long.class, onnxAttributes);
19746             return java.util.Optional.ofNullable(layout);
19747         }
19748 
19749         public java.util.Optional<float[]> activation_alpha() {
19750             float[] activation_alpha = Attribute.activation_alpha.access(float[].class, onnxAttributes);
19751             return java.util.Optional.ofNullable(activation_alpha).map(float[]::clone);
19752         }
19753 
19754         public java.util.Optional<Long> hidden_size() {
19755             Long hidden_size = Attribute.hidden_size.access(Long.class, onnxAttributes);
19756             return java.util.Optional.ofNullable(hidden_size);
19757         }
19758 
19759         public java.util.Optional<float[]> activation_beta() {
19760             float[] activation_beta = Attribute.activation_beta.access(float[].class, onnxAttributes);
19761             return java.util.Optional.ofNullable(activation_beta).map(float[]::clone);
19762         }
19763 
19764         public java.util.Optional<String[]> activations() {
19765             String[] activations = Attribute.activations.access(String[].class, onnxAttributes);
19766             return java.util.Optional.ofNullable(activations).map(String[]::clone);
19767         }
19768 
19769         public java.util.Optional<Float> clip() {
19770             Float clip = Attribute.clip.access(Float.class, onnxAttributes);
19771             return java.util.Optional.ofNullable(clip);
19772         }
19773 
19774         public java.util.Optional<String> direction() {
19775             String direction = Attribute.direction.access(String.class, onnxAttributes);
19776             return java.util.Optional.ofNullable(direction);
19777         }
19778 
19779     }
19780 
19781     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<Long> layout, java.util.Optional<float[]> activation_alpha, java.util.Optional<Long> hidden_size, java.util.Optional<float[]> activation_beta, java.util.Optional<String[]> activations, java.util.Optional<Float> clip, java.util.Optional<String> direction) {
19782         return new RNN(resultType, optionalOutputs, X, W, R, B, sequence_lens, initial_h, layout, activation_alpha, hidden_size, activation_beta, activations, clip, direction);
19783     }
19784 
19785     @OpFactoryHelper.OpDeclaration(RandomNormal.NAME)
19786     public static final class RandomNormal extends OnnxOp {
19787         public static final String NAME = "RandomNormal";
19788 
19789         public enum Attribute implements OnnxAttribute {
19790             shape(long[].class, false, null),
19791             seed(Float.class, true, null),
19792             mean(Float.class, true, 0.0f),
19793             scale(Float.class, true, 1.0f),
19794             dtype(Long.class, true, 1),
19795             ;
19796 
19797                 final Class<?> t;
19798                 final boolean optional;
19799                 final Object defaultValue;
19800 
19801                 Attribute(Class<?> type, boolean optional, Object defaultValue) {
19802                     this.t = type;
19803                     this.optional = optional;
19804                     this.defaultValue = defaultValue;
19805                     assert optional || defaultValue == null;
19806                 }
19807 
19808                 public Class<?> type() {
19809                     return t;
19810                 }
19811 
19812                 public boolean isOptional() {
19813                     return optional;
19814                 }
19815 
19816                 public Object defaultValue() {
19817                     return defaultValue;
19818                 }
19819         }
19820 
19821         public enum TypeConstraint implements OnnxTypeConstraint {
19822             T(new OnnxType.TypeVariable("T", List.of(OnnxType.tensor(OnnxType.bfloat16()), OnnxType.tensor(OnnxType.float16()), OnnxType.tensor(OnnxType.float32()), OnnxType.tensor(OnnxType.float64())))),
19823             ;
19824 
19825             final OnnxType.TypeVariable typeVariable;
19826 
19827             TypeConstraint(OnnxType.TypeVariable typeVariable) {
19828                 assert typeVariable.name().equals(name());
19829                 this.typeVariable = typeVariable;
19830             }
19831 
19832             @Override
19833             public OnnxType.TypeVariable typeVariable() {
19834                 return typeVariable;
19835             }
19836         }
19837 
19838         public enum InputParameter implements OnnxParameter.None { }
19839 
19840         public enum OutputParameter implements OnnxParameter {
19841             output(TypeConstraint.T.typeVariable(), Quantifier.REQUIRED),
19842             ;
19843 
19844             final OnnxType type;
19845             final Quantifier quantifier;
19846 
19847             OutputParameter(OnnxType type, Quantifier quantifier) {
19848                 this.type = type;
19849                 this.quantifier = quantifier;
19850             }
19851 
19852             @Override
19853             public OnnxType type() {
19854                 return type;
19855             }
19856 
19857             @Override
19858             public Quantifier quantifier() {
19859                 return quantifier;
19860             }
19861         }
19862 
19863         public static final OnnxSchema SCHEMA = new OnnxSchemaRecord(
19864                 NAME,
19865                 List.of(Attribute.values()),
19866                 List.of(TypeConstraint.values()),
19867                 List.of(InputParameter.values()),
19868                 List.of(OutputParameter.values())
19869         );
19870 
19871         public RandomNormal(ExternalizedOp def) {
19872             super(SCHEMA, def);
19873         }
19874 
19875         RandomNormal(RandomNormal that, CopyContext cc) {
19876             super(that, cc);
19877         }
19878 
19879         @Override
19880         public RandomNormal transform(CopyContext cc, OpTransformer ot) {
19881             return new RandomNormal(this, cc);
19882         }
19883 
19884         RandomNormal(TypeElement resultType, long[] shape, java.util.Optional<Float> seed, java.util.Optional<Float> mean, java.util.Optional<Float> scale, java.util.Optional<Long> dtype) {
19885             super(SCHEMA, resultType, Set.of(), List.of(), List.of(shape, seed, mean, scale, dtype));
19886         }
19887 
19888         @Override
19889         public SequencedSet<OnnxParameter> onnxOutputs() {
19890             return onnxOutputs(SCHEMA);
19891         }
19892 
19893         @Override
19894         public SequencedMap<OnnxParameter, Object> onnxInputs() {
19895             return onnxInputs(SCHEMA, List.of());
19896         }
19897 
19898         public long[] shape() {
19899             long[] shape = Attribute.shape.access(long[].class, onnxAttributes);
19900             return shape.clone();
19901         }
19902 
19903         public java.util.Optional<Float> seed() {
19904             Float seed = Attribute.seed.access(Float.class, onnxAttributes);
19905             return java.util.Optional.ofNullable(seed);
19906         }
19907 
19908         public java.util.Optional<Float> mean() {
19909             Float mean = Attribute.mean.access(Float.class, onnxAttributes);
19910             return java.util.Optional.ofNullable(mean);
19911         }
19912 
19913         public java.util.Optional<Float> scale() {
19914             Float scale = Attribute.scale.access(Float.class, onnxAttributes);
19915             return java.util.Optional.ofNullable(scale);
19916         }
19917 
19918         public java.util.Optional<Long> dtype() {
19919             Long dtype = Attribute.dtype.access(Long.class, onnxAttributes);
19920             return java.util.Optional.ofNullable(dtype);
19921         }
19922 
19923     }
19924 
19925     public static RandomNormal RandomNormal(TypeElement resultType, long[] shape, java.util.Optional<Float> seed, java.util.Optional<Float> mean, java.util.Optional<Float> scale, java.util.Optional<Long> dtype) {
19926         return new RandomNormal(resultType, shape, seed, mean, scale, dtype);
19927     }
19928 
19929     @OpFactoryHelper.OpDeclaration(RandomNormalLike.NAME)
19930     public static final class RandomNormalLike extends OnnxOp {
19931         public static final String NAME = "RandomNormalLike";
19932 
19933         public enum Attribute implements OnnxAttribute {
19934             seed(Float.class, true, null),
19935             mean(Float.class, true, 0.0f),
19936             scale(Float.class, true, 1.0f),
19937             dtype(Long.class, true, null),
19938             ;
19939 
19940                 final Class<?> t;
19941                 final boolean optional;
19942                 final Object defaultValue;
19943 
19944                 Attribute(Class<?> type, boolean optional, Object defaultValue) {
19945                     this.t = type;
19946                     this.optional = optional;
19947                     this.defaultValue = defaultValue;
19948                     assert optional || defaultValue == null;
19949                 }
19950 
19951                 public Class<?> type() {
19952                     return t;
19953                 }
19954 
19955                 public boolean isOptional() {
19956                     return optional;
19957                 }
19958 
19959                 public Object defaultValue() {
19960                     return defaultValue;
19961                 }
19962         }
19963 
19964         public enum TypeConstraint implements OnnxTypeConstraint {
19965             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())))),
19966             T2(new OnnxType.TypeVariable("T2", List.of(OnnxType.tensor(OnnxType.bfloat16()), OnnxType.tensor(OnnxType.float16()), OnnxType.tensor(OnnxType.float32()), OnnxType.tensor(OnnxType.float64())))),
19967             ;
19968 
19969             final OnnxType.TypeVariable typeVariable;
19970 
19971             TypeConstraint(OnnxType.TypeVariable typeVariable) {
19972                 assert typeVariable.name().equals(name());
19973                 this.typeVariable = typeVariable;
19974             }
19975 
19976             @Override
19977             public OnnxType.TypeVariable typeVariable() {
19978                 return typeVariable;
19979             }
19980         }
19981 
19982         public enum InputParameter implements OnnxParameter {
19983             input(TypeConstraint.T1.typeVariable(), Quantifier.REQUIRED),
19984             ;
19985 
19986             final OnnxType type;
19987             final Quantifier quantifier;
19988 
19989             InputParameter(OnnxType type, Quantifier quantifier) {
19990                 this.type = type;
19991                 this.quantifier = quantifier;
19992             }
19993 
19994             @Override
19995             public OnnxType type() {
19996                 return type;
19997             }
19998 
19999             @Override
20000             public Quantifier quantifier() {
20001                 return quantifier;
20002             }
20003         }
20004 
20005         public enum OutputParameter implements OnnxParameter {
20006             output(TypeConstraint.T2.typeVariable(), Quantifier.REQUIRED),
20007             ;
20008 
20009             final OnnxType type;
20010             final Quantifier quantifier;
20011 
20012             OutputParameter(OnnxType type, Quantifier quantifier) {
20013                 this.type = type;
20014                 this.quantifier = quantifier;
20015             }
20016 
20017             @Override
20018             public OnnxType type() {
20019                 return type;
20020             }
20021 
20022             @Override
20023             public Quantifier quantifier() {
20024                 return quantifier;
20025             }
20026         }
20027 
20028         public static final OnnxSchema SCHEMA = new OnnxSchemaRecord(
20029                 NAME,
20030                 List.of(Attribute.values()),
20031                 List.of(TypeConstraint.values()),
20032                 List.of(InputParameter.values()),
20033                 List.of(OutputParameter.values())
20034         );
20035 
20036         public RandomNormalLike(ExternalizedOp def) {
20037             super(SCHEMA, def);
20038         }
20039 
20040         RandomNormalLike(RandomNormalLike that, CopyContext cc) {
20041             super(that, cc);
20042         }
20043 
20044         @Override
20045         public RandomNormalLike transform(CopyContext cc, OpTransformer ot) {
20046             return new RandomNormalLike(this, cc);
20047         }
20048 
20049         RandomNormalLike(TypeElement resultType, Value input, java.util.Optional<Float> seed, java.util.Optional<Float> mean, java.util.Optional<Float> scale, java.util.Optional<Long> dtype) {
20050             super(SCHEMA, resultType, Set.of(), List.of(input), List.of(seed, mean, scale, dtype));
20051         }
20052 
20053         @Override
20054         public SequencedSet<OnnxParameter> onnxOutputs() {
20055             return onnxOutputs(SCHEMA);
20056         }
20057 
20058         @Override
20059         public SequencedMap<OnnxParameter, Object> onnxInputs() {
20060             return onnxInputs(SCHEMA, List.of(input()));
20061         }
20062 
20063         public Value input() {
20064             return operands().get(0);
20065         }
20066 
20067         public java.util.Optional<Float> seed() {
20068             Float seed = Attribute.seed.access(Float.class, onnxAttributes);
20069             return java.util.Optional.ofNullable(seed);
20070         }
20071 
20072         public java.util.Optional<Float> mean() {
20073             Float mean = Attribute.mean.access(Float.class, onnxAttributes);
20074             return java.util.Optional.ofNullable(mean);
20075         }
20076 
20077         public java.util.Optional<Float> scale() {
20078             Float scale = Attribute.scale.access(Float.class, onnxAttributes);
20079             return java.util.Optional.ofNullable(scale);
20080         }
20081 
20082         public java.util.Optional<Long> dtype() {
20083             Long dtype = Attribute.dtype.access(Long.class, onnxAttributes);
20084             return java.util.Optional.ofNullable(dtype);
20085         }
20086 
20087     }
20088 
20089     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<Long> dtype) {
20090         return new RandomNormalLike(resultType, input, seed, mean, scale, dtype);
20091     }
20092 
20093     @OpFactoryHelper.OpDeclaration(RandomUniform.NAME)
20094     public static final class RandomUniform extends OnnxOp {
20095         public static final String NAME = "RandomUniform";
20096 
20097         public enum Attribute implements OnnxAttribute {
20098             high(Float.class, true, 1.0f),
20099             shape(long[].class, false, null),
20100             seed(Float.class, true, null),
20101             low(Float.class, true, 0.0f),
20102             dtype(Long.class, true, 1),
20103             ;
20104 
20105                 final Class<?> t;
20106                 final boolean optional;
20107                 final Object defaultValue;
20108 
20109                 Attribute(Class<?> type, boolean optional, Object defaultValue) {
20110                     this.t = type;
20111                     this.optional = optional;
20112                     this.defaultValue = defaultValue;
20113                     assert optional || defaultValue == null;
20114                 }
20115 
20116                 public Class<?> type() {
20117                     return t;
20118                 }
20119 
20120                 public boolean isOptional() {
20121                     return optional;
20122                 }
20123 
20124                 public Object defaultValue() {
20125                     return defaultValue;
20126                 }
20127         }
20128 
20129         public enum TypeConstraint implements OnnxTypeConstraint {
20130             T(new OnnxType.TypeVariable("T", List.of(OnnxType.tensor(OnnxType.bfloat16()), OnnxType.tensor(OnnxType.float16()), OnnxType.tensor(OnnxType.float32()), OnnxType.tensor(OnnxType.float64())))),
20131             ;
20132 
20133             final OnnxType.TypeVariable typeVariable;
20134 
20135             TypeConstraint(OnnxType.TypeVariable typeVariable) {
20136                 assert typeVariable.name().equals(name());
20137                 this.typeVariable = typeVariable;
20138             }
20139 
20140             @Override
20141             public OnnxType.TypeVariable typeVariable() {
20142                 return typeVariable;
20143             }
20144         }
20145 
20146         public enum InputParameter implements OnnxParameter.None { }
20147 
20148         public enum OutputParameter implements OnnxParameter {
20149             output(TypeConstraint.T.typeVariable(), Quantifier.REQUIRED),
20150             ;
20151 
20152             final OnnxType type;
20153             final Quantifier quantifier;
20154 
20155             OutputParameter(OnnxType type, Quantifier quantifier) {
20156                 this.type = type;
20157                 this.quantifier = quantifier;
20158             }
20159 
20160             @Override
20161             public OnnxType type() {
20162                 return type;
20163             }
20164 
20165             @Override
20166             public Quantifier quantifier() {
20167                 return quantifier;
20168             }
20169         }
20170 
20171         public static final OnnxSchema SCHEMA = new OnnxSchemaRecord(
20172                 NAME,
20173                 List.of(Attribute.values()),
20174                 List.of(TypeConstraint.values()),
20175                 List.of(InputParameter.values()),
20176                 List.of(OutputParameter.values())
20177         );
20178 
20179         public RandomUniform(ExternalizedOp def) {
20180             super(SCHEMA, def);
20181         }
20182 
20183         RandomUniform(RandomUniform that, CopyContext cc) {
20184             super(that, cc);
20185         }
20186 
20187         @Override
20188         public RandomUniform transform(CopyContext cc, OpTransformer ot) {
20189             return new RandomUniform(this, cc);
20190         }
20191 
20192         RandomUniform(TypeElement resultType, java.util.Optional<Float> high, long[] shape, java.util.Optional<Float> seed, java.util.Optional<Float> low, java.util.Optional<Long> dtype) {
20193             super(SCHEMA, resultType, Set.of(), List.of(), List.of(high, shape, seed, low, dtype));
20194         }
20195 
20196         @Override
20197         public SequencedSet<OnnxParameter> onnxOutputs() {
20198             return onnxOutputs(SCHEMA);
20199         }
20200 
20201         @Override
20202         public SequencedMap<OnnxParameter, Object> onnxInputs() {
20203             return onnxInputs(SCHEMA, List.of());
20204         }
20205 
20206         public java.util.Optional<Float> high() {
20207             Float high = Attribute.high.access(Float.class, onnxAttributes);
20208             return java.util.Optional.ofNullable(high);
20209         }
20210 
20211         public long[] shape() {
20212             long[] shape = Attribute.shape.access(long[].class, onnxAttributes);
20213             return shape.clone();
20214         }
20215 
20216         public java.util.Optional<Float> seed() {
20217             Float seed = Attribute.seed.access(Float.class, onnxAttributes);
20218             return java.util.Optional.ofNullable(seed);
20219         }
20220 
20221         public java.util.Optional<Float> low() {
20222             Float low = Attribute.low.access(Float.class, onnxAttributes);
20223             return java.util.Optional.ofNullable(low);
20224         }
20225 
20226         public java.util.Optional<Long> dtype() {
20227             Long dtype = Attribute.dtype.access(Long.class, onnxAttributes);
20228             return java.util.Optional.ofNullable(dtype);
20229         }
20230 
20231     }
20232 
20233     public static RandomUniform RandomUniform(TypeElement resultType, java.util.Optional<Float> high, long[] shape, java.util.Optional<Float> seed, java.util.Optional<Float> low, java.util.Optional<Long> dtype) {
20234         return new RandomUniform(resultType, high, shape, seed, low, dtype);
20235     }
20236 
20237     @OpFactoryHelper.OpDeclaration(RandomUniformLike.NAME)
20238     public static final class RandomUniformLike extends OnnxOp {
20239         public static final String NAME = "RandomUniformLike";
20240 
20241         public enum Attribute implements OnnxAttribute {
20242             high(Float.class, true, 1.0f),
20243             seed(Float.class, true, null),
20244             low(Float.class, true, 0.0f),
20245             dtype(Long.class, true, null),
20246             ;
20247 
20248                 final Class<?> t;
20249                 final boolean optional;
20250                 final Object defaultValue;
20251 
20252                 Attribute(Class<?> type, boolean optional, Object defaultValue) {
20253                     this.t = type;
20254                     this.optional = optional;
20255                     this.defaultValue = defaultValue;
20256                     assert optional || defaultValue == null;
20257                 }
20258 
20259                 public Class<?> type() {
20260                     return t;
20261                 }
20262 
20263                 public boolean isOptional() {
20264                     return optional;
20265                 }
20266 
20267                 public Object defaultValue() {
20268                     return defaultValue;
20269                 }
20270         }
20271 
20272         public enum TypeConstraint implements OnnxTypeConstraint {
20273             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())))),
20274             T2(new OnnxType.TypeVariable("T2", List.of(OnnxType.tensor(OnnxType.bfloat16()), OnnxType.tensor(OnnxType.float16()), OnnxType.tensor(OnnxType.float32()), OnnxType.tensor(OnnxType.float64())))),
20275             ;
20276 
20277             final OnnxType.TypeVariable typeVariable;
20278 
20279             TypeConstraint(OnnxType.TypeVariable typeVariable) {
20280                 assert typeVariable.name().equals(name());
20281                 this.typeVariable = typeVariable;
20282             }
20283 
20284             @Override
20285             public OnnxType.TypeVariable typeVariable() {
20286                 return typeVariable;
20287             }
20288         }
20289 
20290         public enum InputParameter implements OnnxParameter {
20291             input(TypeConstraint.T1.typeVariable(), Quantifier.REQUIRED),
20292             ;
20293 
20294             final OnnxType type;
20295             final Quantifier quantifier;
20296 
20297             InputParameter(OnnxType type, Quantifier quantifier) {
20298                 this.type = type;
20299                 this.quantifier = quantifier;
20300             }
20301 
20302             @Override
20303             public OnnxType type() {
20304                 return type;
20305             }
20306 
20307             @Override
20308             public Quantifier quantifier() {
20309                 return quantifier;
20310             }
20311         }
20312 
20313         public enum OutputParameter implements OnnxParameter {
20314             output(TypeConstraint.T2.typeVariable(), Quantifier.REQUIRED),
20315             ;
20316 
20317             final OnnxType type;
20318             final Quantifier quantifier;
20319 
20320             OutputParameter(OnnxType type, Quantifier quantifier) {
20321                 this.type = type;
20322                 this.quantifier = quantifier;
20323             }
20324 
20325             @Override
20326             public OnnxType type() {
20327                 return type;
20328             }
20329 
20330             @Override
20331             public Quantifier quantifier() {
20332                 return quantifier;
20333             }
20334         }
20335 
20336         public static final OnnxSchema SCHEMA = new OnnxSchemaRecord(
20337                 NAME,
20338                 List.of(Attribute.values()),
20339                 List.of(TypeConstraint.values()),
20340                 List.of(InputParameter.values()),
20341                 List.of(OutputParameter.values())
20342         );
20343 
20344         public RandomUniformLike(ExternalizedOp def) {
20345             super(SCHEMA, def);
20346         }
20347 
20348         RandomUniformLike(RandomUniformLike that, CopyContext cc) {
20349             super(that, cc);
20350         }
20351 
20352         @Override
20353         public RandomUniformLike transform(CopyContext cc, OpTransformer ot) {
20354             return new RandomUniformLike(this, cc);
20355         }
20356 
20357         RandomUniformLike(TypeElement resultType, Value input, java.util.Optional<Float> high, java.util.Optional<Float> seed, java.util.Optional<Float> low, java.util.Optional<Long> dtype) {
20358             super(SCHEMA, resultType, Set.of(), List.of(input), List.of(high, seed, low, dtype));
20359         }
20360 
20361         @Override
20362         public SequencedSet<OnnxParameter> onnxOutputs() {
20363             return onnxOutputs(SCHEMA);
20364         }
20365 
20366         @Override
20367         public SequencedMap<OnnxParameter, Object> onnxInputs() {
20368             return onnxInputs(SCHEMA, List.of(input()));
20369         }
20370 
20371         public Value input() {
20372             return operands().get(0);
20373         }
20374 
20375         public java.util.Optional<Float> high() {
20376             Float high = Attribute.high.access(Float.class, onnxAttributes);
20377             return java.util.Optional.ofNullable(high);
20378         }
20379 
20380         public java.util.Optional<Float> seed() {
20381             Float seed = Attribute.seed.access(Float.class, onnxAttributes);
20382             return java.util.Optional.ofNullable(seed);
20383         }
20384 
20385         public java.util.Optional<Float> low() {
20386             Float low = Attribute.low.access(Float.class, onnxAttributes);
20387             return java.util.Optional.ofNullable(low);
20388         }
20389 
20390         public java.util.Optional<Long> dtype() {
20391             Long dtype = Attribute.dtype.access(Long.class, onnxAttributes);
20392             return java.util.Optional.ofNullable(dtype);
20393         }
20394 
20395     }
20396 
20397     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<Long> dtype) {
20398         return new RandomUniformLike(resultType, input, high, seed, low, dtype);
20399     }
20400 
20401     @OpFactoryHelper.OpDeclaration(Range.NAME)
20402     public static final class Range extends OnnxOp {
20403         public static final String NAME = "Range";
20404 
20405         public enum Attribute implements OnnxAttribute.None { }
20406 
20407         public enum TypeConstraint implements OnnxTypeConstraint {
20408             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())))),
20409             ;
20410 
20411             final OnnxType.TypeVariable typeVariable;
20412 
20413             TypeConstraint(OnnxType.TypeVariable typeVariable) {
20414                 assert typeVariable.name().equals(name());
20415                 this.typeVariable = typeVariable;
20416             }
20417 
20418             @Override
20419             public OnnxType.TypeVariable typeVariable() {
20420                 return typeVariable;
20421             }
20422         }
20423 
20424         public enum InputParameter implements OnnxParameter {
20425             start(TypeConstraint.T.typeVariable(), Quantifier.REQUIRED),
20426             limit(TypeConstraint.T.typeVariable(), Quantifier.REQUIRED),
20427             delta(TypeConstraint.T.typeVariable(), Quantifier.REQUIRED),
20428             ;
20429 
20430             final OnnxType type;
20431             final Quantifier quantifier;
20432 
20433             InputParameter(OnnxType type, Quantifier quantifier) {
20434                 this.type = type;
20435                 this.quantifier = quantifier;
20436             }
20437 
20438             @Override
20439             public OnnxType type() {
20440                 return type;
20441             }
20442 
20443             @Override
20444             public Quantifier quantifier() {
20445                 return quantifier;
20446             }
20447         }
20448 
20449         public enum OutputParameter implements OnnxParameter {
20450             output(TypeConstraint.T.typeVariable(), Quantifier.REQUIRED),
20451             ;
20452 
20453             final OnnxType type;
20454             final Quantifier quantifier;
20455 
20456             OutputParameter(OnnxType type, Quantifier quantifier) {
20457                 this.type = type;
20458                 this.quantifier = quantifier;
20459             }
20460 
20461             @Override
20462             public OnnxType type() {
20463                 return type;
20464             }
20465 
20466             @Override
20467             public Quantifier quantifier() {
20468                 return quantifier;
20469             }
20470         }
20471 
20472         public static final OnnxSchema SCHEMA = new OnnxSchemaRecord(
20473                 NAME,
20474                 List.of(Attribute.values()),
20475                 List.of(TypeConstraint.values()),
20476                 List.of(InputParameter.values()),
20477                 List.of(OutputParameter.values())
20478         );
20479 
20480         public Range(ExternalizedOp def) {
20481             super(SCHEMA, def);
20482         }
20483 
20484         Range(Range that, CopyContext cc) {
20485             super(that, cc);
20486         }
20487 
20488         @Override
20489         public Range transform(CopyContext cc, OpTransformer ot) {
20490             return new Range(this, cc);
20491         }
20492 
20493         Range(TypeElement resultType, Value start, Value limit, Value delta) {
20494             super(SCHEMA, resultType, Set.of(), List.of(start, limit, delta), List.of());
20495         }
20496 
20497         @Override
20498         public SequencedSet<OnnxParameter> onnxOutputs() {
20499             return onnxOutputs(SCHEMA);
20500         }
20501 
20502         @Override
20503         public SequencedMap<OnnxParameter, Object> onnxInputs() {
20504             return onnxInputs(SCHEMA, List.of(start(), limit(), delta()));
20505         }
20506 
20507         public Value start() {
20508             return operands().get(0);
20509         }
20510 
20511         public Value limit() {
20512             return operands().get(1);
20513         }
20514 
20515         public Value delta() {
20516             return operands().get(2);
20517         }
20518 
20519     }
20520 
20521     public static Range Range(TypeElement resultType, Value start, Value limit, Value delta) {
20522         return new Range(resultType, start, limit, delta);
20523     }
20524 
20525     @OpFactoryHelper.OpDeclaration(Reciprocal.NAME)
20526     public static final class Reciprocal extends OnnxOp {
20527         public static final String NAME = "Reciprocal";
20528 
20529         public enum Attribute implements OnnxAttribute.None { }
20530 
20531         public enum TypeConstraint implements OnnxTypeConstraint {
20532             T(new OnnxType.TypeVariable("T", List.of(OnnxType.tensor(OnnxType.float16()), OnnxType.tensor(OnnxType.float32()), OnnxType.tensor(OnnxType.float64()), OnnxType.tensor(OnnxType.bfloat16())))),
20533             ;
20534 
20535             final OnnxType.TypeVariable typeVariable;
20536 
20537             TypeConstraint(OnnxType.TypeVariable typeVariable) {
20538                 assert typeVariable.name().equals(name());
20539                 this.typeVariable = typeVariable;
20540             }
20541 
20542             @Override
20543             public OnnxType.TypeVariable typeVariable() {
20544                 return typeVariable;
20545             }
20546         }
20547 
20548         public enum InputParameter implements OnnxParameter {
20549             X(TypeConstraint.T.typeVariable(), Quantifier.REQUIRED),
20550             ;
20551 
20552             final OnnxType type;
20553             final Quantifier quantifier;
20554 
20555             InputParameter(OnnxType type, Quantifier quantifier) {
20556                 this.type = type;
20557                 this.quantifier = quantifier;
20558             }
20559 
20560             @Override
20561             public OnnxType type() {
20562                 return type;
20563             }
20564 
20565             @Override
20566             public Quantifier quantifier() {
20567                 return quantifier;
20568             }
20569         }
20570 
20571         public enum OutputParameter implements OnnxParameter {
20572             Y(TypeConstraint.T.typeVariable(), Quantifier.REQUIRED),
20573             ;
20574 
20575             final OnnxType type;
20576             final Quantifier quantifier;
20577 
20578             OutputParameter(OnnxType type, Quantifier quantifier) {
20579                 this.type = type;
20580                 this.quantifier = quantifier;
20581             }
20582 
20583             @Override
20584             public OnnxType type() {
20585                 return type;
20586             }
20587 
20588             @Override
20589             public Quantifier quantifier() {
20590                 return quantifier;
20591             }
20592         }
20593 
20594         public static final OnnxSchema SCHEMA = new OnnxSchemaRecord(
20595                 NAME,
20596                 List.of(Attribute.values()),
20597                 List.of(TypeConstraint.values()),
20598                 List.of(InputParameter.values()),
20599                 List.of(OutputParameter.values())
20600         );
20601 
20602         public Reciprocal(ExternalizedOp def) {
20603             super(SCHEMA, def);
20604         }
20605 
20606         Reciprocal(Reciprocal that, CopyContext cc) {
20607             super(that, cc);
20608         }
20609 
20610         @Override
20611         public Reciprocal transform(CopyContext cc, OpTransformer ot) {
20612             return new Reciprocal(this, cc);
20613         }
20614 
20615         Reciprocal(TypeElement resultType, Value X) {
20616             super(SCHEMA, resultType, Set.of(), List.of(X), List.of());
20617         }
20618 
20619         @Override
20620         public SequencedSet<OnnxParameter> onnxOutputs() {
20621             return onnxOutputs(SCHEMA);
20622         }
20623 
20624         @Override
20625         public SequencedMap<OnnxParameter, Object> onnxInputs() {
20626             return onnxInputs(SCHEMA, List.of(X()));
20627         }
20628 
20629         public Value X() {
20630             return operands().get(0);
20631         }
20632 
20633     }
20634 
20635     public static Reciprocal Reciprocal(TypeElement resultType, Value X) {
20636         return new Reciprocal(resultType, X);
20637     }
20638 
20639     @OpFactoryHelper.OpDeclaration(ReduceL1.NAME)
20640     public static final class ReduceL1 extends OnnxOp {
20641         public static final String NAME = "ReduceL1";
20642 
20643         public enum Attribute implements OnnxAttribute {
20644             noop_with_empty_axes(Long.class, true, 0),
20645             keepdims(Long.class, true, 1),
20646             ;
20647 
20648                 final Class<?> t;
20649                 final boolean optional;
20650                 final Object defaultValue;
20651 
20652                 Attribute(Class<?> type, boolean optional, Object defaultValue) {
20653                     this.t = type;
20654                     this.optional = optional;
20655                     this.defaultValue = defaultValue;
20656                     assert optional || defaultValue == null;
20657                 }
20658 
20659                 public Class<?> type() {
20660                     return t;
20661                 }
20662 
20663                 public boolean isOptional() {
20664                     return optional;
20665                 }
20666 
20667                 public Object defaultValue() {
20668                     return defaultValue;
20669                 }
20670         }
20671 
20672         public enum TypeConstraint implements OnnxTypeConstraint {
20673             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())))),
20674             ;
20675 
20676             final OnnxType.TypeVariable typeVariable;
20677 
20678             TypeConstraint(OnnxType.TypeVariable typeVariable) {
20679                 assert typeVariable.name().equals(name());
20680                 this.typeVariable = typeVariable;
20681             }
20682 
20683             @Override
20684             public OnnxType.TypeVariable typeVariable() {
20685                 return typeVariable;
20686             }
20687         }
20688 
20689         public enum InputParameter implements OnnxParameter {
20690             data(TypeConstraint.T.typeVariable(), Quantifier.REQUIRED),
20691             axes(OnnxType.tensor(OnnxType.int64()), Quantifier.OPTIONAL),
20692             ;
20693 
20694             final OnnxType type;
20695             final Quantifier quantifier;
20696 
20697             InputParameter(OnnxType type, Quantifier quantifier) {
20698                 this.type = type;
20699                 this.quantifier = quantifier;
20700             }
20701 
20702             @Override
20703             public OnnxType type() {
20704                 return type;
20705             }
20706 
20707             @Override
20708             public Quantifier quantifier() {
20709                 return quantifier;
20710             }
20711         }
20712 
20713         public enum OutputParameter implements OnnxParameter {
20714             reduced(TypeConstraint.T.typeVariable(), Quantifier.REQUIRED),
20715             ;
20716 
20717             final OnnxType type;
20718             final Quantifier quantifier;
20719 
20720             OutputParameter(OnnxType type, Quantifier quantifier) {
20721                 this.type = type;
20722                 this.quantifier = quantifier;
20723             }
20724 
20725             @Override
20726             public OnnxType type() {
20727                 return type;
20728             }
20729 
20730             @Override
20731             public Quantifier quantifier() {
20732                 return quantifier;
20733             }
20734         }
20735 
20736         public static final OnnxSchema SCHEMA = new OnnxSchemaRecord(
20737                 NAME,
20738                 List.of(Attribute.values()),
20739                 List.of(TypeConstraint.values()),
20740                 List.of(InputParameter.values()),
20741                 List.of(OutputParameter.values())
20742         );
20743 
20744         public ReduceL1(ExternalizedOp def) {
20745             super(SCHEMA, def);
20746         }
20747 
20748         ReduceL1(ReduceL1 that, CopyContext cc) {
20749             super(that, cc);
20750         }
20751 
20752         @Override
20753         public ReduceL1 transform(CopyContext cc, OpTransformer ot) {
20754             return new ReduceL1(this, cc);
20755         }
20756 
20757         ReduceL1(TypeElement resultType, Value data, java.util.Optional<Value> axes, java.util.Optional<Long> noop_with_empty_axes, java.util.Optional<Long> keepdims) {
20758             super(SCHEMA, resultType, Set.of(), List.of(data, axes), List.of(noop_with_empty_axes, keepdims));
20759         }
20760 
20761         @Override
20762         public SequencedSet<OnnxParameter> onnxOutputs() {
20763             return onnxOutputs(SCHEMA);
20764         }
20765 
20766         @Override
20767         public SequencedMap<OnnxParameter, Object> onnxInputs() {
20768             return onnxInputs(SCHEMA, List.of(data(), axes()));
20769         }
20770 
20771         public Value data() {
20772             return operands().get(0);
20773         }
20774 
20775         public java.util.Optional<Value> axes() {
20776             int i = optionalInputArguments.indexOf(InputParameter.axes);
20777             return i != -1 ? java.util.Optional.of(operands().get(1 + i)) : java.util.Optional.empty();
20778         }
20779 
20780         public java.util.Optional<Long> noop_with_empty_axes() {
20781             Long noop_with_empty_axes = Attribute.noop_with_empty_axes.access(Long.class, onnxAttributes);
20782             return java.util.Optional.ofNullable(noop_with_empty_axes);
20783         }
20784 
20785         public java.util.Optional<Long> keepdims() {
20786             Long keepdims = Attribute.keepdims.access(Long.class, onnxAttributes);
20787             return java.util.Optional.ofNullable(keepdims);
20788         }
20789 
20790     }
20791 
20792     public static ReduceL1 ReduceL1(TypeElement resultType, Value data, java.util.Optional<Value> axes, java.util.Optional<Long> noop_with_empty_axes, java.util.Optional<Long> keepdims) {
20793         return new ReduceL1(resultType, data, axes, noop_with_empty_axes, keepdims);
20794     }
20795 
20796     @OpFactoryHelper.OpDeclaration(ReduceL2.NAME)
20797     public static final class ReduceL2 extends OnnxOp {
20798         public static final String NAME = "ReduceL2";
20799 
20800         public enum Attribute implements OnnxAttribute {
20801             noop_with_empty_axes(Long.class, true, 0),
20802             keepdims(Long.class, true, 1),
20803             ;
20804 
20805                 final Class<?> t;
20806                 final boolean optional;
20807                 final Object defaultValue;
20808 
20809                 Attribute(Class<?> type, boolean optional, Object defaultValue) {
20810                     this.t = type;
20811                     this.optional = optional;
20812                     this.defaultValue = defaultValue;
20813                     assert optional || defaultValue == null;
20814                 }
20815 
20816                 public Class<?> type() {
20817                     return t;
20818                 }
20819 
20820                 public boolean isOptional() {
20821                     return optional;
20822                 }
20823 
20824                 public Object defaultValue() {
20825                     return defaultValue;
20826                 }
20827         }
20828 
20829         public enum TypeConstraint implements OnnxTypeConstraint {
20830             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())))),
20831             ;
20832 
20833             final OnnxType.TypeVariable typeVariable;
20834 
20835             TypeConstraint(OnnxType.TypeVariable typeVariable) {
20836                 assert typeVariable.name().equals(name());
20837                 this.typeVariable = typeVariable;
20838             }
20839 
20840             @Override
20841             public OnnxType.TypeVariable typeVariable() {
20842                 return typeVariable;
20843             }
20844         }
20845 
20846         public enum InputParameter implements OnnxParameter {
20847             data(TypeConstraint.T.typeVariable(), Quantifier.REQUIRED),
20848             axes(OnnxType.tensor(OnnxType.int64()), Quantifier.OPTIONAL),
20849             ;
20850 
20851             final OnnxType type;
20852             final Quantifier quantifier;
20853 
20854             InputParameter(OnnxType type, Quantifier quantifier) {
20855                 this.type = type;
20856                 this.quantifier = quantifier;
20857             }
20858 
20859             @Override
20860             public OnnxType type() {
20861                 return type;
20862             }
20863 
20864             @Override
20865             public Quantifier quantifier() {
20866                 return quantifier;
20867             }
20868         }
20869 
20870         public enum OutputParameter implements OnnxParameter {
20871             reduced(TypeConstraint.T.typeVariable(), Quantifier.REQUIRED),
20872             ;
20873 
20874             final OnnxType type;
20875             final Quantifier quantifier;
20876 
20877             OutputParameter(OnnxType type, Quantifier quantifier) {
20878                 this.type = type;
20879                 this.quantifier = quantifier;
20880             }
20881 
20882             @Override
20883             public OnnxType type() {
20884                 return type;
20885             }
20886 
20887             @Override
20888             public Quantifier quantifier() {
20889                 return quantifier;
20890             }
20891         }
20892 
20893         public static final OnnxSchema SCHEMA = new OnnxSchemaRecord(
20894                 NAME,
20895                 List.of(Attribute.values()),
20896                 List.of(TypeConstraint.values()),
20897                 List.of(InputParameter.values()),
20898                 List.of(OutputParameter.values())
20899         );
20900 
20901         public ReduceL2(ExternalizedOp def) {
20902             super(SCHEMA, def);
20903         }
20904 
20905         ReduceL2(ReduceL2 that, CopyContext cc) {
20906             super(that, cc);
20907         }
20908 
20909         @Override
20910         public ReduceL2 transform(CopyContext cc, OpTransformer ot) {
20911             return new ReduceL2(this, cc);
20912         }
20913 
20914         ReduceL2(TypeElement resultType, Value data, java.util.Optional<Value> axes, java.util.Optional<Long> noop_with_empty_axes, java.util.Optional<Long> keepdims) {
20915             super(SCHEMA, resultType, Set.of(), List.of(data, axes), List.of(noop_with_empty_axes, keepdims));
20916         }
20917 
20918         @Override
20919         public SequencedSet<OnnxParameter> onnxOutputs() {
20920             return onnxOutputs(SCHEMA);
20921         }
20922 
20923         @Override
20924         public SequencedMap<OnnxParameter, Object> onnxInputs() {
20925             return onnxInputs(SCHEMA, List.of(data(), axes()));
20926         }
20927 
20928         public Value data() {
20929             return operands().get(0);
20930         }
20931 
20932         public java.util.Optional<Value> axes() {
20933             int i = optionalInputArguments.indexOf(InputParameter.axes);
20934             return i != -1 ? java.util.Optional.of(operands().get(1 + i)) : java.util.Optional.empty();
20935         }
20936 
20937         public java.util.Optional<Long> noop_with_empty_axes() {
20938             Long noop_with_empty_axes = Attribute.noop_with_empty_axes.access(Long.class, onnxAttributes);
20939             return java.util.Optional.ofNullable(noop_with_empty_axes);
20940         }
20941 
20942         public java.util.Optional<Long> keepdims() {
20943             Long keepdims = Attribute.keepdims.access(Long.class, onnxAttributes);
20944             return java.util.Optional.ofNullable(keepdims);
20945         }
20946 
20947     }
20948 
20949     public static ReduceL2 ReduceL2(TypeElement resultType, Value data, java.util.Optional<Value> axes, java.util.Optional<Long> noop_with_empty_axes, java.util.Optional<Long> keepdims) {
20950         return new ReduceL2(resultType, data, axes, noop_with_empty_axes, keepdims);
20951     }
20952 
20953     @OpFactoryHelper.OpDeclaration(ReduceLogSum.NAME)
20954     public static final class ReduceLogSum extends OnnxOp {
20955         public static final String NAME = "ReduceLogSum";
20956 
20957         public enum Attribute implements OnnxAttribute {
20958             noop_with_empty_axes(Long.class, true, 0),
20959             keepdims(Long.class, true, 1),
20960             ;
20961 
20962                 final Class<?> t;
20963                 final boolean optional;
20964                 final Object defaultValue;
20965 
20966                 Attribute(Class<?> type, boolean optional, Object defaultValue) {
20967                     this.t = type;
20968                     this.optional = optional;
20969                     this.defaultValue = defaultValue;
20970                     assert optional || defaultValue == null;
20971                 }
20972 
20973                 public Class<?> type() {
20974                     return t;
20975                 }
20976 
20977                 public boolean isOptional() {
20978                     return optional;
20979                 }
20980 
20981                 public Object defaultValue() {
20982                     return defaultValue;
20983                 }
20984         }
20985 
20986         public enum TypeConstraint implements OnnxTypeConstraint {
20987             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())))),
20988             ;
20989 
20990             final OnnxType.TypeVariable typeVariable;
20991 
20992             TypeConstraint(OnnxType.TypeVariable typeVariable) {
20993                 assert typeVariable.name().equals(name());
20994                 this.typeVariable = typeVariable;
20995             }
20996 
20997             @Override
20998             public OnnxType.TypeVariable typeVariable() {
20999                 return typeVariable;
21000             }
21001         }
21002 
21003         public enum InputParameter implements OnnxParameter {
21004             data(TypeConstraint.T.typeVariable(), Quantifier.REQUIRED),
21005             axes(OnnxType.tensor(OnnxType.int64()), Quantifier.OPTIONAL),
21006             ;
21007 
21008             final OnnxType type;
21009             final Quantifier quantifier;
21010 
21011             InputParameter(OnnxType type, Quantifier quantifier) {
21012                 this.type = type;
21013                 this.quantifier = quantifier;
21014             }
21015 
21016             @Override
21017             public OnnxType type() {
21018                 return type;
21019             }
21020 
21021             @Override
21022             public Quantifier quantifier() {
21023                 return quantifier;
21024             }
21025         }
21026 
21027         public enum OutputParameter implements OnnxParameter {
21028             reduced(TypeConstraint.T.typeVariable(), Quantifier.REQUIRED),
21029             ;
21030 
21031             final OnnxType type;
21032             final Quantifier quantifier;
21033 
21034             OutputParameter(OnnxType type, Quantifier quantifier) {
21035                 this.type = type;
21036                 this.quantifier = quantifier;
21037             }
21038 
21039             @Override
21040             public OnnxType type() {
21041                 return type;
21042             }
21043 
21044             @Override
21045             public Quantifier quantifier() {
21046                 return quantifier;
21047             }
21048         }
21049 
21050         public static final OnnxSchema SCHEMA = new OnnxSchemaRecord(
21051                 NAME,
21052                 List.of(Attribute.values()),
21053                 List.of(TypeConstraint.values()),
21054                 List.of(InputParameter.values()),
21055                 List.of(OutputParameter.values())
21056         );
21057 
21058         public ReduceLogSum(ExternalizedOp def) {
21059             super(SCHEMA, def);
21060         }
21061 
21062         ReduceLogSum(ReduceLogSum that, CopyContext cc) {
21063             super(that, cc);
21064         }
21065 
21066         @Override
21067         public ReduceLogSum transform(CopyContext cc, OpTransformer ot) {
21068             return new ReduceLogSum(this, cc);
21069         }
21070 
21071         ReduceLogSum(TypeElement resultType, Value data, java.util.Optional<Value> axes, java.util.Optional<Long> noop_with_empty_axes, java.util.Optional<Long> keepdims) {
21072             super(SCHEMA, resultType, Set.of(), List.of(data, axes), List.of(noop_with_empty_axes, keepdims));
21073         }
21074 
21075         @Override
21076         public SequencedSet<OnnxParameter> onnxOutputs() {
21077             return onnxOutputs(SCHEMA);
21078         }
21079 
21080         @Override
21081         public SequencedMap<OnnxParameter, Object> onnxInputs() {
21082             return onnxInputs(SCHEMA, List.of(data(), axes()));
21083         }
21084 
21085         public Value data() {
21086             return operands().get(0);
21087         }
21088 
21089         public java.util.Optional<Value> axes() {
21090             int i = optionalInputArguments.indexOf(InputParameter.axes);
21091             return i != -1 ? java.util.Optional.of(operands().get(1 + i)) : java.util.Optional.empty();
21092         }
21093 
21094         public java.util.Optional<Long> noop_with_empty_axes() {
21095             Long noop_with_empty_axes = Attribute.noop_with_empty_axes.access(Long.class, onnxAttributes);
21096             return java.util.Optional.ofNullable(noop_with_empty_axes);
21097         }
21098 
21099         public java.util.Optional<Long> keepdims() {
21100             Long keepdims = Attribute.keepdims.access(Long.class, onnxAttributes);
21101             return java.util.Optional.ofNullable(keepdims);
21102         }
21103 
21104     }
21105 
21106     public static ReduceLogSum ReduceLogSum(TypeElement resultType, Value data, java.util.Optional<Value> axes, java.util.Optional<Long> noop_with_empty_axes, java.util.Optional<Long> keepdims) {
21107         return new ReduceLogSum(resultType, data, axes, noop_with_empty_axes, keepdims);
21108     }
21109 
21110     @OpFactoryHelper.OpDeclaration(ReduceLogSumExp.NAME)
21111     public static final class ReduceLogSumExp extends OnnxOp {
21112         public static final String NAME = "ReduceLogSumExp";
21113 
21114         public enum Attribute implements OnnxAttribute {
21115             noop_with_empty_axes(Long.class, true, 0),
21116             keepdims(Long.class, true, 1),
21117             ;
21118 
21119                 final Class<?> t;
21120                 final boolean optional;
21121                 final Object defaultValue;
21122 
21123                 Attribute(Class<?> type, boolean optional, Object defaultValue) {
21124                     this.t = type;
21125                     this.optional = optional;
21126                     this.defaultValue = defaultValue;
21127                     assert optional || defaultValue == null;
21128                 }
21129 
21130                 public Class<?> type() {
21131                     return t;
21132                 }
21133 
21134                 public boolean isOptional() {
21135                     return optional;
21136                 }
21137 
21138                 public Object defaultValue() {
21139                     return defaultValue;
21140                 }
21141         }
21142 
21143         public enum TypeConstraint implements OnnxTypeConstraint {
21144             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())))),
21145             ;
21146 
21147             final OnnxType.TypeVariable typeVariable;
21148 
21149             TypeConstraint(OnnxType.TypeVariable typeVariable) {
21150                 assert typeVariable.name().equals(name());
21151                 this.typeVariable = typeVariable;
21152             }
21153 
21154             @Override
21155             public OnnxType.TypeVariable typeVariable() {
21156                 return typeVariable;
21157             }
21158         }
21159 
21160         public enum InputParameter implements OnnxParameter {
21161             data(TypeConstraint.T.typeVariable(), Quantifier.REQUIRED),
21162             axes(OnnxType.tensor(OnnxType.int64()), Quantifier.OPTIONAL),
21163             ;
21164 
21165             final OnnxType type;
21166             final Quantifier quantifier;
21167 
21168             InputParameter(OnnxType type, Quantifier quantifier) {
21169                 this.type = type;
21170                 this.quantifier = quantifier;
21171             }
21172 
21173             @Override
21174             public OnnxType type() {
21175                 return type;
21176             }
21177 
21178             @Override
21179             public Quantifier quantifier() {
21180                 return quantifier;
21181             }
21182         }
21183 
21184         public enum OutputParameter implements OnnxParameter {
21185             reduced(TypeConstraint.T.typeVariable(), Quantifier.REQUIRED),
21186             ;
21187 
21188             final OnnxType type;
21189             final Quantifier quantifier;
21190 
21191             OutputParameter(OnnxType type, Quantifier quantifier) {
21192                 this.type = type;
21193                 this.quantifier = quantifier;
21194             }
21195 
21196             @Override
21197             public OnnxType type() {
21198                 return type;
21199             }
21200 
21201             @Override
21202             public Quantifier quantifier() {
21203                 return quantifier;
21204             }
21205         }
21206 
21207         public static final OnnxSchema SCHEMA = new OnnxSchemaRecord(
21208                 NAME,
21209                 List.of(Attribute.values()),
21210                 List.of(TypeConstraint.values()),
21211                 List.of(InputParameter.values()),
21212                 List.of(OutputParameter.values())
21213         );
21214 
21215         public ReduceLogSumExp(ExternalizedOp def) {
21216             super(SCHEMA, def);
21217         }
21218 
21219         ReduceLogSumExp(ReduceLogSumExp that, CopyContext cc) {
21220             super(that, cc);
21221         }
21222 
21223         @Override
21224         public ReduceLogSumExp transform(CopyContext cc, OpTransformer ot) {
21225             return new ReduceLogSumExp(this, cc);
21226         }
21227 
21228         ReduceLogSumExp(TypeElement resultType, Value data, java.util.Optional<Value> axes, java.util.Optional<Long> noop_with_empty_axes, java.util.Optional<Long> keepdims) {
21229             super(SCHEMA, resultType, Set.of(), List.of(data, axes), List.of(noop_with_empty_axes, keepdims));
21230         }
21231 
21232         @Override
21233         public SequencedSet<OnnxParameter> onnxOutputs() {
21234             return onnxOutputs(SCHEMA);
21235         }
21236 
21237         @Override
21238         public SequencedMap<OnnxParameter, Object> onnxInputs() {
21239             return onnxInputs(SCHEMA, List.of(data(), axes()));
21240         }
21241 
21242         public Value data() {
21243             return operands().get(0);
21244         }
21245 
21246         public java.util.Optional<Value> axes() {
21247             int i = optionalInputArguments.indexOf(InputParameter.axes);
21248             return i != -1 ? java.util.Optional.of(operands().get(1 + i)) : java.util.Optional.empty();
21249         }
21250 
21251         public java.util.Optional<Long> noop_with_empty_axes() {
21252             Long noop_with_empty_axes = Attribute.noop_with_empty_axes.access(Long.class, onnxAttributes);
21253             return java.util.Optional.ofNullable(noop_with_empty_axes);
21254         }
21255 
21256         public java.util.Optional<Long> keepdims() {
21257             Long keepdims = Attribute.keepdims.access(Long.class, onnxAttributes);
21258             return java.util.Optional.ofNullable(keepdims);
21259         }
21260 
21261     }
21262 
21263     public static ReduceLogSumExp ReduceLogSumExp(TypeElement resultType, Value data, java.util.Optional<Value> axes, java.util.Optional<Long> noop_with_empty_axes, java.util.Optional<Long> keepdims) {
21264         return new ReduceLogSumExp(resultType, data, axes, noop_with_empty_axes, keepdims);
21265     }
21266 
21267     @OpFactoryHelper.OpDeclaration(ReduceMax.NAME)
21268     public static final class ReduceMax extends OnnxOp {
21269         public static final String NAME = "ReduceMax";
21270 
21271         public enum Attribute implements OnnxAttribute {
21272             noop_with_empty_axes(Long.class, true, 0),
21273             keepdims(Long.class, true, 1),
21274             ;
21275 
21276                 final Class<?> t;
21277                 final boolean optional;
21278                 final Object defaultValue;
21279 
21280                 Attribute(Class<?> type, boolean optional, Object defaultValue) {
21281                     this.t = type;
21282                     this.optional = optional;
21283                     this.defaultValue = defaultValue;
21284                     assert optional || defaultValue == null;
21285                 }
21286 
21287                 public Class<?> type() {
21288                     return t;
21289                 }
21290 
21291                 public boolean isOptional() {
21292                     return optional;
21293                 }
21294 
21295                 public Object defaultValue() {
21296                     return defaultValue;
21297                 }
21298         }
21299 
21300         public enum TypeConstraint implements OnnxTypeConstraint {
21301             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())))),
21302             ;
21303 
21304             final OnnxType.TypeVariable typeVariable;
21305 
21306             TypeConstraint(OnnxType.TypeVariable typeVariable) {
21307                 assert typeVariable.name().equals(name());
21308                 this.typeVariable = typeVariable;
21309             }
21310 
21311             @Override
21312             public OnnxType.TypeVariable typeVariable() {
21313                 return typeVariable;
21314             }
21315         }
21316 
21317         public enum InputParameter implements OnnxParameter {
21318             data(TypeConstraint.T.typeVariable(), Quantifier.REQUIRED),
21319             axes(OnnxType.tensor(OnnxType.int64()), Quantifier.OPTIONAL),
21320             ;
21321 
21322             final OnnxType type;
21323             final Quantifier quantifier;
21324 
21325             InputParameter(OnnxType type, Quantifier quantifier) {
21326                 this.type = type;
21327                 this.quantifier = quantifier;
21328             }
21329 
21330             @Override
21331             public OnnxType type() {
21332                 return type;
21333             }
21334 
21335             @Override
21336             public Quantifier quantifier() {
21337                 return quantifier;
21338             }
21339         }
21340 
21341         public enum OutputParameter implements OnnxParameter {
21342             reduced(TypeConstraint.T.typeVariable(), Quantifier.REQUIRED),
21343             ;
21344 
21345             final OnnxType type;
21346             final Quantifier quantifier;
21347 
21348             OutputParameter(OnnxType type, Quantifier quantifier) {
21349                 this.type = type;
21350                 this.quantifier = quantifier;
21351             }
21352 
21353             @Override
21354             public OnnxType type() {
21355                 return type;
21356             }
21357 
21358             @Override
21359             public Quantifier quantifier() {
21360                 return quantifier;
21361             }
21362         }
21363 
21364         public static final OnnxSchema SCHEMA = new OnnxSchemaRecord(
21365                 NAME,
21366                 List.of(Attribute.values()),
21367                 List.of(TypeConstraint.values()),
21368                 List.of(InputParameter.values()),
21369                 List.of(OutputParameter.values())
21370         );
21371 
21372         public ReduceMax(ExternalizedOp def) {
21373             super(SCHEMA, def);
21374         }
21375 
21376         ReduceMax(ReduceMax that, CopyContext cc) {
21377             super(that, cc);
21378         }
21379 
21380         @Override
21381         public ReduceMax transform(CopyContext cc, OpTransformer ot) {
21382             return new ReduceMax(this, cc);
21383         }
21384 
21385         ReduceMax(TypeElement resultType, Value data, java.util.Optional<Value> axes, java.util.Optional<Long> noop_with_empty_axes, java.util.Optional<Long> keepdims) {
21386             super(SCHEMA, resultType, Set.of(), List.of(data, axes), List.of(noop_with_empty_axes, keepdims));
21387         }
21388 
21389         @Override
21390         public SequencedSet<OnnxParameter> onnxOutputs() {
21391             return onnxOutputs(SCHEMA);
21392         }
21393 
21394         @Override
21395         public SequencedMap<OnnxParameter, Object> onnxInputs() {
21396             return onnxInputs(SCHEMA, List.of(data(), axes()));
21397         }
21398 
21399         public Value data() {
21400             return operands().get(0);
21401         }
21402 
21403         public java.util.Optional<Value> axes() {
21404             int i = optionalInputArguments.indexOf(InputParameter.axes);
21405             return i != -1 ? java.util.Optional.of(operands().get(1 + i)) : java.util.Optional.empty();
21406         }
21407 
21408         public java.util.Optional<Long> noop_with_empty_axes() {
21409             Long noop_with_empty_axes = Attribute.noop_with_empty_axes.access(Long.class, onnxAttributes);
21410             return java.util.Optional.ofNullable(noop_with_empty_axes);
21411         }
21412 
21413         public java.util.Optional<Long> keepdims() {
21414             Long keepdims = Attribute.keepdims.access(Long.class, onnxAttributes);
21415             return java.util.Optional.ofNullable(keepdims);
21416         }
21417 
21418     }
21419 
21420     public static ReduceMax ReduceMax(TypeElement resultType, Value data, java.util.Optional<Value> axes, java.util.Optional<Long> noop_with_empty_axes, java.util.Optional<Long> keepdims) {
21421         return new ReduceMax(resultType, data, axes, noop_with_empty_axes, keepdims);
21422     }
21423 
21424     @OpFactoryHelper.OpDeclaration(ReduceMean.NAME)
21425     public static final class ReduceMean extends OnnxOp {
21426         public static final String NAME = "ReduceMean";
21427 
21428         public enum Attribute implements OnnxAttribute {
21429             noop_with_empty_axes(Long.class, true, 0),
21430             keepdims(Long.class, true, 1),
21431             ;
21432 
21433                 final Class<?> t;
21434                 final boolean optional;
21435                 final Object defaultValue;
21436 
21437                 Attribute(Class<?> type, boolean optional, Object defaultValue) {
21438                     this.t = type;
21439                     this.optional = optional;
21440                     this.defaultValue = defaultValue;
21441                     assert optional || defaultValue == null;
21442                 }
21443 
21444                 public Class<?> type() {
21445                     return t;
21446                 }
21447 
21448                 public boolean isOptional() {
21449                     return optional;
21450                 }
21451 
21452                 public Object defaultValue() {
21453                     return defaultValue;
21454                 }
21455         }
21456 
21457         public enum TypeConstraint implements OnnxTypeConstraint {
21458             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())))),
21459             ;
21460 
21461             final OnnxType.TypeVariable typeVariable;
21462 
21463             TypeConstraint(OnnxType.TypeVariable typeVariable) {
21464                 assert typeVariable.name().equals(name());
21465                 this.typeVariable = typeVariable;
21466             }
21467 
21468             @Override
21469             public OnnxType.TypeVariable typeVariable() {
21470                 return typeVariable;
21471             }
21472         }
21473 
21474         public enum InputParameter implements OnnxParameter {
21475             data(TypeConstraint.T.typeVariable(), Quantifier.REQUIRED),
21476             axes(OnnxType.tensor(OnnxType.int64()), Quantifier.OPTIONAL),
21477             ;
21478 
21479             final OnnxType type;
21480             final Quantifier quantifier;
21481 
21482             InputParameter(OnnxType type, Quantifier quantifier) {
21483                 this.type = type;
21484                 this.quantifier = quantifier;
21485             }
21486 
21487             @Override
21488             public OnnxType type() {
21489                 return type;
21490             }
21491 
21492             @Override
21493             public Quantifier quantifier() {
21494                 return quantifier;
21495             }
21496         }
21497 
21498         public enum OutputParameter implements OnnxParameter {
21499             reduced(TypeConstraint.T.typeVariable(), Quantifier.REQUIRED),
21500             ;
21501 
21502             final OnnxType type;
21503             final Quantifier quantifier;
21504 
21505             OutputParameter(OnnxType type, Quantifier quantifier) {
21506                 this.type = type;
21507                 this.quantifier = quantifier;
21508             }
21509 
21510             @Override
21511             public OnnxType type() {
21512                 return type;
21513             }
21514 
21515             @Override
21516             public Quantifier quantifier() {
21517                 return quantifier;
21518             }
21519         }
21520 
21521         public static final OnnxSchema SCHEMA = new OnnxSchemaRecord(
21522                 NAME,
21523                 List.of(Attribute.values()),
21524                 List.of(TypeConstraint.values()),
21525                 List.of(InputParameter.values()),
21526                 List.of(OutputParameter.values())
21527         );
21528 
21529         public ReduceMean(ExternalizedOp def) {
21530             super(SCHEMA, def);
21531         }
21532 
21533         ReduceMean(ReduceMean that, CopyContext cc) {
21534             super(that, cc);
21535         }
21536 
21537         @Override
21538         public ReduceMean transform(CopyContext cc, OpTransformer ot) {
21539             return new ReduceMean(this, cc);
21540         }
21541 
21542         ReduceMean(TypeElement resultType, Value data, java.util.Optional<Value> axes, java.util.Optional<Long> noop_with_empty_axes, java.util.Optional<Long> keepdims) {
21543             super(SCHEMA, resultType, Set.of(), List.of(data, axes), List.of(noop_with_empty_axes, keepdims));
21544         }
21545 
21546         @Override
21547         public SequencedSet<OnnxParameter> onnxOutputs() {
21548             return onnxOutputs(SCHEMA);
21549         }
21550 
21551         @Override
21552         public SequencedMap<OnnxParameter, Object> onnxInputs() {
21553             return onnxInputs(SCHEMA, List.of(data(), axes()));
21554         }
21555 
21556         public Value data() {
21557             return operands().get(0);
21558         }
21559 
21560         public java.util.Optional<Value> axes() {
21561             int i = optionalInputArguments.indexOf(InputParameter.axes);
21562             return i != -1 ? java.util.Optional.of(operands().get(1 + i)) : java.util.Optional.empty();
21563         }
21564 
21565         public java.util.Optional<Long> noop_with_empty_axes() {
21566             Long noop_with_empty_axes = Attribute.noop_with_empty_axes.access(Long.class, onnxAttributes);
21567             return java.util.Optional.ofNullable(noop_with_empty_axes);
21568         }
21569 
21570         public java.util.Optional<Long> keepdims() {
21571             Long keepdims = Attribute.keepdims.access(Long.class, onnxAttributes);
21572             return java.util.Optional.ofNullable(keepdims);
21573         }
21574 
21575     }
21576 
21577     public static ReduceMean ReduceMean(TypeElement resultType, Value data, java.util.Optional<Value> axes, java.util.Optional<Long> noop_with_empty_axes, java.util.Optional<Long> keepdims) {
21578         return new ReduceMean(resultType, data, axes, noop_with_empty_axes, keepdims);
21579     }
21580 
21581     @OpFactoryHelper.OpDeclaration(ReduceMin.NAME)
21582     public static final class ReduceMin extends OnnxOp {
21583         public static final String NAME = "ReduceMin";
21584 
21585         public enum Attribute implements OnnxAttribute {
21586             noop_with_empty_axes(Long.class, true, 0),
21587             keepdims(Long.class, true, 1),
21588             ;
21589 
21590                 final Class<?> t;
21591                 final boolean optional;
21592                 final Object defaultValue;
21593 
21594                 Attribute(Class<?> type, boolean optional, Object defaultValue) {
21595                     this.t = type;
21596                     this.optional = optional;
21597                     this.defaultValue = defaultValue;
21598                     assert optional || defaultValue == null;
21599                 }
21600 
21601                 public Class<?> type() {
21602                     return t;
21603                 }
21604 
21605                 public boolean isOptional() {
21606                     return optional;
21607                 }
21608 
21609                 public Object defaultValue() {
21610                     return defaultValue;
21611                 }
21612         }
21613 
21614         public enum TypeConstraint implements OnnxTypeConstraint {
21615             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())))),
21616             ;
21617 
21618             final OnnxType.TypeVariable typeVariable;
21619 
21620             TypeConstraint(OnnxType.TypeVariable typeVariable) {
21621                 assert typeVariable.name().equals(name());
21622                 this.typeVariable = typeVariable;
21623             }
21624 
21625             @Override
21626             public OnnxType.TypeVariable typeVariable() {
21627                 return typeVariable;
21628             }
21629         }
21630 
21631         public enum InputParameter implements OnnxParameter {
21632             data(TypeConstraint.T.typeVariable(), Quantifier.REQUIRED),
21633             axes(OnnxType.tensor(OnnxType.int64()), Quantifier.OPTIONAL),
21634             ;
21635 
21636             final OnnxType type;
21637             final Quantifier quantifier;
21638 
21639             InputParameter(OnnxType type, Quantifier quantifier) {
21640                 this.type = type;
21641                 this.quantifier = quantifier;
21642             }
21643 
21644             @Override
21645             public OnnxType type() {
21646                 return type;
21647             }
21648 
21649             @Override
21650             public Quantifier quantifier() {
21651                 return quantifier;
21652             }
21653         }
21654 
21655         public enum OutputParameter implements OnnxParameter {
21656             reduced(TypeConstraint.T.typeVariable(), Quantifier.REQUIRED),
21657             ;
21658 
21659             final OnnxType type;
21660             final Quantifier quantifier;
21661 
21662             OutputParameter(OnnxType type, Quantifier quantifier) {
21663                 this.type = type;
21664                 this.quantifier = quantifier;
21665             }
21666 
21667             @Override
21668             public OnnxType type() {
21669                 return type;
21670             }
21671 
21672             @Override
21673             public Quantifier quantifier() {
21674                 return quantifier;
21675             }
21676         }
21677 
21678         public static final OnnxSchema SCHEMA = new OnnxSchemaRecord(
21679                 NAME,
21680                 List.of(Attribute.values()),
21681                 List.of(TypeConstraint.values()),
21682                 List.of(InputParameter.values()),
21683                 List.of(OutputParameter.values())
21684         );
21685 
21686         public ReduceMin(ExternalizedOp def) {
21687             super(SCHEMA, def);
21688         }
21689 
21690         ReduceMin(ReduceMin that, CopyContext cc) {
21691             super(that, cc);
21692         }
21693 
21694         @Override
21695         public ReduceMin transform(CopyContext cc, OpTransformer ot) {
21696             return new ReduceMin(this, cc);
21697         }
21698 
21699         ReduceMin(TypeElement resultType, Value data, java.util.Optional<Value> axes, java.util.Optional<Long> noop_with_empty_axes, java.util.Optional<Long> keepdims) {
21700             super(SCHEMA, resultType, Set.of(), List.of(data, axes), List.of(noop_with_empty_axes, keepdims));
21701         }
21702 
21703         @Override
21704         public SequencedSet<OnnxParameter> onnxOutputs() {
21705             return onnxOutputs(SCHEMA);
21706         }
21707 
21708         @Override
21709         public SequencedMap<OnnxParameter, Object> onnxInputs() {
21710             return onnxInputs(SCHEMA, List.of(data(), axes()));
21711         }
21712 
21713         public Value data() {
21714             return operands().get(0);
21715         }
21716 
21717         public java.util.Optional<Value> axes() {
21718             int i = optionalInputArguments.indexOf(InputParameter.axes);
21719             return i != -1 ? java.util.Optional.of(operands().get(1 + i)) : java.util.Optional.empty();
21720         }
21721 
21722         public java.util.Optional<Long> noop_with_empty_axes() {
21723             Long noop_with_empty_axes = Attribute.noop_with_empty_axes.access(Long.class, onnxAttributes);
21724             return java.util.Optional.ofNullable(noop_with_empty_axes);
21725         }
21726 
21727         public java.util.Optional<Long> keepdims() {
21728             Long keepdims = Attribute.keepdims.access(Long.class, onnxAttributes);
21729             return java.util.Optional.ofNullable(keepdims);
21730         }
21731 
21732     }
21733 
21734     public static ReduceMin ReduceMin(TypeElement resultType, Value data, java.util.Optional<Value> axes, java.util.Optional<Long> noop_with_empty_axes, java.util.Optional<Long> keepdims) {
21735         return new ReduceMin(resultType, data, axes, noop_with_empty_axes, keepdims);
21736     }
21737 
21738     @OpFactoryHelper.OpDeclaration(ReduceProd.NAME)
21739     public static final class ReduceProd extends OnnxOp {
21740         public static final String NAME = "ReduceProd";
21741 
21742         public enum Attribute implements OnnxAttribute {
21743             noop_with_empty_axes(Long.class, true, 0),
21744             keepdims(Long.class, true, 1),
21745             ;
21746 
21747                 final Class<?> t;
21748                 final boolean optional;
21749                 final Object defaultValue;
21750 
21751                 Attribute(Class<?> type, boolean optional, Object defaultValue) {
21752                     this.t = type;
21753                     this.optional = optional;
21754                     this.defaultValue = defaultValue;
21755                     assert optional || defaultValue == null;
21756                 }
21757 
21758                 public Class<?> type() {
21759                     return t;
21760                 }
21761 
21762                 public boolean isOptional() {
21763                     return optional;
21764                 }
21765 
21766                 public Object defaultValue() {
21767                     return defaultValue;
21768                 }
21769         }
21770 
21771         public enum TypeConstraint implements OnnxTypeConstraint {
21772             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())))),
21773             ;
21774 
21775             final OnnxType.TypeVariable typeVariable;
21776 
21777             TypeConstraint(OnnxType.TypeVariable typeVariable) {
21778                 assert typeVariable.name().equals(name());
21779                 this.typeVariable = typeVariable;
21780             }
21781 
21782             @Override
21783             public OnnxType.TypeVariable typeVariable() {
21784                 return typeVariable;
21785             }
21786         }
21787 
21788         public enum InputParameter implements OnnxParameter {
21789             data(TypeConstraint.T.typeVariable(), Quantifier.REQUIRED),
21790             axes(OnnxType.tensor(OnnxType.int64()), Quantifier.OPTIONAL),
21791             ;
21792 
21793             final OnnxType type;
21794             final Quantifier quantifier;
21795 
21796             InputParameter(OnnxType type, Quantifier quantifier) {
21797                 this.type = type;
21798                 this.quantifier = quantifier;
21799             }
21800 
21801             @Override
21802             public OnnxType type() {
21803                 return type;
21804             }
21805 
21806             @Override
21807             public Quantifier quantifier() {
21808                 return quantifier;
21809             }
21810         }
21811 
21812         public enum OutputParameter implements OnnxParameter {
21813             reduced(TypeConstraint.T.typeVariable(), Quantifier.REQUIRED),
21814             ;
21815 
21816             final OnnxType type;
21817             final Quantifier quantifier;
21818 
21819             OutputParameter(OnnxType type, Quantifier quantifier) {
21820                 this.type = type;
21821                 this.quantifier = quantifier;
21822             }
21823 
21824             @Override
21825             public OnnxType type() {
21826                 return type;
21827             }
21828 
21829             @Override
21830             public Quantifier quantifier() {
21831                 return quantifier;
21832             }
21833         }
21834 
21835         public static final OnnxSchema SCHEMA = new OnnxSchemaRecord(
21836                 NAME,
21837                 List.of(Attribute.values()),
21838                 List.of(TypeConstraint.values()),
21839                 List.of(InputParameter.values()),
21840                 List.of(OutputParameter.values())
21841         );
21842 
21843         public ReduceProd(ExternalizedOp def) {
21844             super(SCHEMA, def);
21845         }
21846 
21847         ReduceProd(ReduceProd that, CopyContext cc) {
21848             super(that, cc);
21849         }
21850 
21851         @Override
21852         public ReduceProd transform(CopyContext cc, OpTransformer ot) {
21853             return new ReduceProd(this, cc);
21854         }
21855 
21856         ReduceProd(TypeElement resultType, Value data, java.util.Optional<Value> axes, java.util.Optional<Long> noop_with_empty_axes, java.util.Optional<Long> keepdims) {
21857             super(SCHEMA, resultType, Set.of(), List.of(data, axes), List.of(noop_with_empty_axes, keepdims));
21858         }
21859 
21860         @Override
21861         public SequencedSet<OnnxParameter> onnxOutputs() {
21862             return onnxOutputs(SCHEMA);
21863         }
21864 
21865         @Override
21866         public SequencedMap<OnnxParameter, Object> onnxInputs() {
21867             return onnxInputs(SCHEMA, List.of(data(), axes()));
21868         }
21869 
21870         public Value data() {
21871             return operands().get(0);
21872         }
21873 
21874         public java.util.Optional<Value> axes() {
21875             int i = optionalInputArguments.indexOf(InputParameter.axes);
21876             return i != -1 ? java.util.Optional.of(operands().get(1 + i)) : java.util.Optional.empty();
21877         }
21878 
21879         public java.util.Optional<Long> noop_with_empty_axes() {
21880             Long noop_with_empty_axes = Attribute.noop_with_empty_axes.access(Long.class, onnxAttributes);
21881             return java.util.Optional.ofNullable(noop_with_empty_axes);
21882         }
21883 
21884         public java.util.Optional<Long> keepdims() {
21885             Long keepdims = Attribute.keepdims.access(Long.class, onnxAttributes);
21886             return java.util.Optional.ofNullable(keepdims);
21887         }
21888 
21889     }
21890 
21891     public static ReduceProd ReduceProd(TypeElement resultType, Value data, java.util.Optional<Value> axes, java.util.Optional<Long> noop_with_empty_axes, java.util.Optional<Long> keepdims) {
21892         return new ReduceProd(resultType, data, axes, noop_with_empty_axes, keepdims);
21893     }
21894 
21895     @OpFactoryHelper.OpDeclaration(ReduceSum.NAME)
21896     public static final class ReduceSum extends OnnxOp {
21897         public static final String NAME = "ReduceSum";
21898 
21899         public enum Attribute implements OnnxAttribute {
21900             noop_with_empty_axes(Long.class, true, 0),
21901             keepdims(Long.class, true, 1),
21902             ;
21903 
21904                 final Class<?> t;
21905                 final boolean optional;
21906                 final Object defaultValue;
21907 
21908                 Attribute(Class<?> type, boolean optional, Object defaultValue) {
21909                     this.t = type;
21910                     this.optional = optional;
21911                     this.defaultValue = defaultValue;
21912                     assert optional || defaultValue == null;
21913                 }
21914 
21915                 public Class<?> type() {
21916                     return t;
21917                 }
21918 
21919                 public boolean isOptional() {
21920                     return optional;
21921                 }
21922 
21923                 public Object defaultValue() {
21924                     return defaultValue;
21925                 }
21926         }
21927 
21928         public enum TypeConstraint implements OnnxTypeConstraint {
21929             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())))),
21930             ;
21931 
21932             final OnnxType.TypeVariable typeVariable;
21933 
21934             TypeConstraint(OnnxType.TypeVariable typeVariable) {
21935                 assert typeVariable.name().equals(name());
21936                 this.typeVariable = typeVariable;
21937             }
21938 
21939             @Override
21940             public OnnxType.TypeVariable typeVariable() {
21941                 return typeVariable;
21942             }
21943         }
21944 
21945         public enum InputParameter implements OnnxParameter {
21946             data(TypeConstraint.T.typeVariable(), Quantifier.REQUIRED),
21947             axes(OnnxType.tensor(OnnxType.int64()), Quantifier.OPTIONAL),
21948             ;
21949 
21950             final OnnxType type;
21951             final Quantifier quantifier;
21952 
21953             InputParameter(OnnxType type, Quantifier quantifier) {
21954                 this.type = type;
21955                 this.quantifier = quantifier;
21956             }
21957 
21958             @Override
21959             public OnnxType type() {
21960                 return type;
21961             }
21962 
21963             @Override
21964             public Quantifier quantifier() {
21965                 return quantifier;
21966             }
21967         }
21968 
21969         public enum OutputParameter implements OnnxParameter {
21970             reduced(TypeConstraint.T.typeVariable(), Quantifier.REQUIRED),
21971             ;
21972 
21973             final OnnxType type;
21974             final Quantifier quantifier;
21975 
21976             OutputParameter(OnnxType type, Quantifier quantifier) {
21977                 this.type = type;
21978                 this.quantifier = quantifier;
21979             }
21980 
21981             @Override
21982             public OnnxType type() {
21983                 return type;
21984             }
21985 
21986             @Override
21987             public Quantifier quantifier() {
21988                 return quantifier;
21989             }
21990         }
21991 
21992         public static final OnnxSchema SCHEMA = new OnnxSchemaRecord(
21993                 NAME,
21994                 List.of(Attribute.values()),
21995                 List.of(TypeConstraint.values()),
21996                 List.of(InputParameter.values()),
21997                 List.of(OutputParameter.values())
21998         );
21999 
22000         public ReduceSum(ExternalizedOp def) {
22001             super(SCHEMA, def);
22002         }
22003 
22004         ReduceSum(ReduceSum that, CopyContext cc) {
22005             super(that, cc);
22006         }
22007 
22008         @Override
22009         public ReduceSum transform(CopyContext cc, OpTransformer ot) {
22010             return new ReduceSum(this, cc);
22011         }
22012 
22013         ReduceSum(TypeElement resultType, Value data, java.util.Optional<Value> axes, java.util.Optional<Long> noop_with_empty_axes, java.util.Optional<Long> keepdims) {
22014             super(SCHEMA, resultType, Set.of(), List.of(data, axes), List.of(noop_with_empty_axes, keepdims));
22015         }
22016 
22017         @Override
22018         public SequencedSet<OnnxParameter> onnxOutputs() {
22019             return onnxOutputs(SCHEMA);
22020         }
22021 
22022         @Override
22023         public SequencedMap<OnnxParameter, Object> onnxInputs() {
22024             return onnxInputs(SCHEMA, List.of(data(), axes()));
22025         }
22026 
22027         public Value data() {
22028             return operands().get(0);
22029         }
22030 
22031         public java.util.Optional<Value> axes() {
22032             int i = optionalInputArguments.indexOf(InputParameter.axes);
22033             return i != -1 ? java.util.Optional.of(operands().get(1 + i)) : java.util.Optional.empty();
22034         }
22035 
22036         public java.util.Optional<Long> noop_with_empty_axes() {
22037             Long noop_with_empty_axes = Attribute.noop_with_empty_axes.access(Long.class, onnxAttributes);
22038             return java.util.Optional.ofNullable(noop_with_empty_axes);
22039         }
22040 
22041         public java.util.Optional<Long> keepdims() {
22042             Long keepdims = Attribute.keepdims.access(Long.class, onnxAttributes);
22043             return java.util.Optional.ofNullable(keepdims);
22044         }
22045 
22046     }
22047 
22048     public static ReduceSum ReduceSum(TypeElement resultType, Value data, java.util.Optional<Value> axes, java.util.Optional<Long> noop_with_empty_axes, java.util.Optional<Long> keepdims) {
22049         return new ReduceSum(resultType, data, axes, noop_with_empty_axes, keepdims);
22050     }
22051 
22052     @OpFactoryHelper.OpDeclaration(ReduceSumSquare.NAME)
22053     public static final class ReduceSumSquare extends OnnxOp {
22054         public static final String NAME = "ReduceSumSquare";
22055 
22056         public enum Attribute implements OnnxAttribute {
22057             noop_with_empty_axes(Long.class, true, 0),
22058             keepdims(Long.class, true, 1),
22059             ;
22060 
22061                 final Class<?> t;
22062                 final boolean optional;
22063                 final Object defaultValue;
22064 
22065                 Attribute(Class<?> type, boolean optional, Object defaultValue) {
22066                     this.t = type;
22067                     this.optional = optional;
22068                     this.defaultValue = defaultValue;
22069                     assert optional || defaultValue == null;
22070                 }
22071 
22072                 public Class<?> type() {
22073                     return t;
22074                 }
22075 
22076                 public boolean isOptional() {
22077                     return optional;
22078                 }
22079 
22080                 public Object defaultValue() {
22081                     return defaultValue;
22082                 }
22083         }
22084 
22085         public enum TypeConstraint implements OnnxTypeConstraint {
22086             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())))),
22087             ;
22088 
22089             final OnnxType.TypeVariable typeVariable;
22090 
22091             TypeConstraint(OnnxType.TypeVariable typeVariable) {
22092                 assert typeVariable.name().equals(name());
22093                 this.typeVariable = typeVariable;
22094             }
22095 
22096             @Override
22097             public OnnxType.TypeVariable typeVariable() {
22098                 return typeVariable;
22099             }
22100         }
22101 
22102         public enum InputParameter implements OnnxParameter {
22103             data(TypeConstraint.T.typeVariable(), Quantifier.REQUIRED),
22104             axes(OnnxType.tensor(OnnxType.int64()), Quantifier.OPTIONAL),
22105             ;
22106 
22107             final OnnxType type;
22108             final Quantifier quantifier;
22109 
22110             InputParameter(OnnxType type, Quantifier quantifier) {
22111                 this.type = type;
22112                 this.quantifier = quantifier;
22113             }
22114 
22115             @Override
22116             public OnnxType type() {
22117                 return type;
22118             }
22119 
22120             @Override
22121             public Quantifier quantifier() {
22122                 return quantifier;
22123             }
22124         }
22125 
22126         public enum OutputParameter implements OnnxParameter {
22127             reduced(TypeConstraint.T.typeVariable(), Quantifier.REQUIRED),
22128             ;
22129 
22130             final OnnxType type;
22131             final Quantifier quantifier;
22132 
22133             OutputParameter(OnnxType type, Quantifier quantifier) {
22134                 this.type = type;
22135                 this.quantifier = quantifier;
22136             }
22137 
22138             @Override
22139             public OnnxType type() {
22140                 return type;
22141             }
22142 
22143             @Override
22144             public Quantifier quantifier() {
22145                 return quantifier;
22146             }
22147         }
22148 
22149         public static final OnnxSchema SCHEMA = new OnnxSchemaRecord(
22150                 NAME,
22151                 List.of(Attribute.values()),
22152                 List.of(TypeConstraint.values()),
22153                 List.of(InputParameter.values()),
22154                 List.of(OutputParameter.values())
22155         );
22156 
22157         public ReduceSumSquare(ExternalizedOp def) {
22158             super(SCHEMA, def);
22159         }
22160 
22161         ReduceSumSquare(ReduceSumSquare that, CopyContext cc) {
22162             super(that, cc);
22163         }
22164 
22165         @Override
22166         public ReduceSumSquare transform(CopyContext cc, OpTransformer ot) {
22167             return new ReduceSumSquare(this, cc);
22168         }
22169 
22170         ReduceSumSquare(TypeElement resultType, Value data, java.util.Optional<Value> axes, java.util.Optional<Long> noop_with_empty_axes, java.util.Optional<Long> keepdims) {
22171             super(SCHEMA, resultType, Set.of(), List.of(data, axes), List.of(noop_with_empty_axes, keepdims));
22172         }
22173 
22174         @Override
22175         public SequencedSet<OnnxParameter> onnxOutputs() {
22176             return onnxOutputs(SCHEMA);
22177         }
22178 
22179         @Override
22180         public SequencedMap<OnnxParameter, Object> onnxInputs() {
22181             return onnxInputs(SCHEMA, List.of(data(), axes()));
22182         }
22183 
22184         public Value data() {
22185             return operands().get(0);
22186         }
22187 
22188         public java.util.Optional<Value> axes() {
22189             int i = optionalInputArguments.indexOf(InputParameter.axes);
22190             return i != -1 ? java.util.Optional.of(operands().get(1 + i)) : java.util.Optional.empty();
22191         }
22192 
22193         public java.util.Optional<Long> noop_with_empty_axes() {
22194             Long noop_with_empty_axes = Attribute.noop_with_empty_axes.access(Long.class, onnxAttributes);
22195             return java.util.Optional.ofNullable(noop_with_empty_axes);
22196         }
22197 
22198         public java.util.Optional<Long> keepdims() {
22199             Long keepdims = Attribute.keepdims.access(Long.class, onnxAttributes);
22200             return java.util.Optional.ofNullable(keepdims);
22201         }
22202 
22203     }
22204 
22205     public static ReduceSumSquare ReduceSumSquare(TypeElement resultType, Value data, java.util.Optional<Value> axes, java.util.Optional<Long> noop_with_empty_axes, java.util.Optional<Long> keepdims) {
22206         return new ReduceSumSquare(resultType, data, axes, noop_with_empty_axes, keepdims);
22207     }
22208 
22209     @OpFactoryHelper.OpDeclaration(RegexFullMatch.NAME)
22210     public static final class RegexFullMatch extends OnnxOp {
22211         public static final String NAME = "RegexFullMatch";
22212 
22213         public enum Attribute implements OnnxAttribute {
22214             pattern(String.class, true, null),
22215             ;
22216 
22217                 final Class<?> t;
22218                 final boolean optional;
22219                 final Object defaultValue;
22220 
22221                 Attribute(Class<?> type, boolean optional, Object defaultValue) {
22222                     this.t = type;
22223                     this.optional = optional;
22224                     this.defaultValue = defaultValue;
22225                     assert optional || defaultValue == null;
22226                 }
22227 
22228                 public Class<?> type() {
22229                     return t;
22230                 }
22231 
22232                 public boolean isOptional() {
22233                     return optional;
22234                 }
22235 
22236                 public Object defaultValue() {
22237                     return defaultValue;
22238                 }
22239         }
22240 
22241         public enum TypeConstraint implements OnnxTypeConstraint {
22242             T1(new OnnxType.TypeVariable("T1", List.of(OnnxType.tensor(OnnxType.string())))),
22243             T2(new OnnxType.TypeVariable("T2", List.of(OnnxType.tensor(OnnxType.bool())))),
22244             ;
22245 
22246             final OnnxType.TypeVariable typeVariable;
22247 
22248             TypeConstraint(OnnxType.TypeVariable typeVariable) {
22249                 assert typeVariable.name().equals(name());
22250                 this.typeVariable = typeVariable;
22251             }
22252 
22253             @Override
22254             public OnnxType.TypeVariable typeVariable() {
22255                 return typeVariable;
22256             }
22257         }
22258 
22259         public enum InputParameter implements OnnxParameter {
22260             X(TypeConstraint.T1.typeVariable(), Quantifier.REQUIRED),
22261             ;
22262 
22263             final OnnxType type;
22264             final Quantifier quantifier;
22265 
22266             InputParameter(OnnxType type, Quantifier quantifier) {
22267                 this.type = type;
22268                 this.quantifier = quantifier;
22269             }
22270 
22271             @Override
22272             public OnnxType type() {
22273                 return type;
22274             }
22275 
22276             @Override
22277             public Quantifier quantifier() {
22278                 return quantifier;
22279             }
22280         }
22281 
22282         public enum OutputParameter implements OnnxParameter {
22283             Y(TypeConstraint.T2.typeVariable(), Quantifier.REQUIRED),
22284             ;
22285 
22286             final OnnxType type;
22287             final Quantifier quantifier;
22288 
22289             OutputParameter(OnnxType type, Quantifier quantifier) {
22290                 this.type = type;
22291                 this.quantifier = quantifier;
22292             }
22293 
22294             @Override
22295             public OnnxType type() {
22296                 return type;
22297             }
22298 
22299             @Override
22300             public Quantifier quantifier() {
22301                 return quantifier;
22302             }
22303         }
22304 
22305         public static final OnnxSchema SCHEMA = new OnnxSchemaRecord(
22306                 NAME,
22307                 List.of(Attribute.values()),
22308                 List.of(TypeConstraint.values()),
22309                 List.of(InputParameter.values()),
22310                 List.of(OutputParameter.values())
22311         );
22312 
22313         public RegexFullMatch(ExternalizedOp def) {
22314             super(SCHEMA, def);
22315         }
22316 
22317         RegexFullMatch(RegexFullMatch that, CopyContext cc) {
22318             super(that, cc);
22319         }
22320 
22321         @Override
22322         public RegexFullMatch transform(CopyContext cc, OpTransformer ot) {
22323             return new RegexFullMatch(this, cc);
22324         }
22325 
22326         RegexFullMatch(TypeElement resultType, Value X, java.util.Optional<String> pattern) {
22327             super(SCHEMA, resultType, Set.of(), List.of(X), List.of(pattern));
22328         }
22329 
22330         @Override
22331         public SequencedSet<OnnxParameter> onnxOutputs() {
22332             return onnxOutputs(SCHEMA);
22333         }
22334 
22335         @Override
22336         public SequencedMap<OnnxParameter, Object> onnxInputs() {
22337             return onnxInputs(SCHEMA, List.of(X()));
22338         }
22339 
22340         public Value X() {
22341             return operands().get(0);
22342         }
22343 
22344         public java.util.Optional<String> pattern() {
22345             String pattern = Attribute.pattern.access(String.class, onnxAttributes);
22346             return java.util.Optional.ofNullable(pattern);
22347         }
22348 
22349     }
22350 
22351     public static RegexFullMatch RegexFullMatch(TypeElement resultType, Value X, java.util.Optional<String> pattern) {
22352         return new RegexFullMatch(resultType, X, pattern);
22353     }
22354 
22355     @OpFactoryHelper.OpDeclaration(Relu.NAME)
22356     public static final class Relu extends OnnxOp {
22357         public static final String NAME = "Relu";
22358 
22359         public enum Attribute implements OnnxAttribute.None { }
22360 
22361         public enum TypeConstraint implements OnnxTypeConstraint {
22362             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())))),
22363             ;
22364 
22365             final OnnxType.TypeVariable typeVariable;
22366 
22367             TypeConstraint(OnnxType.TypeVariable typeVariable) {
22368                 assert typeVariable.name().equals(name());
22369                 this.typeVariable = typeVariable;
22370             }
22371 
22372             @Override
22373             public OnnxType.TypeVariable typeVariable() {
22374                 return typeVariable;
22375             }
22376         }
22377 
22378         public enum InputParameter implements OnnxParameter {
22379             X(TypeConstraint.T.typeVariable(), Quantifier.REQUIRED),
22380             ;
22381 
22382             final OnnxType type;
22383             final Quantifier quantifier;
22384 
22385             InputParameter(OnnxType type, Quantifier quantifier) {
22386                 this.type = type;
22387                 this.quantifier = quantifier;
22388             }
22389 
22390             @Override
22391             public OnnxType type() {
22392                 return type;
22393             }
22394 
22395             @Override
22396             public Quantifier quantifier() {
22397                 return quantifier;
22398             }
22399         }
22400 
22401         public enum OutputParameter implements OnnxParameter {
22402             Y(TypeConstraint.T.typeVariable(), Quantifier.REQUIRED),
22403             ;
22404 
22405             final OnnxType type;
22406             final Quantifier quantifier;
22407 
22408             OutputParameter(OnnxType type, Quantifier quantifier) {
22409                 this.type = type;
22410                 this.quantifier = quantifier;
22411             }
22412 
22413             @Override
22414             public OnnxType type() {
22415                 return type;
22416             }
22417 
22418             @Override
22419             public Quantifier quantifier() {
22420                 return quantifier;
22421             }
22422         }
22423 
22424         public static final OnnxSchema SCHEMA = new OnnxSchemaRecord(
22425                 NAME,
22426                 List.of(Attribute.values()),
22427                 List.of(TypeConstraint.values()),
22428                 List.of(InputParameter.values()),
22429                 List.of(OutputParameter.values())
22430         );
22431 
22432         public Relu(ExternalizedOp def) {
22433             super(SCHEMA, def);
22434         }
22435 
22436         Relu(Relu that, CopyContext cc) {
22437             super(that, cc);
22438         }
22439 
22440         @Override
22441         public Relu transform(CopyContext cc, OpTransformer ot) {
22442             return new Relu(this, cc);
22443         }
22444 
22445         Relu(TypeElement resultType, Value X) {
22446             super(SCHEMA, resultType, Set.of(), List.of(X), List.of());
22447         }
22448 
22449         @Override
22450         public SequencedSet<OnnxParameter> onnxOutputs() {
22451             return onnxOutputs(SCHEMA);
22452         }
22453 
22454         @Override
22455         public SequencedMap<OnnxParameter, Object> onnxInputs() {
22456             return onnxInputs(SCHEMA, List.of(X()));
22457         }
22458 
22459         public Value X() {
22460             return operands().get(0);
22461         }
22462 
22463     }
22464 
22465     public static Relu Relu(TypeElement resultType, Value X) {
22466         return new Relu(resultType, X);
22467     }
22468 
22469     @OpFactoryHelper.OpDeclaration(Reshape.NAME)
22470     public static final class Reshape extends OnnxOp {
22471         public static final String NAME = "Reshape";
22472 
22473         public enum Attribute implements OnnxAttribute {
22474             allowzero(Long.class, true, 0),
22475             ;
22476 
22477                 final Class<?> t;
22478                 final boolean optional;
22479                 final Object defaultValue;
22480 
22481                 Attribute(Class<?> type, boolean optional, Object defaultValue) {
22482                     this.t = type;
22483                     this.optional = optional;
22484                     this.defaultValue = defaultValue;
22485                     assert optional || defaultValue == null;
22486                 }
22487 
22488                 public Class<?> type() {
22489                     return t;
22490                 }
22491 
22492                 public boolean isOptional() {
22493                     return optional;
22494                 }
22495 
22496                 public Object defaultValue() {
22497                     return defaultValue;
22498                 }
22499         }
22500 
22501         public enum TypeConstraint implements OnnxTypeConstraint {
22502             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())))),
22503             ;
22504 
22505             final OnnxType.TypeVariable typeVariable;
22506 
22507             TypeConstraint(OnnxType.TypeVariable typeVariable) {
22508                 assert typeVariable.name().equals(name());
22509                 this.typeVariable = typeVariable;
22510             }
22511 
22512             @Override
22513             public OnnxType.TypeVariable typeVariable() {
22514                 return typeVariable;
22515             }
22516         }
22517 
22518         public enum InputParameter implements OnnxParameter {
22519             data(TypeConstraint.T.typeVariable(), Quantifier.REQUIRED),
22520             shape(OnnxType.tensor(OnnxType.int64()), Quantifier.REQUIRED),
22521             ;
22522 
22523             final OnnxType type;
22524             final Quantifier quantifier;
22525 
22526             InputParameter(OnnxType type, Quantifier quantifier) {
22527                 this.type = type;
22528                 this.quantifier = quantifier;
22529             }
22530 
22531             @Override
22532             public OnnxType type() {
22533                 return type;
22534             }
22535 
22536             @Override
22537             public Quantifier quantifier() {
22538                 return quantifier;
22539             }
22540         }
22541 
22542         public enum OutputParameter implements OnnxParameter {
22543             reshaped(TypeConstraint.T.typeVariable(), Quantifier.REQUIRED),
22544             ;
22545 
22546             final OnnxType type;
22547             final Quantifier quantifier;
22548 
22549             OutputParameter(OnnxType type, Quantifier quantifier) {
22550                 this.type = type;
22551                 this.quantifier = quantifier;
22552             }
22553 
22554             @Override
22555             public OnnxType type() {
22556                 return type;
22557             }
22558 
22559             @Override
22560             public Quantifier quantifier() {
22561                 return quantifier;
22562             }
22563         }
22564 
22565         public static final OnnxSchema SCHEMA = new OnnxSchemaRecord(
22566                 NAME,
22567                 List.of(Attribute.values()),
22568                 List.of(TypeConstraint.values()),
22569                 List.of(InputParameter.values()),
22570                 List.of(OutputParameter.values())
22571         );
22572 
22573         public Reshape(ExternalizedOp def) {
22574             super(SCHEMA, def);
22575         }
22576 
22577         Reshape(Reshape that, CopyContext cc) {
22578             super(that, cc);
22579         }
22580 
22581         @Override
22582         public Reshape transform(CopyContext cc, OpTransformer ot) {
22583             return new Reshape(this, cc);
22584         }
22585 
22586         Reshape(TypeElement resultType, Value data, Value shape, java.util.Optional<Long> allowzero) {
22587             super(SCHEMA, resultType, Set.of(), List.of(data, shape), List.of(allowzero));
22588         }
22589 
22590         @Override
22591         public SequencedSet<OnnxParameter> onnxOutputs() {
22592             return onnxOutputs(SCHEMA);
22593         }
22594 
22595         @Override
22596         public SequencedMap<OnnxParameter, Object> onnxInputs() {
22597             return onnxInputs(SCHEMA, List.of(data(), shape()));
22598         }
22599 
22600         public Value data() {
22601             return operands().get(0);
22602         }
22603 
22604         public Value shape() {
22605             return operands().get(1);
22606         }
22607 
22608         public java.util.Optional<Long> allowzero() {
22609             Long allowzero = Attribute.allowzero.access(Long.class, onnxAttributes);
22610             return java.util.Optional.ofNullable(allowzero);
22611         }
22612 
22613     }
22614 
22615     public static Reshape Reshape(TypeElement resultType, Value data, Value shape, java.util.Optional<Long> allowzero) {
22616         return new Reshape(resultType, data, shape, allowzero);
22617     }
22618 
22619     @OpFactoryHelper.OpDeclaration(Resize.NAME)
22620     public static final class Resize extends OnnxOp {
22621         public static final String NAME = "Resize";
22622 
22623         public enum Attribute implements OnnxAttribute {
22624             mode(String.class, true, "nearest"),
22625             extrapolation_value(Float.class, true, 0.0f),
22626             nearest_mode(String.class, true, "round_prefer_floor"),
22627             antialias(Long.class, true, 0),
22628             cubic_coeff_a(Float.class, true, -0.75f),
22629             axes(long[].class, true, null),
22630             coordinate_transformation_mode(String.class, true, "half_pixel"),
22631             keep_aspect_ratio_policy(String.class, true, "stretch"),
22632             exclude_outside(Long.class, true, 0),
22633             ;
22634 
22635                 final Class<?> t;
22636                 final boolean optional;
22637                 final Object defaultValue;
22638 
22639                 Attribute(Class<?> type, boolean optional, Object defaultValue) {
22640                     this.t = type;
22641                     this.optional = optional;
22642                     this.defaultValue = defaultValue;
22643                     assert optional || defaultValue == null;
22644                 }
22645 
22646                 public Class<?> type() {
22647                     return t;
22648                 }
22649 
22650                 public boolean isOptional() {
22651                     return optional;
22652                 }
22653 
22654                 public Object defaultValue() {
22655                     return defaultValue;
22656                 }
22657         }
22658 
22659         public enum TypeConstraint implements OnnxTypeConstraint {
22660             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())))),
22661             T2(new OnnxType.TypeVariable("T2", List.of(OnnxType.tensor(OnnxType.float16()), OnnxType.tensor(OnnxType.float32()), OnnxType.tensor(OnnxType.float64())))),
22662             ;
22663 
22664             final OnnxType.TypeVariable typeVariable;
22665 
22666             TypeConstraint(OnnxType.TypeVariable typeVariable) {
22667                 assert typeVariable.name().equals(name());
22668                 this.typeVariable = typeVariable;
22669             }
22670 
22671             @Override
22672             public OnnxType.TypeVariable typeVariable() {
22673                 return typeVariable;
22674             }
22675         }
22676 
22677         public enum InputParameter implements OnnxParameter {
22678             X(TypeConstraint.T1.typeVariable(), Quantifier.REQUIRED),
22679             roi(TypeConstraint.T2.typeVariable(), Quantifier.OPTIONAL),
22680             scales(OnnxType.tensor(OnnxType.float32()), Quantifier.OPTIONAL),
22681             sizes(OnnxType.tensor(OnnxType.int64()), Quantifier.OPTIONAL),
22682             ;
22683 
22684             final OnnxType type;
22685             final Quantifier quantifier;
22686 
22687             InputParameter(OnnxType type, Quantifier quantifier) {
22688                 this.type = type;
22689                 this.quantifier = quantifier;
22690             }
22691 
22692             @Override
22693             public OnnxType type() {
22694                 return type;
22695             }
22696 
22697             @Override
22698             public Quantifier quantifier() {
22699                 return quantifier;
22700             }
22701         }
22702 
22703         public enum OutputParameter implements OnnxParameter {
22704             Y(TypeConstraint.T1.typeVariable(), Quantifier.REQUIRED),
22705             ;
22706 
22707             final OnnxType type;
22708             final Quantifier quantifier;
22709 
22710             OutputParameter(OnnxType type, Quantifier quantifier) {
22711                 this.type = type;
22712                 this.quantifier = quantifier;
22713             }
22714 
22715             @Override
22716             public OnnxType type() {
22717                 return type;
22718             }
22719 
22720             @Override
22721             public Quantifier quantifier() {
22722                 return quantifier;
22723             }
22724         }
22725 
22726         public static final OnnxSchema SCHEMA = new OnnxSchemaRecord(
22727                 NAME,
22728                 List.of(Attribute.values()),
22729                 List.of(TypeConstraint.values()),
22730                 List.of(InputParameter.values()),
22731                 List.of(OutputParameter.values())
22732         );
22733 
22734         public Resize(ExternalizedOp def) {
22735             super(SCHEMA, def);
22736         }
22737 
22738         Resize(Resize that, CopyContext cc) {
22739             super(that, cc);
22740         }
22741 
22742         @Override
22743         public Resize transform(CopyContext cc, OpTransformer ot) {
22744             return new Resize(this, cc);
22745         }
22746 
22747         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<Long> antialias, java.util.Optional<Float> cubic_coeff_a, java.util.Optional<long[]> axes, java.util.Optional<String> coordinate_transformation_mode, java.util.Optional<String> keep_aspect_ratio_policy, java.util.Optional<Long> exclude_outside) {
22748             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));
22749         }
22750 
22751         @Override
22752         public SequencedSet<OnnxParameter> onnxOutputs() {
22753             return onnxOutputs(SCHEMA);
22754         }
22755 
22756         @Override
22757         public SequencedMap<OnnxParameter, Object> onnxInputs() {
22758             return onnxInputs(SCHEMA, List.of(X(), roi(), scales(), sizes()));
22759         }
22760 
22761         public Value X() {
22762             return operands().get(0);
22763         }
22764 
22765         public java.util.Optional<Value> roi() {
22766             int i = optionalInputArguments.indexOf(InputParameter.roi);
22767             return i != -1 ? java.util.Optional.of(operands().get(1 + i)) : java.util.Optional.empty();
22768         }
22769 
22770         public java.util.Optional<Value> scales() {
22771             int i = optionalInputArguments.indexOf(InputParameter.scales);
22772             return i != -1 ? java.util.Optional.of(operands().get(1 + i)) : java.util.Optional.empty();
22773         }
22774 
22775         public java.util.Optional<Value> sizes() {
22776             int i = optionalInputArguments.indexOf(InputParameter.sizes);
22777             return i != -1 ? java.util.Optional.of(operands().get(1 + i)) : java.util.Optional.empty();
22778         }
22779 
22780         public java.util.Optional<String> mode() {
22781             String mode = Attribute.mode.access(String.class, onnxAttributes);
22782             return java.util.Optional.ofNullable(mode);
22783         }
22784 
22785         public java.util.Optional<Float> extrapolation_value() {
22786             Float extrapolation_value = Attribute.extrapolation_value.access(Float.class, onnxAttributes);
22787             return java.util.Optional.ofNullable(extrapolation_value);
22788         }
22789 
22790         public java.util.Optional<String> nearest_mode() {
22791             String nearest_mode = Attribute.nearest_mode.access(String.class, onnxAttributes);
22792             return java.util.Optional.ofNullable(nearest_mode);
22793         }
22794 
22795         public java.util.Optional<Long> antialias() {
22796             Long antialias = Attribute.antialias.access(Long.class, onnxAttributes);
22797             return java.util.Optional.ofNullable(antialias);
22798         }
22799 
22800         public java.util.Optional<Float> cubic_coeff_a() {
22801             Float cubic_coeff_a = Attribute.cubic_coeff_a.access(Float.class, onnxAttributes);
22802             return java.util.Optional.ofNullable(cubic_coeff_a);
22803         }
22804 
22805         public java.util.Optional<long[]> axes() {
22806             long[] axes = Attribute.axes.access(long[].class, onnxAttributes);
22807             return java.util.Optional.ofNullable(axes).map(long[]::clone);
22808         }
22809 
22810         public java.util.Optional<String> coordinate_transformation_mode() {
22811             String coordinate_transformation_mode = Attribute.coordinate_transformation_mode.access(String.class, onnxAttributes);
22812             return java.util.Optional.ofNullable(coordinate_transformation_mode);
22813         }
22814 
22815         public java.util.Optional<String> keep_aspect_ratio_policy() {
22816             String keep_aspect_ratio_policy = Attribute.keep_aspect_ratio_policy.access(String.class, onnxAttributes);
22817             return java.util.Optional.ofNullable(keep_aspect_ratio_policy);
22818         }
22819 
22820         public java.util.Optional<Long> exclude_outside() {
22821             Long exclude_outside = Attribute.exclude_outside.access(Long.class, onnxAttributes);
22822             return java.util.Optional.ofNullable(exclude_outside);
22823         }
22824 
22825     }
22826 
22827     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<Long> antialias, java.util.Optional<Float> cubic_coeff_a, java.util.Optional<long[]> axes, java.util.Optional<String> coordinate_transformation_mode, java.util.Optional<String> keep_aspect_ratio_policy, java.util.Optional<Long> exclude_outside) {
22828         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);
22829     }
22830 
22831     @OpFactoryHelper.OpDeclaration(ReverseSequence.NAME)
22832     public static final class ReverseSequence extends OnnxOp {
22833         public static final String NAME = "ReverseSequence";
22834 
22835         public enum Attribute implements OnnxAttribute {
22836             time_axis(Long.class, true, 0),
22837             batch_axis(Long.class, true, 1),
22838             ;
22839 
22840                 final Class<?> t;
22841                 final boolean optional;
22842                 final Object defaultValue;
22843 
22844                 Attribute(Class<?> type, boolean optional, Object defaultValue) {
22845                     this.t = type;
22846                     this.optional = optional;
22847                     this.defaultValue = defaultValue;
22848                     assert optional || defaultValue == null;
22849                 }
22850 
22851                 public Class<?> type() {
22852                     return t;
22853                 }
22854 
22855                 public boolean isOptional() {
22856                     return optional;
22857                 }
22858 
22859                 public Object defaultValue() {
22860                     return defaultValue;
22861                 }
22862         }
22863 
22864         public enum TypeConstraint implements OnnxTypeConstraint {
22865             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())))),
22866             ;
22867 
22868             final OnnxType.TypeVariable typeVariable;
22869 
22870             TypeConstraint(OnnxType.TypeVariable typeVariable) {
22871                 assert typeVariable.name().equals(name());
22872                 this.typeVariable = typeVariable;
22873             }
22874 
22875             @Override
22876             public OnnxType.TypeVariable typeVariable() {
22877                 return typeVariable;
22878             }
22879         }
22880 
22881         public enum InputParameter implements OnnxParameter {
22882             input(TypeConstraint.T.typeVariable(), Quantifier.REQUIRED),
22883             sequence_lens(OnnxType.tensor(OnnxType.int64()), Quantifier.REQUIRED),
22884             ;
22885 
22886             final OnnxType type;
22887             final Quantifier quantifier;
22888 
22889             InputParameter(OnnxType type, Quantifier quantifier) {
22890                 this.type = type;
22891                 this.quantifier = quantifier;
22892             }
22893 
22894             @Override
22895             public OnnxType type() {
22896                 return type;
22897             }
22898 
22899             @Override
22900             public Quantifier quantifier() {
22901                 return quantifier;
22902             }
22903         }
22904 
22905         public enum OutputParameter implements OnnxParameter {
22906             Y(TypeConstraint.T.typeVariable(), Quantifier.REQUIRED),
22907             ;
22908 
22909             final OnnxType type;
22910             final Quantifier quantifier;
22911 
22912             OutputParameter(OnnxType type, Quantifier quantifier) {
22913                 this.type = type;
22914                 this.quantifier = quantifier;
22915             }
22916 
22917             @Override
22918             public OnnxType type() {
22919                 return type;
22920             }
22921 
22922             @Override
22923             public Quantifier quantifier() {
22924                 return quantifier;
22925             }
22926         }
22927 
22928         public static final OnnxSchema SCHEMA = new OnnxSchemaRecord(
22929                 NAME,
22930                 List.of(Attribute.values()),
22931                 List.of(TypeConstraint.values()),
22932                 List.of(InputParameter.values()),
22933                 List.of(OutputParameter.values())
22934         );
22935 
22936         public ReverseSequence(ExternalizedOp def) {
22937             super(SCHEMA, def);
22938         }
22939 
22940         ReverseSequence(ReverseSequence that, CopyContext cc) {
22941             super(that, cc);
22942         }
22943 
22944         @Override
22945         public ReverseSequence transform(CopyContext cc, OpTransformer ot) {
22946             return new ReverseSequence(this, cc);
22947         }
22948 
22949         ReverseSequence(TypeElement resultType, Value input, Value sequence_lens, java.util.Optional<Long> time_axis, java.util.Optional<Long> batch_axis) {
22950             super(SCHEMA, resultType, Set.of(), List.of(input, sequence_lens), List.of(time_axis, batch_axis));
22951         }
22952 
22953         @Override
22954         public SequencedSet<OnnxParameter> onnxOutputs() {
22955             return onnxOutputs(SCHEMA);
22956         }
22957 
22958         @Override
22959         public SequencedMap<OnnxParameter, Object> onnxInputs() {
22960             return onnxInputs(SCHEMA, List.of(input(), sequence_lens()));
22961         }
22962 
22963         public Value input() {
22964             return operands().get(0);
22965         }
22966 
22967         public Value sequence_lens() {
22968             return operands().get(1);
22969         }
22970 
22971         public java.util.Optional<Long> time_axis() {
22972             Long time_axis = Attribute.time_axis.access(Long.class, onnxAttributes);
22973             return java.util.Optional.ofNullable(time_axis);
22974         }
22975 
22976         public java.util.Optional<Long> batch_axis() {
22977             Long batch_axis = Attribute.batch_axis.access(Long.class, onnxAttributes);
22978             return java.util.Optional.ofNullable(batch_axis);
22979         }
22980 
22981     }
22982 
22983     public static ReverseSequence ReverseSequence(TypeElement resultType, Value input, Value sequence_lens, java.util.Optional<Long> time_axis, java.util.Optional<Long> batch_axis) {
22984         return new ReverseSequence(resultType, input, sequence_lens, time_axis, batch_axis);
22985     }
22986 
22987     @OpFactoryHelper.OpDeclaration(RoiAlign.NAME)
22988     public static final class RoiAlign extends OnnxOp {
22989         public static final String NAME = "RoiAlign";
22990 
22991         public enum Attribute implements OnnxAttribute {
22992             mode(String.class, true, "avg"),
22993             output_width(Long.class, true, 1),
22994             spatial_scale(Float.class, true, 1.0f),
22995             coordinate_transformation_mode(String.class, true, "half_pixel"),
22996             sampling_ratio(Long.class, true, 0),
22997             output_height(Long.class, true, 1),
22998             ;
22999 
23000                 final Class<?> t;
23001                 final boolean optional;
23002                 final Object defaultValue;
23003 
23004                 Attribute(Class<?> type, boolean optional, Object defaultValue) {
23005                     this.t = type;
23006                     this.optional = optional;
23007                     this.defaultValue = defaultValue;
23008                     assert optional || defaultValue == null;
23009                 }
23010 
23011                 public Class<?> type() {
23012                     return t;
23013                 }
23014 
23015                 public boolean isOptional() {
23016                     return optional;
23017                 }
23018 
23019                 public Object defaultValue() {
23020                     return defaultValue;
23021                 }
23022         }
23023 
23024         public enum TypeConstraint implements OnnxTypeConstraint {
23025             T1(new OnnxType.TypeVariable("T1", List.of(OnnxType.tensor(OnnxType.bfloat16()), OnnxType.tensor(OnnxType.float16()), OnnxType.tensor(OnnxType.float32()), OnnxType.tensor(OnnxType.float64())))),
23026             T2(new OnnxType.TypeVariable("T2", List.of(OnnxType.tensor(OnnxType.int64())))),
23027             ;
23028 
23029             final OnnxType.TypeVariable typeVariable;
23030 
23031             TypeConstraint(OnnxType.TypeVariable typeVariable) {
23032                 assert typeVariable.name().equals(name());
23033                 this.typeVariable = typeVariable;
23034             }
23035 
23036             @Override
23037             public OnnxType.TypeVariable typeVariable() {
23038                 return typeVariable;
23039             }
23040         }
23041 
23042         public enum InputParameter implements OnnxParameter {
23043             X(TypeConstraint.T1.typeVariable(), Quantifier.REQUIRED),
23044             rois(TypeConstraint.T1.typeVariable(), Quantifier.REQUIRED),
23045             batch_indices(TypeConstraint.T2.typeVariable(), Quantifier.REQUIRED),
23046             ;
23047 
23048             final OnnxType type;
23049             final Quantifier quantifier;
23050 
23051             InputParameter(OnnxType type, Quantifier quantifier) {
23052                 this.type = type;
23053                 this.quantifier = quantifier;
23054             }
23055 
23056             @Override
23057             public OnnxType type() {
23058                 return type;
23059             }
23060 
23061             @Override
23062             public Quantifier quantifier() {
23063                 return quantifier;
23064             }
23065         }
23066 
23067         public enum OutputParameter implements OnnxParameter {
23068             Y(TypeConstraint.T1.typeVariable(), Quantifier.REQUIRED),
23069             ;
23070 
23071             final OnnxType type;
23072             final Quantifier quantifier;
23073 
23074             OutputParameter(OnnxType type, Quantifier quantifier) {
23075                 this.type = type;
23076                 this.quantifier = quantifier;
23077             }
23078 
23079             @Override
23080             public OnnxType type() {
23081                 return type;
23082             }
23083 
23084             @Override
23085             public Quantifier quantifier() {
23086                 return quantifier;
23087             }
23088         }
23089 
23090         public static final OnnxSchema SCHEMA = new OnnxSchemaRecord(
23091                 NAME,
23092                 List.of(Attribute.values()),
23093                 List.of(TypeConstraint.values()),
23094                 List.of(InputParameter.values()),
23095                 List.of(OutputParameter.values())
23096         );
23097 
23098         public RoiAlign(ExternalizedOp def) {
23099             super(SCHEMA, def);
23100         }
23101 
23102         RoiAlign(RoiAlign that, CopyContext cc) {
23103             super(that, cc);
23104         }
23105 
23106         @Override
23107         public RoiAlign transform(CopyContext cc, OpTransformer ot) {
23108             return new RoiAlign(this, cc);
23109         }
23110 
23111         RoiAlign(TypeElement resultType, Value X, Value rois, Value batch_indices, java.util.Optional<String> mode, java.util.Optional<Long> output_width, java.util.Optional<Float> spatial_scale, java.util.Optional<String> coordinate_transformation_mode, java.util.Optional<Long> sampling_ratio, java.util.Optional<Long> output_height) {
23112             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));
23113         }
23114 
23115         @Override
23116         public SequencedSet<OnnxParameter> onnxOutputs() {
23117             return onnxOutputs(SCHEMA);
23118         }
23119 
23120         @Override
23121         public SequencedMap<OnnxParameter, Object> onnxInputs() {
23122             return onnxInputs(SCHEMA, List.of(X(), rois(), batch_indices()));
23123         }
23124 
23125         public Value X() {
23126             return operands().get(0);
23127         }
23128 
23129         public Value rois() {
23130             return operands().get(1);
23131         }
23132 
23133         public Value batch_indices() {
23134             return operands().get(2);
23135         }
23136 
23137         public java.util.Optional<String> mode() {
23138             String mode = Attribute.mode.access(String.class, onnxAttributes);
23139             return java.util.Optional.ofNullable(mode);
23140         }
23141 
23142         public java.util.Optional<Long> output_width() {
23143             Long output_width = Attribute.output_width.access(Long.class, onnxAttributes);
23144             return java.util.Optional.ofNullable(output_width);
23145         }
23146 
23147         public java.util.Optional<Float> spatial_scale() {
23148             Float spatial_scale = Attribute.spatial_scale.access(Float.class, onnxAttributes);
23149             return java.util.Optional.ofNullable(spatial_scale);
23150         }
23151 
23152         public java.util.Optional<String> coordinate_transformation_mode() {
23153             String coordinate_transformation_mode = Attribute.coordinate_transformation_mode.access(String.class, onnxAttributes);
23154             return java.util.Optional.ofNullable(coordinate_transformation_mode);
23155         }
23156 
23157         public java.util.Optional<Long> sampling_ratio() {
23158             Long sampling_ratio = Attribute.sampling_ratio.access(Long.class, onnxAttributes);
23159             return java.util.Optional.ofNullable(sampling_ratio);
23160         }
23161 
23162         public java.util.Optional<Long> output_height() {
23163             Long output_height = Attribute.output_height.access(Long.class, onnxAttributes);
23164             return java.util.Optional.ofNullable(output_height);
23165         }
23166 
23167     }
23168 
23169     public static RoiAlign RoiAlign(TypeElement resultType, Value X, Value rois, Value batch_indices, java.util.Optional<String> mode, java.util.Optional<Long> output_width, java.util.Optional<Float> spatial_scale, java.util.Optional<String> coordinate_transformation_mode, java.util.Optional<Long> sampling_ratio, java.util.Optional<Long> output_height) {
23170         return new RoiAlign(resultType, X, rois, batch_indices, mode, output_width, spatial_scale, coordinate_transformation_mode, sampling_ratio, output_height);
23171     }
23172 
23173     @OpFactoryHelper.OpDeclaration(Round.NAME)
23174     public static final class Round extends OnnxOp {
23175         public static final String NAME = "Round";
23176 
23177         public enum Attribute implements OnnxAttribute.None { }
23178 
23179         public enum TypeConstraint implements OnnxTypeConstraint {
23180             T(new OnnxType.TypeVariable("T", List.of(OnnxType.tensor(OnnxType.bfloat16()), OnnxType.tensor(OnnxType.float16()), OnnxType.tensor(OnnxType.float32()), OnnxType.tensor(OnnxType.float64())))),
23181             ;
23182 
23183             final OnnxType.TypeVariable typeVariable;
23184 
23185             TypeConstraint(OnnxType.TypeVariable typeVariable) {
23186                 assert typeVariable.name().equals(name());
23187                 this.typeVariable = typeVariable;
23188             }
23189 
23190             @Override
23191             public OnnxType.TypeVariable typeVariable() {
23192                 return typeVariable;
23193             }
23194         }
23195 
23196         public enum InputParameter implements OnnxParameter {
23197             X(TypeConstraint.T.typeVariable(), Quantifier.REQUIRED),
23198             ;
23199 
23200             final OnnxType type;
23201             final Quantifier quantifier;
23202 
23203             InputParameter(OnnxType type, Quantifier quantifier) {
23204                 this.type = type;
23205                 this.quantifier = quantifier;
23206             }
23207 
23208             @Override
23209             public OnnxType type() {
23210                 return type;
23211             }
23212 
23213             @Override
23214             public Quantifier quantifier() {
23215                 return quantifier;
23216             }
23217         }
23218 
23219         public enum OutputParameter implements OnnxParameter {
23220             Y(TypeConstraint.T.typeVariable(), Quantifier.REQUIRED),
23221             ;
23222 
23223             final OnnxType type;
23224             final Quantifier quantifier;
23225 
23226             OutputParameter(OnnxType type, Quantifier quantifier) {
23227                 this.type = type;
23228                 this.quantifier = quantifier;
23229             }
23230 
23231             @Override
23232             public OnnxType type() {
23233                 return type;
23234             }
23235 
23236             @Override
23237             public Quantifier quantifier() {
23238                 return quantifier;
23239             }
23240         }
23241 
23242         public static final OnnxSchema SCHEMA = new OnnxSchemaRecord(
23243                 NAME,
23244                 List.of(Attribute.values()),
23245                 List.of(TypeConstraint.values()),
23246                 List.of(InputParameter.values()),
23247                 List.of(OutputParameter.values())
23248         );
23249 
23250         public Round(ExternalizedOp def) {
23251             super(SCHEMA, def);
23252         }
23253 
23254         Round(Round that, CopyContext cc) {
23255             super(that, cc);
23256         }
23257 
23258         @Override
23259         public Round transform(CopyContext cc, OpTransformer ot) {
23260             return new Round(this, cc);
23261         }
23262 
23263         Round(TypeElement resultType, Value X) {
23264             super(SCHEMA, resultType, Set.of(), List.of(X), List.of());
23265         }
23266 
23267         @Override
23268         public SequencedSet<OnnxParameter> onnxOutputs() {
23269             return onnxOutputs(SCHEMA);
23270         }
23271 
23272         @Override
23273         public SequencedMap<OnnxParameter, Object> onnxInputs() {
23274             return onnxInputs(SCHEMA, List.of(X()));
23275         }
23276 
23277         public Value X() {
23278             return operands().get(0);
23279         }
23280 
23281     }
23282 
23283     public static Round Round(TypeElement resultType, Value X) {
23284         return new Round(resultType, X);
23285     }
23286 
23287     @OpFactoryHelper.OpDeclaration(STFT.NAME)
23288     public static final class STFT extends OnnxOp {
23289         public static final String NAME = "STFT";
23290 
23291         public enum Attribute implements OnnxAttribute {
23292             onesided(Long.class, true, 1),
23293             ;
23294 
23295                 final Class<?> t;
23296                 final boolean optional;
23297                 final Object defaultValue;
23298 
23299                 Attribute(Class<?> type, boolean optional, Object defaultValue) {
23300                     this.t = type;
23301                     this.optional = optional;
23302                     this.defaultValue = defaultValue;
23303                     assert optional || defaultValue == null;
23304                 }
23305 
23306                 public Class<?> type() {
23307                     return t;
23308                 }
23309 
23310                 public boolean isOptional() {
23311                     return optional;
23312                 }
23313 
23314                 public Object defaultValue() {
23315                     return defaultValue;
23316                 }
23317         }
23318 
23319         public enum TypeConstraint implements OnnxTypeConstraint {
23320             T1(new OnnxType.TypeVariable("T1", List.of(OnnxType.tensor(OnnxType.float32()), OnnxType.tensor(OnnxType.float16()), OnnxType.tensor(OnnxType.float64()), OnnxType.tensor(OnnxType.bfloat16())))),
23321             T2(new OnnxType.TypeVariable("T2", List.of(OnnxType.tensor(OnnxType.int32()), OnnxType.tensor(OnnxType.int64())))),
23322             ;
23323 
23324             final OnnxType.TypeVariable typeVariable;
23325 
23326             TypeConstraint(OnnxType.TypeVariable typeVariable) {
23327                 assert typeVariable.name().equals(name());
23328                 this.typeVariable = typeVariable;
23329             }
23330 
23331             @Override
23332             public OnnxType.TypeVariable typeVariable() {
23333                 return typeVariable;
23334             }
23335         }
23336 
23337         public enum InputParameter implements OnnxParameter {
23338             signal(TypeConstraint.T1.typeVariable(), Quantifier.REQUIRED),
23339             frame_step(TypeConstraint.T2.typeVariable(), Quantifier.REQUIRED),
23340             window(TypeConstraint.T1.typeVariable(), Quantifier.OPTIONAL),
23341             frame_length(TypeConstraint.T2.typeVariable(), Quantifier.OPTIONAL),
23342             ;
23343 
23344             final OnnxType type;
23345             final Quantifier quantifier;
23346 
23347             InputParameter(OnnxType type, Quantifier quantifier) {
23348                 this.type = type;
23349                 this.quantifier = quantifier;
23350             }
23351 
23352             @Override
23353             public OnnxType type() {
23354                 return type;
23355             }
23356 
23357             @Override
23358             public Quantifier quantifier() {
23359                 return quantifier;
23360             }
23361         }
23362 
23363         public enum OutputParameter implements OnnxParameter {
23364             output(TypeConstraint.T1.typeVariable(), Quantifier.REQUIRED),
23365             ;
23366 
23367             final OnnxType type;
23368             final Quantifier quantifier;
23369 
23370             OutputParameter(OnnxType type, Quantifier quantifier) {
23371                 this.type = type;
23372                 this.quantifier = quantifier;
23373             }
23374 
23375             @Override
23376             public OnnxType type() {
23377                 return type;
23378             }
23379 
23380             @Override
23381             public Quantifier quantifier() {
23382                 return quantifier;
23383             }
23384         }
23385 
23386         public static final OnnxSchema SCHEMA = new OnnxSchemaRecord(
23387                 NAME,
23388                 List.of(Attribute.values()),
23389                 List.of(TypeConstraint.values()),
23390                 List.of(InputParameter.values()),
23391                 List.of(OutputParameter.values())
23392         );
23393 
23394         public STFT(ExternalizedOp def) {
23395             super(SCHEMA, def);
23396         }
23397 
23398         STFT(STFT that, CopyContext cc) {
23399             super(that, cc);
23400         }
23401 
23402         @Override
23403         public STFT transform(CopyContext cc, OpTransformer ot) {
23404             return new STFT(this, cc);
23405         }
23406 
23407         STFT(TypeElement resultType, Value signal, Value frame_step, java.util.Optional<Value> window, java.util.Optional<Value> frame_length, java.util.Optional<Long> onesided) {
23408             super(SCHEMA, resultType, Set.of(), List.of(signal, frame_step, window, frame_length), List.of(onesided));
23409         }
23410 
23411         @Override
23412         public SequencedSet<OnnxParameter> onnxOutputs() {
23413             return onnxOutputs(SCHEMA);
23414         }
23415 
23416         @Override
23417         public SequencedMap<OnnxParameter, Object> onnxInputs() {
23418             return onnxInputs(SCHEMA, List.of(signal(), frame_step(), window(), frame_length()));
23419         }
23420 
23421         public Value signal() {
23422             return operands().get(0);
23423         }
23424 
23425         public Value frame_step() {
23426             return operands().get(1);
23427         }
23428 
23429         public java.util.Optional<Value> window() {
23430             int i = optionalInputArguments.indexOf(InputParameter.window);
23431             return i != -1 ? java.util.Optional.of(operands().get(2 + i)) : java.util.Optional.empty();
23432         }
23433 
23434         public java.util.Optional<Value> frame_length() {
23435             int i = optionalInputArguments.indexOf(InputParameter.frame_length);
23436             return i != -1 ? java.util.Optional.of(operands().get(2 + i)) : java.util.Optional.empty();
23437         }
23438 
23439         public java.util.Optional<Long> onesided() {
23440             Long onesided = Attribute.onesided.access(Long.class, onnxAttributes);
23441             return java.util.Optional.ofNullable(onesided);
23442         }
23443 
23444     }
23445 
23446     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<Long> onesided) {
23447         return new STFT(resultType, signal, frame_step, window, frame_length, onesided);
23448     }
23449 
23450     @OpFactoryHelper.OpDeclaration(SVMClassifier.NAME)
23451     public static final class SVMClassifier extends OnnxOp {
23452         public static final String NAME = "SVMClassifier";
23453 
23454         public enum Attribute implements OnnxAttribute {
23455             prob_b(float[].class, true, null),
23456             kernel_params(float[].class, true, null),
23457             kernel_type(String.class, true, "LINEAR"),
23458             classlabels_ints(long[].class, true, null),
23459             post_transform(String.class, true, "NONE"),
23460             rho(float[].class, true, null),
23461             coefficients(float[].class, true, null),
23462             support_vectors(float[].class, true, null),
23463             vectors_per_class(long[].class, true, null),
23464             prob_a(float[].class, true, null),
23465             classlabels_strings(String[].class, true, null),
23466             ;
23467 
23468                 final Class<?> t;
23469                 final boolean optional;
23470                 final Object defaultValue;
23471 
23472                 Attribute(Class<?> type, boolean optional, Object defaultValue) {
23473                     this.t = type;
23474                     this.optional = optional;
23475                     this.defaultValue = defaultValue;
23476                     assert optional || defaultValue == null;
23477                 }
23478 
23479                 public Class<?> type() {
23480                     return t;
23481                 }
23482 
23483                 public boolean isOptional() {
23484                     return optional;
23485                 }
23486 
23487                 public Object defaultValue() {
23488                     return defaultValue;
23489                 }
23490         }
23491 
23492         public enum TypeConstraint implements OnnxTypeConstraint {
23493             T1(new OnnxType.TypeVariable("T1", List.of(OnnxType.tensor(OnnxType.float32()), OnnxType.tensor(OnnxType.float64()), OnnxType.tensor(OnnxType.int64()), OnnxType.tensor(OnnxType.int32())))),
23494             T2(new OnnxType.TypeVariable("T2", List.of(OnnxType.tensor(OnnxType.string()), OnnxType.tensor(OnnxType.int64())))),
23495             ;
23496 
23497             final OnnxType.TypeVariable typeVariable;
23498 
23499             TypeConstraint(OnnxType.TypeVariable typeVariable) {
23500                 assert typeVariable.name().equals(name());
23501                 this.typeVariable = typeVariable;
23502             }
23503 
23504             @Override
23505             public OnnxType.TypeVariable typeVariable() {
23506                 return typeVariable;
23507             }
23508         }
23509 
23510         public enum InputParameter implements OnnxParameter {
23511             X(TypeConstraint.T1.typeVariable(), Quantifier.REQUIRED),
23512             ;
23513 
23514             final OnnxType type;
23515             final Quantifier quantifier;
23516 
23517             InputParameter(OnnxType type, Quantifier quantifier) {
23518                 this.type = type;
23519                 this.quantifier = quantifier;
23520             }
23521 
23522             @Override
23523             public OnnxType type() {
23524                 return type;
23525             }
23526 
23527             @Override
23528             public Quantifier quantifier() {
23529                 return quantifier;
23530             }
23531         }
23532 
23533         public enum OutputParameter implements OnnxParameter {
23534             Y(TypeConstraint.T2.typeVariable(), Quantifier.REQUIRED),
23535             Z(OnnxType.tensor(OnnxType.float32()), Quantifier.REQUIRED),
23536             ;
23537 
23538             final OnnxType type;
23539             final Quantifier quantifier;
23540 
23541             OutputParameter(OnnxType type, Quantifier quantifier) {
23542                 this.type = type;
23543                 this.quantifier = quantifier;
23544             }
23545 
23546             @Override
23547             public OnnxType type() {
23548                 return type;
23549             }
23550 
23551             @Override
23552             public Quantifier quantifier() {
23553                 return quantifier;
23554             }
23555         }
23556 
23557         public static final OnnxSchema SCHEMA = new OnnxSchemaRecord(
23558                 NAME,
23559                 List.of(Attribute.values()),
23560                 List.of(TypeConstraint.values()),
23561                 List.of(InputParameter.values()),
23562                 List.of(OutputParameter.values())
23563         );
23564 
23565         public SVMClassifier(ExternalizedOp def) {
23566             super(SCHEMA, def);
23567         }
23568 
23569         SVMClassifier(SVMClassifier that, CopyContext cc) {
23570             super(that, cc);
23571         }
23572 
23573         @Override
23574         public SVMClassifier transform(CopyContext cc, OpTransformer ot) {
23575             return new SVMClassifier(this, cc);
23576         }
23577 
23578         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<long[]> 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<long[]> vectors_per_class, java.util.Optional<float[]> prob_a, java.util.Optional<String[]> classlabels_strings) {
23579             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));
23580         }
23581 
23582         @Override
23583         public SequencedSet<OnnxParameter> onnxOutputs() {
23584             return onnxOutputs(SCHEMA);
23585         }
23586 
23587         @Override
23588         public SequencedMap<OnnxParameter, Object> onnxInputs() {
23589             return onnxInputs(SCHEMA, List.of(X()));
23590         }
23591 
23592         public Value X() {
23593             return operands().get(0);
23594         }
23595 
23596         public java.util.Optional<float[]> prob_b() {
23597             float[] prob_b = Attribute.prob_b.access(float[].class, onnxAttributes);
23598             return java.util.Optional.ofNullable(prob_b).map(float[]::clone);
23599         }
23600 
23601         public java.util.Optional<float[]> kernel_params() {
23602             float[] kernel_params = Attribute.kernel_params.access(float[].class, onnxAttributes);
23603             return java.util.Optional.ofNullable(kernel_params).map(float[]::clone);
23604         }
23605 
23606         public java.util.Optional<String> kernel_type() {
23607             String kernel_type = Attribute.kernel_type.access(String.class, onnxAttributes);
23608             return java.util.Optional.ofNullable(kernel_type);
23609         }
23610 
23611         public java.util.Optional<long[]> classlabels_ints() {
23612             long[] classlabels_ints = Attribute.classlabels_ints.access(long[].class, onnxAttributes);
23613             return java.util.Optional.ofNullable(classlabels_ints).map(long[]::clone);
23614         }
23615 
23616         public java.util.Optional<String> post_transform() {
23617             String post_transform = Attribute.post_transform.access(String.class, onnxAttributes);
23618             return java.util.Optional.ofNullable(post_transform);
23619         }
23620 
23621         public java.util.Optional<float[]> rho() {
23622             float[] rho = Attribute.rho.access(float[].class, onnxAttributes);
23623             return java.util.Optional.ofNullable(rho).map(float[]::clone);
23624         }
23625 
23626         public java.util.Optional<float[]> coefficients() {
23627             float[] coefficients = Attribute.coefficients.access(float[].class, onnxAttributes);
23628             return java.util.Optional.ofNullable(coefficients).map(float[]::clone);
23629         }
23630 
23631         public java.util.Optional<float[]> support_vectors() {
23632             float[] support_vectors = Attribute.support_vectors.access(float[].class, onnxAttributes);
23633             return java.util.Optional.ofNullable(support_vectors).map(float[]::clone);
23634         }
23635 
23636         public java.util.Optional<long[]> vectors_per_class() {
23637             long[] vectors_per_class = Attribute.vectors_per_class.access(long[].class, onnxAttributes);
23638             return java.util.Optional.ofNullable(vectors_per_class).map(long[]::clone);
23639         }
23640 
23641         public java.util.Optional<float[]> prob_a() {
23642             float[] prob_a = Attribute.prob_a.access(float[].class, onnxAttributes);
23643             return java.util.Optional.ofNullable(prob_a).map(float[]::clone);
23644         }
23645 
23646         public java.util.Optional<String[]> classlabels_strings() {
23647             String[] classlabels_strings = Attribute.classlabels_strings.access(String[].class, onnxAttributes);
23648             return java.util.Optional.ofNullable(classlabels_strings).map(String[]::clone);
23649         }
23650 
23651     }
23652 
23653     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<long[]> 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<long[]> vectors_per_class, java.util.Optional<float[]> prob_a, java.util.Optional<String[]> classlabels_strings) {
23654         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);
23655     }
23656 
23657     @OpFactoryHelper.OpDeclaration(SVMRegressor.NAME)
23658     public static final class SVMRegressor extends OnnxOp {
23659         public static final String NAME = "SVMRegressor";
23660 
23661         public enum Attribute implements OnnxAttribute {
23662             kernel_type(String.class, true, "LINEAR"),
23663             kernel_params(float[].class, true, null),
23664             n_supports(Long.class, true, 0),
23665             rho(float[].class, true, null),
23666             post_transform(String.class, true, "NONE"),
23667             coefficients(float[].class, true, null),
23668             support_vectors(float[].class, true, null),
23669             one_class(Long.class, true, 0),
23670             ;
23671 
23672                 final Class<?> t;
23673                 final boolean optional;
23674                 final Object defaultValue;
23675 
23676                 Attribute(Class<?> type, boolean optional, Object defaultValue) {
23677                     this.t = type;
23678                     this.optional = optional;
23679                     this.defaultValue = defaultValue;
23680                     assert optional || defaultValue == null;
23681                 }
23682 
23683                 public Class<?> type() {
23684                     return t;
23685                 }
23686 
23687                 public boolean isOptional() {
23688                     return optional;
23689                 }
23690 
23691                 public Object defaultValue() {
23692                     return defaultValue;
23693                 }
23694         }
23695 
23696         public enum TypeConstraint implements OnnxTypeConstraint {
23697             T(new OnnxType.TypeVariable("T", List.of(OnnxType.tensor(OnnxType.float32()), OnnxType.tensor(OnnxType.float64()), OnnxType.tensor(OnnxType.int64()), OnnxType.tensor(OnnxType.int32())))),
23698             ;
23699 
23700             final OnnxType.TypeVariable typeVariable;
23701 
23702             TypeConstraint(OnnxType.TypeVariable typeVariable) {
23703                 assert typeVariable.name().equals(name());
23704                 this.typeVariable = typeVariable;
23705             }
23706 
23707             @Override
23708             public OnnxType.TypeVariable typeVariable() {
23709                 return typeVariable;
23710             }
23711         }
23712 
23713         public enum InputParameter implements OnnxParameter {
23714             X(TypeConstraint.T.typeVariable(), Quantifier.REQUIRED),
23715             ;
23716 
23717             final OnnxType type;
23718             final Quantifier quantifier;
23719 
23720             InputParameter(OnnxType type, Quantifier quantifier) {
23721                 this.type = type;
23722                 this.quantifier = quantifier;
23723             }
23724 
23725             @Override
23726             public OnnxType type() {
23727                 return type;
23728             }
23729 
23730             @Override
23731             public Quantifier quantifier() {
23732                 return quantifier;
23733             }
23734         }
23735 
23736         public enum OutputParameter implements OnnxParameter {
23737             Y(OnnxType.tensor(OnnxType.float32()), Quantifier.REQUIRED),
23738             ;
23739 
23740             final OnnxType type;
23741             final Quantifier quantifier;
23742 
23743             OutputParameter(OnnxType type, Quantifier quantifier) {
23744                 this.type = type;
23745                 this.quantifier = quantifier;
23746             }
23747 
23748             @Override
23749             public OnnxType type() {
23750                 return type;
23751             }
23752 
23753             @Override
23754             public Quantifier quantifier() {
23755                 return quantifier;
23756             }
23757         }
23758 
23759         public static final OnnxSchema SCHEMA = new OnnxSchemaRecord(
23760                 NAME,
23761                 List.of(Attribute.values()),
23762                 List.of(TypeConstraint.values()),
23763                 List.of(InputParameter.values()),
23764                 List.of(OutputParameter.values())
23765         );
23766 
23767         public SVMRegressor(ExternalizedOp def) {
23768             super(SCHEMA, def);
23769         }
23770 
23771         SVMRegressor(SVMRegressor that, CopyContext cc) {
23772             super(that, cc);
23773         }
23774 
23775         @Override
23776         public SVMRegressor transform(CopyContext cc, OpTransformer ot) {
23777             return new SVMRegressor(this, cc);
23778         }
23779 
23780         SVMRegressor(TypeElement resultType, Value X, java.util.Optional<String> kernel_type, java.util.Optional<float[]> kernel_params, java.util.Optional<Long> 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<Long> one_class) {
23781             super(SCHEMA, resultType, Set.of(), List.of(X), List.of(kernel_type, kernel_params, n_supports, rho, post_transform, coefficients, support_vectors, one_class));
23782         }
23783 
23784         @Override
23785         public SequencedSet<OnnxParameter> onnxOutputs() {
23786             return onnxOutputs(SCHEMA);
23787         }
23788 
23789         @Override
23790         public SequencedMap<OnnxParameter, Object> onnxInputs() {
23791             return onnxInputs(SCHEMA, List.of(X()));
23792         }
23793 
23794         public Value X() {
23795             return operands().get(0);
23796         }
23797 
23798         public java.util.Optional<String> kernel_type() {
23799             String kernel_type = Attribute.kernel_type.access(String.class, onnxAttributes);
23800             return java.util.Optional.ofNullable(kernel_type);
23801         }
23802 
23803         public java.util.Optional<float[]> kernel_params() {
23804             float[] kernel_params = Attribute.kernel_params.access(float[].class, onnxAttributes);
23805             return java.util.Optional.ofNullable(kernel_params).map(float[]::clone);
23806         }
23807 
23808         public java.util.Optional<Long> n_supports() {
23809             Long n_supports = Attribute.n_supports.access(Long.class, onnxAttributes);
23810             return java.util.Optional.ofNullable(n_supports);
23811         }
23812 
23813         public java.util.Optional<float[]> rho() {
23814             float[] rho = Attribute.rho.access(float[].class, onnxAttributes);
23815             return java.util.Optional.ofNullable(rho).map(float[]::clone);
23816         }
23817 
23818         public java.util.Optional<String> post_transform() {
23819             String post_transform = Attribute.post_transform.access(String.class, onnxAttributes);
23820             return java.util.Optional.ofNullable(post_transform);
23821         }
23822 
23823         public java.util.Optional<float[]> coefficients() {
23824             float[] coefficients = Attribute.coefficients.access(float[].class, onnxAttributes);
23825             return java.util.Optional.ofNullable(coefficients).map(float[]::clone);
23826         }
23827 
23828         public java.util.Optional<float[]> support_vectors() {
23829             float[] support_vectors = Attribute.support_vectors.access(float[].class, onnxAttributes);
23830             return java.util.Optional.ofNullable(support_vectors).map(float[]::clone);
23831         }
23832 
23833         public java.util.Optional<Long> one_class() {
23834             Long one_class = Attribute.one_class.access(Long.class, onnxAttributes);
23835             return java.util.Optional.ofNullable(one_class);
23836         }
23837 
23838     }
23839 
23840     public static SVMRegressor SVMRegressor(TypeElement resultType, Value X, java.util.Optional<String> kernel_type, java.util.Optional<float[]> kernel_params, java.util.Optional<Long> 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<Long> one_class) {
23841         return new SVMRegressor(resultType, X, kernel_type, kernel_params, n_supports, rho, post_transform, coefficients, support_vectors, one_class);
23842     }
23843 
23844     @OpFactoryHelper.OpDeclaration(Scaler.NAME)
23845     public static final class Scaler extends OnnxOp {
23846         public static final String NAME = "Scaler";
23847 
23848         public enum Attribute implements OnnxAttribute {
23849             offset(float[].class, true, null),
23850             scale(float[].class, true, null),
23851             ;
23852 
23853                 final Class<?> t;
23854                 final boolean optional;
23855                 final Object defaultValue;
23856 
23857                 Attribute(Class<?> type, boolean optional, Object defaultValue) {
23858                     this.t = type;
23859                     this.optional = optional;
23860                     this.defaultValue = defaultValue;
23861                     assert optional || defaultValue == null;
23862                 }
23863 
23864                 public Class<?> type() {
23865                     return t;
23866                 }
23867 
23868                 public boolean isOptional() {
23869                     return optional;
23870                 }
23871 
23872                 public Object defaultValue() {
23873                     return defaultValue;
23874                 }
23875         }
23876 
23877         public enum TypeConstraint implements OnnxTypeConstraint {
23878             T(new OnnxType.TypeVariable("T", List.of(OnnxType.tensor(OnnxType.float32()), OnnxType.tensor(OnnxType.float64()), OnnxType.tensor(OnnxType.int64()), OnnxType.tensor(OnnxType.int32())))),
23879             ;
23880 
23881             final OnnxType.TypeVariable typeVariable;
23882 
23883             TypeConstraint(OnnxType.TypeVariable typeVariable) {
23884                 assert typeVariable.name().equals(name());
23885                 this.typeVariable = typeVariable;
23886             }
23887 
23888             @Override
23889             public OnnxType.TypeVariable typeVariable() {
23890                 return typeVariable;
23891             }
23892         }
23893 
23894         public enum InputParameter implements OnnxParameter {
23895             X(TypeConstraint.T.typeVariable(), Quantifier.REQUIRED),
23896             ;
23897 
23898             final OnnxType type;
23899             final Quantifier quantifier;
23900 
23901             InputParameter(OnnxType type, Quantifier quantifier) {
23902                 this.type = type;
23903                 this.quantifier = quantifier;
23904             }
23905 
23906             @Override
23907             public OnnxType type() {
23908                 return type;
23909             }
23910 
23911             @Override
23912             public Quantifier quantifier() {
23913                 return quantifier;
23914             }
23915         }
23916 
23917         public enum OutputParameter implements OnnxParameter {
23918             Y(OnnxType.tensor(OnnxType.float32()), Quantifier.REQUIRED),
23919             ;
23920 
23921             final OnnxType type;
23922             final Quantifier quantifier;
23923 
23924             OutputParameter(OnnxType type, Quantifier quantifier) {
23925                 this.type = type;
23926                 this.quantifier = quantifier;
23927             }
23928 
23929             @Override
23930             public OnnxType type() {
23931                 return type;
23932             }
23933 
23934             @Override
23935             public Quantifier quantifier() {
23936                 return quantifier;
23937             }
23938         }
23939 
23940         public static final OnnxSchema SCHEMA = new OnnxSchemaRecord(
23941                 NAME,
23942                 List.of(Attribute.values()),
23943                 List.of(TypeConstraint.values()),
23944                 List.of(InputParameter.values()),
23945                 List.of(OutputParameter.values())
23946         );
23947 
23948         public Scaler(ExternalizedOp def) {
23949             super(SCHEMA, def);
23950         }
23951 
23952         Scaler(Scaler that, CopyContext cc) {
23953             super(that, cc);
23954         }
23955 
23956         @Override
23957         public Scaler transform(CopyContext cc, OpTransformer ot) {
23958             return new Scaler(this, cc);
23959         }
23960 
23961         Scaler(TypeElement resultType, Value X, java.util.Optional<float[]> offset, java.util.Optional<float[]> scale) {
23962             super(SCHEMA, resultType, Set.of(), List.of(X), List.of(offset, scale));
23963         }
23964 
23965         @Override
23966         public SequencedSet<OnnxParameter> onnxOutputs() {
23967             return onnxOutputs(SCHEMA);
23968         }
23969 
23970         @Override
23971         public SequencedMap<OnnxParameter, Object> onnxInputs() {
23972             return onnxInputs(SCHEMA, List.of(X()));
23973         }
23974 
23975         public Value X() {
23976             return operands().get(0);
23977         }
23978 
23979         public java.util.Optional<float[]> offset() {
23980             float[] offset = Attribute.offset.access(float[].class, onnxAttributes);
23981             return java.util.Optional.ofNullable(offset).map(float[]::clone);
23982         }
23983 
23984         public java.util.Optional<float[]> scale() {
23985             float[] scale = Attribute.scale.access(float[].class, onnxAttributes);
23986             return java.util.Optional.ofNullable(scale).map(float[]::clone);
23987         }
23988 
23989     }
23990 
23991     public static Scaler Scaler(TypeElement resultType, Value X, java.util.Optional<float[]> offset, java.util.Optional<float[]> scale) {
23992         return new Scaler(resultType, X, offset, scale);
23993     }
23994 
23995     @OpFactoryHelper.OpDeclaration(Scatter.NAME)
23996     public static final class Scatter extends OnnxOp {
23997         public static final String NAME = "Scatter";
23998 
23999         public enum Attribute implements OnnxAttribute {
24000             axis(Long.class, true, 0),
24001             ;
24002 
24003                 final Class<?> t;
24004                 final boolean optional;
24005                 final Object defaultValue;
24006 
24007                 Attribute(Class<?> type, boolean optional, Object defaultValue) {
24008                     this.t = type;
24009                     this.optional = optional;
24010                     this.defaultValue = defaultValue;
24011                     assert optional || defaultValue == null;
24012                 }
24013 
24014                 public Class<?> type() {
24015                     return t;
24016                 }
24017 
24018                 public boolean isOptional() {
24019                     return optional;
24020                 }
24021 
24022                 public Object defaultValue() {
24023                     return defaultValue;
24024                 }
24025         }
24026 
24027         public enum TypeConstraint implements OnnxTypeConstraint {
24028             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())))),
24029             Tind(new OnnxType.TypeVariable("Tind", List.of(OnnxType.tensor(OnnxType.int32()), OnnxType.tensor(OnnxType.int64())))),
24030             ;
24031 
24032             final OnnxType.TypeVariable typeVariable;
24033 
24034             TypeConstraint(OnnxType.TypeVariable typeVariable) {
24035                 assert typeVariable.name().equals(name());
24036                 this.typeVariable = typeVariable;
24037             }
24038 
24039             @Override
24040             public OnnxType.TypeVariable typeVariable() {
24041                 return typeVariable;
24042             }
24043         }
24044 
24045         public enum InputParameter implements OnnxParameter {
24046             data(TypeConstraint.T.typeVariable(), Quantifier.REQUIRED),
24047             indices(TypeConstraint.Tind.typeVariable(), Quantifier.REQUIRED),
24048             updates(TypeConstraint.T.typeVariable(), Quantifier.REQUIRED),
24049             ;
24050 
24051             final OnnxType type;
24052             final Quantifier quantifier;
24053 
24054             InputParameter(OnnxType type, Quantifier quantifier) {
24055                 this.type = type;
24056                 this.quantifier = quantifier;
24057             }
24058 
24059             @Override
24060             public OnnxType type() {
24061                 return type;
24062             }
24063 
24064             @Override
24065             public Quantifier quantifier() {
24066                 return quantifier;
24067             }
24068         }
24069 
24070         public enum OutputParameter implements OnnxParameter {
24071             output(TypeConstraint.T.typeVariable(), Quantifier.REQUIRED),
24072             ;
24073 
24074             final OnnxType type;
24075             final Quantifier quantifier;
24076 
24077             OutputParameter(OnnxType type, Quantifier quantifier) {
24078                 this.type = type;
24079                 this.quantifier = quantifier;
24080             }
24081 
24082             @Override
24083             public OnnxType type() {
24084                 return type;
24085             }
24086 
24087             @Override
24088             public Quantifier quantifier() {
24089                 return quantifier;
24090             }
24091         }
24092 
24093         public static final OnnxSchema SCHEMA = new OnnxSchemaRecord(
24094                 NAME,
24095                 List.of(Attribute.values()),
24096                 List.of(TypeConstraint.values()),
24097                 List.of(InputParameter.values()),
24098                 List.of(OutputParameter.values())
24099         );
24100 
24101         public Scatter(ExternalizedOp def) {
24102             super(SCHEMA, def);
24103         }
24104 
24105         Scatter(Scatter that, CopyContext cc) {
24106             super(that, cc);
24107         }
24108 
24109         @Override
24110         public Scatter transform(CopyContext cc, OpTransformer ot) {
24111             return new Scatter(this, cc);
24112         }
24113 
24114         Scatter(TypeElement resultType, Value data, Value indices, Value updates, java.util.Optional<Long> axis) {
24115             super(SCHEMA, resultType, Set.of(), List.of(data, indices, updates), List.of(axis));
24116         }
24117 
24118         @Override
24119         public SequencedSet<OnnxParameter> onnxOutputs() {
24120             return onnxOutputs(SCHEMA);
24121         }
24122 
24123         @Override
24124         public SequencedMap<OnnxParameter, Object> onnxInputs() {
24125             return onnxInputs(SCHEMA, List.of(data(), indices(), updates()));
24126         }
24127 
24128         public Value data() {
24129             return operands().get(0);
24130         }
24131 
24132         public Value indices() {
24133             return operands().get(1);
24134         }
24135 
24136         public Value updates() {
24137             return operands().get(2);
24138         }
24139 
24140         public java.util.Optional<Long> axis() {
24141             Long axis = Attribute.axis.access(Long.class, onnxAttributes);
24142             return java.util.Optional.ofNullable(axis);
24143         }
24144 
24145     }
24146 
24147     public static Scatter Scatter(TypeElement resultType, Value data, Value indices, Value updates, java.util.Optional<Long> axis) {
24148         return new Scatter(resultType, data, indices, updates, axis);
24149     }
24150 
24151     @OpFactoryHelper.OpDeclaration(ScatterElements.NAME)
24152     public static final class ScatterElements extends OnnxOp {
24153         public static final String NAME = "ScatterElements";
24154 
24155         public enum Attribute implements OnnxAttribute {
24156             reduction(String.class, true, "none"),
24157             axis(Long.class, true, 0),
24158             ;
24159 
24160                 final Class<?> t;
24161                 final boolean optional;
24162                 final Object defaultValue;
24163 
24164                 Attribute(Class<?> type, boolean optional, Object defaultValue) {
24165                     this.t = type;
24166                     this.optional = optional;
24167                     this.defaultValue = defaultValue;
24168                     assert optional || defaultValue == null;
24169                 }
24170 
24171                 public Class<?> type() {
24172                     return t;
24173                 }
24174 
24175                 public boolean isOptional() {
24176                     return optional;
24177                 }
24178 
24179                 public Object defaultValue() {
24180                     return defaultValue;
24181                 }
24182         }
24183 
24184         public enum TypeConstraint implements OnnxTypeConstraint {
24185             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())))),
24186             Tind(new OnnxType.TypeVariable("Tind", List.of(OnnxType.tensor(OnnxType.int32()), OnnxType.tensor(OnnxType.int64())))),
24187             ;
24188 
24189             final OnnxType.TypeVariable typeVariable;
24190 
24191             TypeConstraint(OnnxType.TypeVariable typeVariable) {
24192                 assert typeVariable.name().equals(name());
24193                 this.typeVariable = typeVariable;
24194             }
24195 
24196             @Override
24197             public OnnxType.TypeVariable typeVariable() {
24198                 return typeVariable;
24199             }
24200         }
24201 
24202         public enum InputParameter implements OnnxParameter {
24203             data(TypeConstraint.T.typeVariable(), Quantifier.REQUIRED),
24204             indices(TypeConstraint.Tind.typeVariable(), Quantifier.REQUIRED),
24205             updates(TypeConstraint.T.typeVariable(), Quantifier.REQUIRED),
24206             ;
24207 
24208             final OnnxType type;
24209             final Quantifier quantifier;
24210 
24211             InputParameter(OnnxType type, Quantifier quantifier) {
24212                 this.type = type;
24213                 this.quantifier = quantifier;
24214             }
24215 
24216             @Override
24217             public OnnxType type() {
24218                 return type;
24219             }
24220 
24221             @Override
24222             public Quantifier quantifier() {
24223                 return quantifier;
24224             }
24225         }
24226 
24227         public enum OutputParameter implements OnnxParameter {
24228             output(TypeConstraint.T.typeVariable(), Quantifier.REQUIRED),
24229             ;
24230 
24231             final OnnxType type;
24232             final Quantifier quantifier;
24233 
24234             OutputParameter(OnnxType type, Quantifier quantifier) {
24235                 this.type = type;
24236                 this.quantifier = quantifier;
24237             }
24238 
24239             @Override
24240             public OnnxType type() {
24241                 return type;
24242             }
24243 
24244             @Override
24245             public Quantifier quantifier() {
24246                 return quantifier;
24247             }
24248         }
24249 
24250         public static final OnnxSchema SCHEMA = new OnnxSchemaRecord(
24251                 NAME,
24252                 List.of(Attribute.values()),
24253                 List.of(TypeConstraint.values()),
24254                 List.of(InputParameter.values()),
24255                 List.of(OutputParameter.values())
24256         );
24257 
24258         public ScatterElements(ExternalizedOp def) {
24259             super(SCHEMA, def);
24260         }
24261 
24262         ScatterElements(ScatterElements that, CopyContext cc) {
24263             super(that, cc);
24264         }
24265 
24266         @Override
24267         public ScatterElements transform(CopyContext cc, OpTransformer ot) {
24268             return new ScatterElements(this, cc);
24269         }
24270 
24271         ScatterElements(TypeElement resultType, Value data, Value indices, Value updates, java.util.Optional<String> reduction, java.util.Optional<Long> axis) {
24272             super(SCHEMA, resultType, Set.of(), List.of(data, indices, updates), List.of(reduction, axis));
24273         }
24274 
24275         @Override
24276         public SequencedSet<OnnxParameter> onnxOutputs() {
24277             return onnxOutputs(SCHEMA);
24278         }
24279 
24280         @Override
24281         public SequencedMap<OnnxParameter, Object> onnxInputs() {
24282             return onnxInputs(SCHEMA, List.of(data(), indices(), updates()));
24283         }
24284 
24285         public Value data() {
24286             return operands().get(0);
24287         }
24288 
24289         public Value indices() {
24290             return operands().get(1);
24291         }
24292 
24293         public Value updates() {
24294             return operands().get(2);
24295         }
24296 
24297         public java.util.Optional<String> reduction() {
24298             String reduction = Attribute.reduction.access(String.class, onnxAttributes);
24299             return java.util.Optional.ofNullable(reduction);
24300         }
24301 
24302         public java.util.Optional<Long> axis() {
24303             Long axis = Attribute.axis.access(Long.class, onnxAttributes);
24304             return java.util.Optional.ofNullable(axis);
24305         }
24306 
24307     }
24308 
24309     public static ScatterElements ScatterElements(TypeElement resultType, Value data, Value indices, Value updates, java.util.Optional<String> reduction, java.util.Optional<Long> axis) {
24310         return new ScatterElements(resultType, data, indices, updates, reduction, axis);
24311     }
24312 
24313     @OpFactoryHelper.OpDeclaration(ScatterND.NAME)
24314     public static final class ScatterND extends OnnxOp {
24315         public static final String NAME = "ScatterND";
24316 
24317         public enum Attribute implements OnnxAttribute {
24318             reduction(String.class, true, "none"),
24319             ;
24320 
24321                 final Class<?> t;
24322                 final boolean optional;
24323                 final Object defaultValue;
24324 
24325                 Attribute(Class<?> type, boolean optional, Object defaultValue) {
24326                     this.t = type;
24327                     this.optional = optional;
24328                     this.defaultValue = defaultValue;
24329                     assert optional || defaultValue == null;
24330                 }
24331 
24332                 public Class<?> type() {
24333                     return t;
24334                 }
24335 
24336                 public boolean isOptional() {
24337                     return optional;
24338                 }
24339 
24340                 public Object defaultValue() {
24341                     return defaultValue;
24342                 }
24343         }
24344 
24345         public enum TypeConstraint implements OnnxTypeConstraint {
24346             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())))),
24347             ;
24348 
24349             final OnnxType.TypeVariable typeVariable;
24350 
24351             TypeConstraint(OnnxType.TypeVariable typeVariable) {
24352                 assert typeVariable.name().equals(name());
24353                 this.typeVariable = typeVariable;
24354             }
24355 
24356             @Override
24357             public OnnxType.TypeVariable typeVariable() {
24358                 return typeVariable;
24359             }
24360         }
24361 
24362         public enum InputParameter implements OnnxParameter {
24363             data(TypeConstraint.T.typeVariable(), Quantifier.REQUIRED),
24364             indices(OnnxType.tensor(OnnxType.int64()), Quantifier.REQUIRED),
24365             updates(TypeConstraint.T.typeVariable(), Quantifier.REQUIRED),
24366             ;
24367 
24368             final OnnxType type;
24369             final Quantifier quantifier;
24370 
24371             InputParameter(OnnxType type, Quantifier quantifier) {
24372                 this.type = type;
24373                 this.quantifier = quantifier;
24374             }
24375 
24376             @Override
24377             public OnnxType type() {
24378                 return type;
24379             }
24380 
24381             @Override
24382             public Quantifier quantifier() {
24383                 return quantifier;
24384             }
24385         }
24386 
24387         public enum OutputParameter implements OnnxParameter {
24388             output(TypeConstraint.T.typeVariable(), Quantifier.REQUIRED),
24389             ;
24390 
24391             final OnnxType type;
24392             final Quantifier quantifier;
24393 
24394             OutputParameter(OnnxType type, Quantifier quantifier) {
24395                 this.type = type;
24396                 this.quantifier = quantifier;
24397             }
24398 
24399             @Override
24400             public OnnxType type() {
24401                 return type;
24402             }
24403 
24404             @Override
24405             public Quantifier quantifier() {
24406                 return quantifier;
24407             }
24408         }
24409 
24410         public static final OnnxSchema SCHEMA = new OnnxSchemaRecord(
24411                 NAME,
24412                 List.of(Attribute.values()),
24413                 List.of(TypeConstraint.values()),
24414                 List.of(InputParameter.values()),
24415                 List.of(OutputParameter.values())
24416         );
24417 
24418         public ScatterND(ExternalizedOp def) {
24419             super(SCHEMA, def);
24420         }
24421 
24422         ScatterND(ScatterND that, CopyContext cc) {
24423             super(that, cc);
24424         }
24425 
24426         @Override
24427         public ScatterND transform(CopyContext cc, OpTransformer ot) {
24428             return new ScatterND(this, cc);
24429         }
24430 
24431         ScatterND(TypeElement resultType, Value data, Value indices, Value updates, java.util.Optional<String> reduction) {
24432             super(SCHEMA, resultType, Set.of(), List.of(data, indices, updates), List.of(reduction));
24433         }
24434 
24435         @Override
24436         public SequencedSet<OnnxParameter> onnxOutputs() {
24437             return onnxOutputs(SCHEMA);
24438         }
24439 
24440         @Override
24441         public SequencedMap<OnnxParameter, Object> onnxInputs() {
24442             return onnxInputs(SCHEMA, List.of(data(), indices(), updates()));
24443         }
24444 
24445         public Value data() {
24446             return operands().get(0);
24447         }
24448 
24449         public Value indices() {
24450             return operands().get(1);
24451         }
24452 
24453         public Value updates() {
24454             return operands().get(2);
24455         }
24456 
24457         public java.util.Optional<String> reduction() {
24458             String reduction = Attribute.reduction.access(String.class, onnxAttributes);
24459             return java.util.Optional.ofNullable(reduction);
24460         }
24461 
24462     }
24463 
24464     public static ScatterND ScatterND(TypeElement resultType, Value data, Value indices, Value updates, java.util.Optional<String> reduction) {
24465         return new ScatterND(resultType, data, indices, updates, reduction);
24466     }
24467 
24468     @OpFactoryHelper.OpDeclaration(Selu.NAME)
24469     public static final class Selu extends OnnxOp {
24470         public static final String NAME = "Selu";
24471 
24472         public enum Attribute implements OnnxAttribute {
24473             alpha(Float.class, true, 1.6732632f),
24474             gamma(Float.class, true, 1.050701f),
24475             ;
24476 
24477                 final Class<?> t;
24478                 final boolean optional;
24479                 final Object defaultValue;
24480 
24481                 Attribute(Class<?> type, boolean optional, Object defaultValue) {
24482                     this.t = type;
24483                     this.optional = optional;
24484                     this.defaultValue = defaultValue;
24485                     assert optional || defaultValue == null;
24486                 }
24487 
24488                 public Class<?> type() {
24489                     return t;
24490                 }
24491 
24492                 public boolean isOptional() {
24493                     return optional;
24494                 }
24495 
24496                 public Object defaultValue() {
24497                     return defaultValue;
24498                 }
24499         }
24500 
24501         public enum TypeConstraint implements OnnxTypeConstraint {
24502             T(new OnnxType.TypeVariable("T", List.of(OnnxType.tensor(OnnxType.bfloat16()), OnnxType.tensor(OnnxType.float16()), OnnxType.tensor(OnnxType.float32()), OnnxType.tensor(OnnxType.float64())))),
24503             ;
24504 
24505             final OnnxType.TypeVariable typeVariable;
24506 
24507             TypeConstraint(OnnxType.TypeVariable typeVariable) {
24508                 assert typeVariable.name().equals(name());
24509                 this.typeVariable = typeVariable;
24510             }
24511 
24512             @Override
24513             public OnnxType.TypeVariable typeVariable() {
24514                 return typeVariable;
24515             }
24516         }
24517 
24518         public enum InputParameter implements OnnxParameter {
24519             X(TypeConstraint.T.typeVariable(), Quantifier.REQUIRED),
24520             ;
24521 
24522             final OnnxType type;
24523             final Quantifier quantifier;
24524 
24525             InputParameter(OnnxType type, Quantifier quantifier) {
24526                 this.type = type;
24527                 this.quantifier = quantifier;
24528             }
24529 
24530             @Override
24531             public OnnxType type() {
24532                 return type;
24533             }
24534 
24535             @Override
24536             public Quantifier quantifier() {
24537                 return quantifier;
24538             }
24539         }
24540 
24541         public enum OutputParameter implements OnnxParameter {
24542             Y(TypeConstraint.T.typeVariable(), Quantifier.REQUIRED),
24543             ;
24544 
24545             final OnnxType type;
24546             final Quantifier quantifier;
24547 
24548             OutputParameter(OnnxType type, Quantifier quantifier) {
24549                 this.type = type;
24550                 this.quantifier = quantifier;
24551             }
24552 
24553             @Override
24554             public OnnxType type() {
24555                 return type;
24556             }
24557 
24558             @Override
24559             public Quantifier quantifier() {
24560                 return quantifier;
24561             }
24562         }
24563 
24564         public static final OnnxSchema SCHEMA = new OnnxSchemaRecord(
24565                 NAME,
24566                 List.of(Attribute.values()),
24567                 List.of(TypeConstraint.values()),
24568                 List.of(InputParameter.values()),
24569                 List.of(OutputParameter.values())
24570         );
24571 
24572         public Selu(ExternalizedOp def) {
24573             super(SCHEMA, def);
24574         }
24575 
24576         Selu(Selu that, CopyContext cc) {
24577             super(that, cc);
24578         }
24579 
24580         @Override
24581         public Selu transform(CopyContext cc, OpTransformer ot) {
24582             return new Selu(this, cc);
24583         }
24584 
24585         Selu(TypeElement resultType, Value X, java.util.Optional<Float> alpha, java.util.Optional<Float> gamma) {
24586             super(SCHEMA, resultType, Set.of(), List.of(X), List.of(alpha, gamma));
24587         }
24588 
24589         @Override
24590         public SequencedSet<OnnxParameter> onnxOutputs() {
24591             return onnxOutputs(SCHEMA);
24592         }
24593 
24594         @Override
24595         public SequencedMap<OnnxParameter, Object> onnxInputs() {
24596             return onnxInputs(SCHEMA, List.of(X()));
24597         }
24598 
24599         public Value X() {
24600             return operands().get(0);
24601         }
24602 
24603         public java.util.Optional<Float> alpha() {
24604             Float alpha = Attribute.alpha.access(Float.class, onnxAttributes);
24605             return java.util.Optional.ofNullable(alpha);
24606         }
24607 
24608         public java.util.Optional<Float> gamma() {
24609             Float gamma = Attribute.gamma.access(Float.class, onnxAttributes);
24610             return java.util.Optional.ofNullable(gamma);
24611         }
24612 
24613     }
24614 
24615     public static Selu Selu(TypeElement resultType, Value X, java.util.Optional<Float> alpha, java.util.Optional<Float> gamma) {
24616         return new Selu(resultType, X, alpha, gamma);
24617     }
24618 
24619     @OpFactoryHelper.OpDeclaration(SequenceAt.NAME)
24620     public static final class SequenceAt extends OnnxOp {
24621         public static final String NAME = "SequenceAt";
24622 
24623         public enum Attribute implements OnnxAttribute.None { }
24624 
24625         public enum TypeConstraint implements OnnxTypeConstraint {
24626             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()))))),
24627             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())))),
24628             I(new OnnxType.TypeVariable("I", List.of(OnnxType.tensor(OnnxType.int32()), OnnxType.tensor(OnnxType.int64())))),
24629             ;
24630 
24631             final OnnxType.TypeVariable typeVariable;
24632 
24633             TypeConstraint(OnnxType.TypeVariable typeVariable) {
24634                 assert typeVariable.name().equals(name());
24635                 this.typeVariable = typeVariable;
24636             }
24637 
24638             @Override
24639             public OnnxType.TypeVariable typeVariable() {
24640                 return typeVariable;
24641             }
24642         }
24643 
24644         public enum InputParameter implements OnnxParameter {
24645             input_sequence(TypeConstraint.S.typeVariable(), Quantifier.REQUIRED),
24646             position(TypeConstraint.I.typeVariable(), Quantifier.REQUIRED),
24647             ;
24648 
24649             final OnnxType type;
24650             final Quantifier quantifier;
24651 
24652             InputParameter(OnnxType type, Quantifier quantifier) {
24653                 this.type = type;
24654                 this.quantifier = quantifier;
24655             }
24656 
24657             @Override
24658             public OnnxType type() {
24659                 return type;
24660             }
24661 
24662             @Override
24663             public Quantifier quantifier() {
24664                 return quantifier;
24665             }
24666         }
24667 
24668         public enum OutputParameter implements OnnxParameter {
24669             tensor(TypeConstraint.T.typeVariable(), Quantifier.REQUIRED),
24670             ;
24671 
24672             final OnnxType type;
24673             final Quantifier quantifier;
24674 
24675             OutputParameter(OnnxType type, Quantifier quantifier) {
24676                 this.type = type;
24677                 this.quantifier = quantifier;
24678             }
24679 
24680             @Override
24681             public OnnxType type() {
24682                 return type;
24683             }
24684 
24685             @Override
24686             public Quantifier quantifier() {
24687                 return quantifier;
24688             }
24689         }
24690 
24691         public static final OnnxSchema SCHEMA = new OnnxSchemaRecord(
24692                 NAME,
24693                 List.of(Attribute.values()),
24694                 List.of(TypeConstraint.values()),
24695                 List.of(InputParameter.values()),
24696                 List.of(OutputParameter.values())
24697         );
24698 
24699         public SequenceAt(ExternalizedOp def) {
24700             super(SCHEMA, def);
24701         }
24702 
24703         SequenceAt(SequenceAt that, CopyContext cc) {
24704             super(that, cc);
24705         }
24706 
24707         @Override
24708         public SequenceAt transform(CopyContext cc, OpTransformer ot) {
24709             return new SequenceAt(this, cc);
24710         }
24711 
24712         SequenceAt(TypeElement resultType, Value input_sequence, Value position) {
24713             super(SCHEMA, resultType, Set.of(), List.of(input_sequence, position), List.of());
24714         }
24715 
24716         @Override
24717         public SequencedSet<OnnxParameter> onnxOutputs() {
24718             return onnxOutputs(SCHEMA);
24719         }
24720 
24721         @Override
24722         public SequencedMap<OnnxParameter, Object> onnxInputs() {
24723             return onnxInputs(SCHEMA, List.of(input_sequence(), position()));
24724         }
24725 
24726         public Value input_sequence() {
24727             return operands().get(0);
24728         }
24729 
24730         public Value position() {
24731             return operands().get(1);
24732         }
24733 
24734     }
24735 
24736     public static SequenceAt SequenceAt(TypeElement resultType, Value input_sequence, Value position) {
24737         return new SequenceAt(resultType, input_sequence, position);
24738     }
24739 
24740     @OpFactoryHelper.OpDeclaration(SequenceConstruct.NAME)
24741     public static final class SequenceConstruct extends OnnxOp {
24742         public static final String NAME = "SequenceConstruct";
24743 
24744         public enum Attribute implements OnnxAttribute.None { }
24745 
24746         public enum TypeConstraint implements OnnxTypeConstraint {
24747             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())))),
24748             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()))))),
24749             ;
24750 
24751             final OnnxType.TypeVariable typeVariable;
24752 
24753             TypeConstraint(OnnxType.TypeVariable typeVariable) {
24754                 assert typeVariable.name().equals(name());
24755                 this.typeVariable = typeVariable;
24756             }
24757 
24758             @Override
24759             public OnnxType.TypeVariable typeVariable() {
24760                 return typeVariable;
24761             }
24762         }
24763 
24764         public enum InputParameter implements OnnxParameter {
24765             inputs(TypeConstraint.T.typeVariable(), Quantifier.VARIADIC),
24766             ;
24767 
24768             final OnnxType type;
24769             final Quantifier quantifier;
24770 
24771             InputParameter(OnnxType type, Quantifier quantifier) {
24772                 this.type = type;
24773                 this.quantifier = quantifier;
24774             }
24775 
24776             @Override
24777             public OnnxType type() {
24778                 return type;
24779             }
24780 
24781             @Override
24782             public Quantifier quantifier() {
24783                 return quantifier;
24784             }
24785         }
24786 
24787         public enum OutputParameter implements OnnxParameter {
24788             output_sequence(TypeConstraint.S.typeVariable(), Quantifier.REQUIRED),
24789             ;
24790 
24791             final OnnxType type;
24792             final Quantifier quantifier;
24793 
24794             OutputParameter(OnnxType type, Quantifier quantifier) {
24795                 this.type = type;
24796                 this.quantifier = quantifier;
24797             }
24798 
24799             @Override
24800             public OnnxType type() {
24801                 return type;
24802             }
24803 
24804             @Override
24805             public Quantifier quantifier() {
24806                 return quantifier;
24807             }
24808         }
24809 
24810         public static final OnnxSchema SCHEMA = new OnnxSchemaRecord(
24811                 NAME,
24812                 List.of(Attribute.values()),
24813                 List.of(TypeConstraint.values()),
24814                 List.of(InputParameter.values()),
24815                 List.of(OutputParameter.values())
24816         );
24817 
24818         public SequenceConstruct(ExternalizedOp def) {
24819             super(SCHEMA, def);
24820         }
24821 
24822         SequenceConstruct(SequenceConstruct that, CopyContext cc) {
24823             super(that, cc);
24824         }
24825 
24826         @Override
24827         public SequenceConstruct transform(CopyContext cc, OpTransformer ot) {
24828             return new SequenceConstruct(this, cc);
24829         }
24830 
24831         SequenceConstruct(TypeElement resultType, List<Value> inputs) {
24832             super(SCHEMA, resultType, Set.of(), List.of(inputs), List.of());
24833         }
24834 
24835         @Override
24836         public SequencedSet<OnnxParameter> onnxOutputs() {
24837             return onnxOutputs(SCHEMA);
24838         }
24839 
24840         @Override
24841         public SequencedMap<OnnxParameter, Object> onnxInputs() {
24842             return onnxInputs(SCHEMA, List.of(inputs()));
24843         }
24844 
24845         public List<Value> inputs() {
24846             return operands();
24847         }
24848 
24849     }
24850 
24851     public static SequenceConstruct SequenceConstruct(TypeElement resultType, List<Value> inputs) {
24852         return new SequenceConstruct(resultType, inputs);
24853     }
24854 
24855     @OpFactoryHelper.OpDeclaration(SequenceEmpty.NAME)
24856     public static final class SequenceEmpty extends OnnxOp {
24857         public static final String NAME = "SequenceEmpty";
24858 
24859         public enum Attribute implements OnnxAttribute {
24860             dtype(Long.class, true, null),
24861             ;
24862 
24863                 final Class<?> t;
24864                 final boolean optional;
24865                 final Object defaultValue;
24866 
24867                 Attribute(Class<?> type, boolean optional, Object defaultValue) {
24868                     this.t = type;
24869                     this.optional = optional;
24870                     this.defaultValue = defaultValue;
24871                     assert optional || defaultValue == null;
24872                 }
24873 
24874                 public Class<?> type() {
24875                     return t;
24876                 }
24877 
24878                 public boolean isOptional() {
24879                     return optional;
24880                 }
24881 
24882                 public Object defaultValue() {
24883                     return defaultValue;
24884                 }
24885         }
24886 
24887         public enum TypeConstraint implements OnnxTypeConstraint {
24888             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()))))),
24889             ;
24890 
24891             final OnnxType.TypeVariable typeVariable;
24892 
24893             TypeConstraint(OnnxType.TypeVariable typeVariable) {
24894                 assert typeVariable.name().equals(name());
24895                 this.typeVariable = typeVariable;
24896             }
24897 
24898             @Override
24899             public OnnxType.TypeVariable typeVariable() {
24900                 return typeVariable;
24901             }
24902         }
24903 
24904         public enum InputParameter implements OnnxParameter.None { }
24905 
24906         public enum OutputParameter implements OnnxParameter {
24907             output(TypeConstraint.S.typeVariable(), Quantifier.REQUIRED),
24908             ;
24909 
24910             final OnnxType type;
24911             final Quantifier quantifier;
24912 
24913             OutputParameter(OnnxType type, Quantifier quantifier) {
24914                 this.type = type;
24915                 this.quantifier = quantifier;
24916             }
24917 
24918             @Override
24919             public OnnxType type() {
24920                 return type;
24921             }
24922 
24923             @Override
24924             public Quantifier quantifier() {
24925                 return quantifier;
24926             }
24927         }
24928 
24929         public static final OnnxSchema SCHEMA = new OnnxSchemaRecord(
24930                 NAME,
24931                 List.of(Attribute.values()),
24932                 List.of(TypeConstraint.values()),
24933                 List.of(InputParameter.values()),
24934                 List.of(OutputParameter.values())
24935         );
24936 
24937         public SequenceEmpty(ExternalizedOp def) {
24938             super(SCHEMA, def);
24939         }
24940 
24941         SequenceEmpty(SequenceEmpty that, CopyContext cc) {
24942             super(that, cc);
24943         }
24944 
24945         @Override
24946         public SequenceEmpty transform(CopyContext cc, OpTransformer ot) {
24947             return new SequenceEmpty(this, cc);
24948         }
24949 
24950         SequenceEmpty(TypeElement resultType, java.util.Optional<Long> dtype) {
24951             super(SCHEMA, resultType, Set.of(), List.of(), List.of(dtype));
24952         }
24953 
24954         @Override
24955         public SequencedSet<OnnxParameter> onnxOutputs() {
24956             return onnxOutputs(SCHEMA);
24957         }
24958 
24959         @Override
24960         public SequencedMap<OnnxParameter, Object> onnxInputs() {
24961             return onnxInputs(SCHEMA, List.of());
24962         }
24963 
24964         public java.util.Optional<Long> dtype() {
24965             Long dtype = Attribute.dtype.access(Long.class, onnxAttributes);
24966             return java.util.Optional.ofNullable(dtype);
24967         }
24968 
24969     }
24970 
24971     public static SequenceEmpty SequenceEmpty(TypeElement resultType, java.util.Optional<Long> dtype) {
24972         return new SequenceEmpty(resultType, dtype);
24973     }
24974 
24975     @OpFactoryHelper.OpDeclaration(SequenceErase.NAME)
24976     public static final class SequenceErase extends OnnxOp {
24977         public static final String NAME = "SequenceErase";
24978 
24979         public enum Attribute implements OnnxAttribute.None { }
24980 
24981         public enum TypeConstraint implements OnnxTypeConstraint {
24982             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()))))),
24983             I(new OnnxType.TypeVariable("I", List.of(OnnxType.tensor(OnnxType.int32()), OnnxType.tensor(OnnxType.int64())))),
24984             ;
24985 
24986             final OnnxType.TypeVariable typeVariable;
24987 
24988             TypeConstraint(OnnxType.TypeVariable typeVariable) {
24989                 assert typeVariable.name().equals(name());
24990                 this.typeVariable = typeVariable;
24991             }
24992 
24993             @Override
24994             public OnnxType.TypeVariable typeVariable() {
24995                 return typeVariable;
24996             }
24997         }
24998 
24999         public enum InputParameter implements OnnxParameter {
25000             input_sequence(TypeConstraint.S.typeVariable(), Quantifier.REQUIRED),
25001             position(TypeConstraint.I.typeVariable(), Quantifier.OPTIONAL),
25002             ;
25003 
25004             final OnnxType type;
25005             final Quantifier quantifier;
25006 
25007             InputParameter(OnnxType type, Quantifier quantifier) {
25008                 this.type = type;
25009                 this.quantifier = quantifier;
25010             }
25011 
25012             @Override
25013             public OnnxType type() {
25014                 return type;
25015             }
25016 
25017             @Override
25018             public Quantifier quantifier() {
25019                 return quantifier;
25020             }
25021         }
25022 
25023         public enum OutputParameter implements OnnxParameter {
25024             output_sequence(TypeConstraint.S.typeVariable(), Quantifier.REQUIRED),
25025             ;
25026 
25027             final OnnxType type;
25028             final Quantifier quantifier;
25029 
25030             OutputParameter(OnnxType type, Quantifier quantifier) {
25031                 this.type = type;
25032                 this.quantifier = quantifier;
25033             }
25034 
25035             @Override
25036             public OnnxType type() {
25037                 return type;
25038             }
25039 
25040             @Override
25041             public Quantifier quantifier() {
25042                 return quantifier;
25043             }
25044         }
25045 
25046         public static final OnnxSchema SCHEMA = new OnnxSchemaRecord(
25047                 NAME,
25048                 List.of(Attribute.values()),
25049                 List.of(TypeConstraint.values()),
25050                 List.of(InputParameter.values()),
25051                 List.of(OutputParameter.values())
25052         );
25053 
25054         public SequenceErase(ExternalizedOp def) {
25055             super(SCHEMA, def);
25056         }
25057 
25058         SequenceErase(SequenceErase that, CopyContext cc) {
25059             super(that, cc);
25060         }
25061 
25062         @Override
25063         public SequenceErase transform(CopyContext cc, OpTransformer ot) {
25064             return new SequenceErase(this, cc);
25065         }
25066 
25067         SequenceErase(TypeElement resultType, Value input_sequence, java.util.Optional<Value> position) {
25068             super(SCHEMA, resultType, Set.of(), List.of(input_sequence, position), List.of());
25069         }
25070 
25071         @Override
25072         public SequencedSet<OnnxParameter> onnxOutputs() {
25073             return onnxOutputs(SCHEMA);
25074         }
25075 
25076         @Override
25077         public SequencedMap<OnnxParameter, Object> onnxInputs() {
25078             return onnxInputs(SCHEMA, List.of(input_sequence(), position()));
25079         }
25080 
25081         public Value input_sequence() {
25082             return operands().get(0);
25083         }
25084 
25085         public java.util.Optional<Value> position() {
25086             int i = optionalInputArguments.indexOf(InputParameter.position);
25087             return i != -1 ? java.util.Optional.of(operands().get(1 + i)) : java.util.Optional.empty();
25088         }
25089 
25090     }
25091 
25092     public static SequenceErase SequenceErase(TypeElement resultType, Value input_sequence, java.util.Optional<Value> position) {
25093         return new SequenceErase(resultType, input_sequence, position);
25094     }
25095 
25096     @OpFactoryHelper.OpDeclaration(SequenceInsert.NAME)
25097     public static final class SequenceInsert extends OnnxOp {
25098         public static final String NAME = "SequenceInsert";
25099 
25100         public enum Attribute implements OnnxAttribute.None { }
25101 
25102         public enum TypeConstraint implements OnnxTypeConstraint {
25103             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())))),
25104             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()))))),
25105             I(new OnnxType.TypeVariable("I", List.of(OnnxType.tensor(OnnxType.int32()), OnnxType.tensor(OnnxType.int64())))),
25106             ;
25107 
25108             final OnnxType.TypeVariable typeVariable;
25109 
25110             TypeConstraint(OnnxType.TypeVariable typeVariable) {
25111                 assert typeVariable.name().equals(name());
25112                 this.typeVariable = typeVariable;
25113             }
25114 
25115             @Override
25116             public OnnxType.TypeVariable typeVariable() {
25117                 return typeVariable;
25118             }
25119         }
25120 
25121         public enum InputParameter implements OnnxParameter {
25122             input_sequence(TypeConstraint.S.typeVariable(), Quantifier.REQUIRED),
25123             tensor(TypeConstraint.T.typeVariable(), Quantifier.REQUIRED),
25124             position(TypeConstraint.I.typeVariable(), Quantifier.OPTIONAL),
25125             ;
25126 
25127             final OnnxType type;
25128             final Quantifier quantifier;
25129 
25130             InputParameter(OnnxType type, Quantifier quantifier) {
25131                 this.type = type;
25132                 this.quantifier = quantifier;
25133             }
25134 
25135             @Override
25136             public OnnxType type() {
25137                 return type;
25138             }
25139 
25140             @Override
25141             public Quantifier quantifier() {
25142                 return quantifier;
25143             }
25144         }
25145 
25146         public enum OutputParameter implements OnnxParameter {
25147             output_sequence(TypeConstraint.S.typeVariable(), Quantifier.REQUIRED),
25148             ;
25149 
25150             final OnnxType type;
25151             final Quantifier quantifier;
25152 
25153             OutputParameter(OnnxType type, Quantifier quantifier) {
25154                 this.type = type;
25155                 this.quantifier = quantifier;
25156             }
25157 
25158             @Override
25159             public OnnxType type() {
25160                 return type;
25161             }
25162 
25163             @Override
25164             public Quantifier quantifier() {
25165                 return quantifier;
25166             }
25167         }
25168 
25169         public static final OnnxSchema SCHEMA = new OnnxSchemaRecord(
25170                 NAME,
25171                 List.of(Attribute.values()),
25172                 List.of(TypeConstraint.values()),
25173                 List.of(InputParameter.values()),
25174                 List.of(OutputParameter.values())
25175         );
25176 
25177         public SequenceInsert(ExternalizedOp def) {
25178             super(SCHEMA, def);
25179         }
25180 
25181         SequenceInsert(SequenceInsert that, CopyContext cc) {
25182             super(that, cc);
25183         }
25184 
25185         @Override
25186         public SequenceInsert transform(CopyContext cc, OpTransformer ot) {
25187             return new SequenceInsert(this, cc);
25188         }
25189 
25190         SequenceInsert(TypeElement resultType, Value input_sequence, Value tensor, java.util.Optional<Value> position) {
25191             super(SCHEMA, resultType, Set.of(), List.of(input_sequence, tensor, position), List.of());
25192         }
25193 
25194         @Override
25195         public SequencedSet<OnnxParameter> onnxOutputs() {
25196             return onnxOutputs(SCHEMA);
25197         }
25198 
25199         @Override
25200         public SequencedMap<OnnxParameter, Object> onnxInputs() {
25201             return onnxInputs(SCHEMA, List.of(input_sequence(), tensor(), position()));
25202         }
25203 
25204         public Value input_sequence() {
25205             return operands().get(0);
25206         }
25207 
25208         public Value tensor() {
25209             return operands().get(1);
25210         }
25211 
25212         public java.util.Optional<Value> position() {
25213             int i = optionalInputArguments.indexOf(InputParameter.position);
25214             return i != -1 ? java.util.Optional.of(operands().get(2 + i)) : java.util.Optional.empty();
25215         }
25216 
25217     }
25218 
25219     public static SequenceInsert SequenceInsert(TypeElement resultType, Value input_sequence, Value tensor, java.util.Optional<Value> position) {
25220         return new SequenceInsert(resultType, input_sequence, tensor, position);
25221     }
25222 
25223     @OpFactoryHelper.OpDeclaration(SequenceLength.NAME)
25224     public static final class SequenceLength extends OnnxOp {
25225         public static final String NAME = "SequenceLength";
25226 
25227         public enum Attribute implements OnnxAttribute.None { }
25228 
25229         public enum TypeConstraint implements OnnxTypeConstraint {
25230             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()))))),
25231             I(new OnnxType.TypeVariable("I", List.of(OnnxType.tensor(OnnxType.int64())))),
25232             ;
25233 
25234             final OnnxType.TypeVariable typeVariable;
25235 
25236             TypeConstraint(OnnxType.TypeVariable typeVariable) {
25237                 assert typeVariable.name().equals(name());
25238                 this.typeVariable = typeVariable;
25239             }
25240 
25241             @Override
25242             public OnnxType.TypeVariable typeVariable() {
25243                 return typeVariable;
25244             }
25245         }
25246 
25247         public enum InputParameter implements OnnxParameter {
25248             input_sequence(TypeConstraint.S.typeVariable(), Quantifier.REQUIRED),
25249             ;
25250 
25251             final OnnxType type;
25252             final Quantifier quantifier;
25253 
25254             InputParameter(OnnxType type, Quantifier quantifier) {
25255                 this.type = type;
25256                 this.quantifier = quantifier;
25257             }
25258 
25259             @Override
25260             public OnnxType type() {
25261                 return type;
25262             }
25263 
25264             @Override
25265             public Quantifier quantifier() {
25266                 return quantifier;
25267             }
25268         }
25269 
25270         public enum OutputParameter implements OnnxParameter {
25271             length(TypeConstraint.I.typeVariable(), Quantifier.REQUIRED),
25272             ;
25273 
25274             final OnnxType type;
25275             final Quantifier quantifier;
25276 
25277             OutputParameter(OnnxType type, Quantifier quantifier) {
25278                 this.type = type;
25279                 this.quantifier = quantifier;
25280             }
25281 
25282             @Override
25283             public OnnxType type() {
25284                 return type;
25285             }
25286 
25287             @Override
25288             public Quantifier quantifier() {
25289                 return quantifier;
25290             }
25291         }
25292 
25293         public static final OnnxSchema SCHEMA = new OnnxSchemaRecord(
25294                 NAME,
25295                 List.of(Attribute.values()),
25296                 List.of(TypeConstraint.values()),
25297                 List.of(InputParameter.values()),
25298                 List.of(OutputParameter.values())
25299         );
25300 
25301         public SequenceLength(ExternalizedOp def) {
25302             super(SCHEMA, def);
25303         }
25304 
25305         SequenceLength(SequenceLength that, CopyContext cc) {
25306             super(that, cc);
25307         }
25308 
25309         @Override
25310         public SequenceLength transform(CopyContext cc, OpTransformer ot) {
25311             return new SequenceLength(this, cc);
25312         }
25313 
25314         SequenceLength(TypeElement resultType, Value input_sequence) {
25315             super(SCHEMA, resultType, Set.of(), List.of(input_sequence), List.of());
25316         }
25317 
25318         @Override
25319         public SequencedSet<OnnxParameter> onnxOutputs() {
25320             return onnxOutputs(SCHEMA);
25321         }
25322 
25323         @Override
25324         public SequencedMap<OnnxParameter, Object> onnxInputs() {
25325             return onnxInputs(SCHEMA, List.of(input_sequence()));
25326         }
25327 
25328         public Value input_sequence() {
25329             return operands().get(0);
25330         }
25331 
25332     }
25333 
25334     public static SequenceLength SequenceLength(TypeElement resultType, Value input_sequence) {
25335         return new SequenceLength(resultType, input_sequence);
25336     }
25337 
25338     @OpFactoryHelper.OpDeclaration(Shape.NAME)
25339     public static final class Shape extends OnnxOp {
25340         public static final String NAME = "Shape";
25341 
25342         public enum Attribute implements OnnxAttribute {
25343             start(Long.class, true, 0),
25344             end(Long.class, true, null),
25345             ;
25346 
25347                 final Class<?> t;
25348                 final boolean optional;
25349                 final Object defaultValue;
25350 
25351                 Attribute(Class<?> type, boolean optional, Object defaultValue) {
25352                     this.t = type;
25353                     this.optional = optional;
25354                     this.defaultValue = defaultValue;
25355                     assert optional || defaultValue == null;
25356                 }
25357 
25358                 public Class<?> type() {
25359                     return t;
25360                 }
25361 
25362                 public boolean isOptional() {
25363                     return optional;
25364                 }
25365 
25366                 public Object defaultValue() {
25367                     return defaultValue;
25368                 }
25369         }
25370 
25371         public enum TypeConstraint implements OnnxTypeConstraint {
25372             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())))),
25373             T1(new OnnxType.TypeVariable("T1", List.of(OnnxType.tensor(OnnxType.int64())))),
25374             ;
25375 
25376             final OnnxType.TypeVariable typeVariable;
25377 
25378             TypeConstraint(OnnxType.TypeVariable typeVariable) {
25379                 assert typeVariable.name().equals(name());
25380                 this.typeVariable = typeVariable;
25381             }
25382 
25383             @Override
25384             public OnnxType.TypeVariable typeVariable() {
25385                 return typeVariable;
25386             }
25387         }
25388 
25389         public enum InputParameter implements OnnxParameter {
25390             data(TypeConstraint.T.typeVariable(), Quantifier.REQUIRED),
25391             ;
25392 
25393             final OnnxType type;
25394             final Quantifier quantifier;
25395 
25396             InputParameter(OnnxType type, Quantifier quantifier) {
25397                 this.type = type;
25398                 this.quantifier = quantifier;
25399             }
25400 
25401             @Override
25402             public OnnxType type() {
25403                 return type;
25404             }
25405 
25406             @Override
25407             public Quantifier quantifier() {
25408                 return quantifier;
25409             }
25410         }
25411 
25412         public enum OutputParameter implements OnnxParameter {
25413             shape(TypeConstraint.T1.typeVariable(), Quantifier.REQUIRED),
25414             ;
25415 
25416             final OnnxType type;
25417             final Quantifier quantifier;
25418 
25419             OutputParameter(OnnxType type, Quantifier quantifier) {
25420                 this.type = type;
25421                 this.quantifier = quantifier;
25422             }
25423 
25424             @Override
25425             public OnnxType type() {
25426                 return type;
25427             }
25428 
25429             @Override
25430             public Quantifier quantifier() {
25431                 return quantifier;
25432             }
25433         }
25434 
25435         public static final OnnxSchema SCHEMA = new OnnxSchemaRecord(
25436                 NAME,
25437                 List.of(Attribute.values()),
25438                 List.of(TypeConstraint.values()),
25439                 List.of(InputParameter.values()),
25440                 List.of(OutputParameter.values())
25441         );
25442 
25443         public Shape(ExternalizedOp def) {
25444             super(SCHEMA, def);
25445         }
25446 
25447         Shape(Shape that, CopyContext cc) {
25448             super(that, cc);
25449         }
25450 
25451         @Override
25452         public Shape transform(CopyContext cc, OpTransformer ot) {
25453             return new Shape(this, cc);
25454         }
25455 
25456         Shape(TypeElement resultType, Value data, java.util.Optional<Long> start, java.util.Optional<Long> end) {
25457             super(SCHEMA, resultType, Set.of(), List.of(data), List.of(start, end));
25458         }
25459 
25460         @Override
25461         public SequencedSet<OnnxParameter> onnxOutputs() {
25462             return onnxOutputs(SCHEMA);
25463         }
25464 
25465         @Override
25466         public SequencedMap<OnnxParameter, Object> onnxInputs() {
25467             return onnxInputs(SCHEMA, List.of(data()));
25468         }
25469 
25470         public Value data() {
25471             return operands().get(0);
25472         }
25473 
25474         public java.util.Optional<Long> start() {
25475             Long start = Attribute.start.access(Long.class, onnxAttributes);
25476             return java.util.Optional.ofNullable(start);
25477         }
25478 
25479         public java.util.Optional<Long> end() {
25480             Long end = Attribute.end.access(Long.class, onnxAttributes);
25481             return java.util.Optional.ofNullable(end);
25482         }
25483 
25484     }
25485 
25486     public static Shape Shape(TypeElement resultType, Value data, java.util.Optional<Long> start, java.util.Optional<Long> end) {
25487         return new Shape(resultType, data, start, end);
25488     }
25489 
25490     @OpFactoryHelper.OpDeclaration(Shrink.NAME)
25491     public static final class Shrink extends OnnxOp {
25492         public static final String NAME = "Shrink";
25493 
25494         public enum Attribute implements OnnxAttribute {
25495             lambd(Float.class, true, 0.5f),
25496             bias(Float.class, true, 0.0f),
25497             ;
25498 
25499                 final Class<?> t;
25500                 final boolean optional;
25501                 final Object defaultValue;
25502 
25503                 Attribute(Class<?> type, boolean optional, Object defaultValue) {
25504                     this.t = type;
25505                     this.optional = optional;
25506                     this.defaultValue = defaultValue;
25507                     assert optional || defaultValue == null;
25508                 }
25509 
25510                 public Class<?> type() {
25511                     return t;
25512                 }
25513 
25514                 public boolean isOptional() {
25515                     return optional;
25516                 }
25517 
25518                 public Object defaultValue() {
25519                     return defaultValue;
25520                 }
25521         }
25522 
25523         public enum TypeConstraint implements OnnxTypeConstraint {
25524             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())))),
25525             ;
25526 
25527             final OnnxType.TypeVariable typeVariable;
25528 
25529             TypeConstraint(OnnxType.TypeVariable typeVariable) {
25530                 assert typeVariable.name().equals(name());
25531                 this.typeVariable = typeVariable;
25532             }
25533 
25534             @Override
25535             public OnnxType.TypeVariable typeVariable() {
25536                 return typeVariable;
25537             }
25538         }
25539 
25540         public enum InputParameter implements OnnxParameter {
25541             input(TypeConstraint.T.typeVariable(), Quantifier.REQUIRED),
25542             ;
25543 
25544             final OnnxType type;
25545             final Quantifier quantifier;
25546 
25547             InputParameter(OnnxType type, Quantifier quantifier) {
25548                 this.type = type;
25549                 this.quantifier = quantifier;
25550             }
25551 
25552             @Override
25553             public OnnxType type() {
25554                 return type;
25555             }
25556 
25557             @Override
25558             public Quantifier quantifier() {
25559                 return quantifier;
25560             }
25561         }
25562 
25563         public enum OutputParameter implements OnnxParameter {
25564             output(TypeConstraint.T.typeVariable(), Quantifier.REQUIRED),
25565             ;
25566 
25567             final OnnxType type;
25568             final Quantifier quantifier;
25569 
25570             OutputParameter(OnnxType type, Quantifier quantifier) {
25571                 this.type = type;
25572                 this.quantifier = quantifier;
25573             }
25574 
25575             @Override
25576             public OnnxType type() {
25577                 return type;
25578             }
25579 
25580             @Override
25581             public Quantifier quantifier() {
25582                 return quantifier;
25583             }
25584         }
25585 
25586         public static final OnnxSchema SCHEMA = new OnnxSchemaRecord(
25587                 NAME,
25588                 List.of(Attribute.values()),
25589                 List.of(TypeConstraint.values()),
25590                 List.of(InputParameter.values()),
25591                 List.of(OutputParameter.values())
25592         );
25593 
25594         public Shrink(ExternalizedOp def) {
25595             super(SCHEMA, def);
25596         }
25597 
25598         Shrink(Shrink that, CopyContext cc) {
25599             super(that, cc);
25600         }
25601 
25602         @Override
25603         public Shrink transform(CopyContext cc, OpTransformer ot) {
25604             return new Shrink(this, cc);
25605         }
25606 
25607         Shrink(TypeElement resultType, Value input, java.util.Optional<Float> lambd, java.util.Optional<Float> bias) {
25608             super(SCHEMA, resultType, Set.of(), List.of(input), List.of(lambd, bias));
25609         }
25610 
25611         @Override
25612         public SequencedSet<OnnxParameter> onnxOutputs() {
25613             return onnxOutputs(SCHEMA);
25614         }
25615 
25616         @Override
25617         public SequencedMap<OnnxParameter, Object> onnxInputs() {
25618             return onnxInputs(SCHEMA, List.of(input()));
25619         }
25620 
25621         public Value input() {
25622             return operands().get(0);
25623         }
25624 
25625         public java.util.Optional<Float> lambd() {
25626             Float lambd = Attribute.lambd.access(Float.class, onnxAttributes);
25627             return java.util.Optional.ofNullable(lambd);
25628         }
25629 
25630         public java.util.Optional<Float> bias() {
25631             Float bias = Attribute.bias.access(Float.class, onnxAttributes);
25632             return java.util.Optional.ofNullable(bias);
25633         }
25634 
25635     }
25636 
25637     public static Shrink Shrink(TypeElement resultType, Value input, java.util.Optional<Float> lambd, java.util.Optional<Float> bias) {
25638         return new Shrink(resultType, input, lambd, bias);
25639     }
25640 
25641     @OpFactoryHelper.OpDeclaration(Sigmoid.NAME)
25642     public static final class Sigmoid extends OnnxOp {
25643         public static final String NAME = "Sigmoid";
25644 
25645         public enum Attribute implements OnnxAttribute.None { }
25646 
25647         public enum TypeConstraint implements OnnxTypeConstraint {
25648             T(new OnnxType.TypeVariable("T", List.of(OnnxType.tensor(OnnxType.float16()), OnnxType.tensor(OnnxType.float32()), OnnxType.tensor(OnnxType.float64()), OnnxType.tensor(OnnxType.bfloat16())))),
25649             ;
25650 
25651             final OnnxType.TypeVariable typeVariable;
25652 
25653             TypeConstraint(OnnxType.TypeVariable typeVariable) {
25654                 assert typeVariable.name().equals(name());
25655                 this.typeVariable = typeVariable;
25656             }
25657 
25658             @Override
25659             public OnnxType.TypeVariable typeVariable() {
25660                 return typeVariable;
25661             }
25662         }
25663 
25664         public enum InputParameter implements OnnxParameter {
25665             X(TypeConstraint.T.typeVariable(), Quantifier.REQUIRED),
25666             ;
25667 
25668             final OnnxType type;
25669             final Quantifier quantifier;
25670 
25671             InputParameter(OnnxType type, Quantifier quantifier) {
25672                 this.type = type;
25673                 this.quantifier = quantifier;
25674             }
25675 
25676             @Override
25677             public OnnxType type() {
25678                 return type;
25679             }
25680 
25681             @Override
25682             public Quantifier quantifier() {
25683                 return quantifier;
25684             }
25685         }
25686 
25687         public enum OutputParameter implements OnnxParameter {
25688             Y(TypeConstraint.T.typeVariable(), Quantifier.REQUIRED),
25689             ;
25690 
25691             final OnnxType type;
25692             final Quantifier quantifier;
25693 
25694             OutputParameter(OnnxType type, Quantifier quantifier) {
25695                 this.type = type;
25696                 this.quantifier = quantifier;
25697             }
25698 
25699             @Override
25700             public OnnxType type() {
25701                 return type;
25702             }
25703 
25704             @Override
25705             public Quantifier quantifier() {
25706                 return quantifier;
25707             }
25708         }
25709 
25710         public static final OnnxSchema SCHEMA = new OnnxSchemaRecord(
25711                 NAME,
25712                 List.of(Attribute.values()),
25713                 List.of(TypeConstraint.values()),
25714                 List.of(InputParameter.values()),
25715                 List.of(OutputParameter.values())
25716         );
25717 
25718         public Sigmoid(ExternalizedOp def) {
25719             super(SCHEMA, def);
25720         }
25721 
25722         Sigmoid(Sigmoid that, CopyContext cc) {
25723             super(that, cc);
25724         }
25725 
25726         @Override
25727         public Sigmoid transform(CopyContext cc, OpTransformer ot) {
25728             return new Sigmoid(this, cc);
25729         }
25730 
25731         Sigmoid(TypeElement resultType, Value X) {
25732             super(SCHEMA, resultType, Set.of(), List.of(X), List.of());
25733         }
25734 
25735         @Override
25736         public SequencedSet<OnnxParameter> onnxOutputs() {
25737             return onnxOutputs(SCHEMA);
25738         }
25739 
25740         @Override
25741         public SequencedMap<OnnxParameter, Object> onnxInputs() {
25742             return onnxInputs(SCHEMA, List.of(X()));
25743         }
25744 
25745         public Value X() {
25746             return operands().get(0);
25747         }
25748 
25749     }
25750 
25751     public static Sigmoid Sigmoid(TypeElement resultType, Value X) {
25752         return new Sigmoid(resultType, X);
25753     }
25754 
25755     @OpFactoryHelper.OpDeclaration(Sign.NAME)
25756     public static final class Sign extends OnnxOp {
25757         public static final String NAME = "Sign";
25758 
25759         public enum Attribute implements OnnxAttribute.None { }
25760 
25761         public enum TypeConstraint implements OnnxTypeConstraint {
25762             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())))),
25763             ;
25764 
25765             final OnnxType.TypeVariable typeVariable;
25766 
25767             TypeConstraint(OnnxType.TypeVariable typeVariable) {
25768                 assert typeVariable.name().equals(name());
25769                 this.typeVariable = typeVariable;
25770             }
25771 
25772             @Override
25773             public OnnxType.TypeVariable typeVariable() {
25774                 return typeVariable;
25775             }
25776         }
25777 
25778         public enum InputParameter implements OnnxParameter {
25779             input(TypeConstraint.T.typeVariable(), Quantifier.REQUIRED),
25780             ;
25781 
25782             final OnnxType type;
25783             final Quantifier quantifier;
25784 
25785             InputParameter(OnnxType type, Quantifier quantifier) {
25786                 this.type = type;
25787                 this.quantifier = quantifier;
25788             }
25789 
25790             @Override
25791             public OnnxType type() {
25792                 return type;
25793             }
25794 
25795             @Override
25796             public Quantifier quantifier() {
25797                 return quantifier;
25798             }
25799         }
25800 
25801         public enum OutputParameter implements OnnxParameter {
25802             output(TypeConstraint.T.typeVariable(), Quantifier.REQUIRED),
25803             ;
25804 
25805             final OnnxType type;
25806             final Quantifier quantifier;
25807 
25808             OutputParameter(OnnxType type, Quantifier quantifier) {
25809                 this.type = type;
25810                 this.quantifier = quantifier;
25811             }
25812 
25813             @Override
25814             public OnnxType type() {
25815                 return type;
25816             }
25817 
25818             @Override
25819             public Quantifier quantifier() {
25820                 return quantifier;
25821             }
25822         }
25823 
25824         public static final OnnxSchema SCHEMA = new OnnxSchemaRecord(
25825                 NAME,
25826                 List.of(Attribute.values()),
25827                 List.of(TypeConstraint.values()),
25828                 List.of(InputParameter.values()),
25829                 List.of(OutputParameter.values())
25830         );
25831 
25832         public Sign(ExternalizedOp def) {
25833             super(SCHEMA, def);
25834         }
25835 
25836         Sign(Sign that, CopyContext cc) {
25837             super(that, cc);
25838         }
25839 
25840         @Override
25841         public Sign transform(CopyContext cc, OpTransformer ot) {
25842             return new Sign(this, cc);
25843         }
25844 
25845         Sign(TypeElement resultType, Value input) {
25846             super(SCHEMA, resultType, Set.of(), List.of(input), List.of());
25847         }
25848 
25849         @Override
25850         public SequencedSet<OnnxParameter> onnxOutputs() {
25851             return onnxOutputs(SCHEMA);
25852         }
25853 
25854         @Override
25855         public SequencedMap<OnnxParameter, Object> onnxInputs() {
25856             return onnxInputs(SCHEMA, List.of(input()));
25857         }
25858 
25859         public Value input() {
25860             return operands().get(0);
25861         }
25862 
25863     }
25864 
25865     public static Sign Sign(TypeElement resultType, Value input) {
25866         return new Sign(resultType, input);
25867     }
25868 
25869     @OpFactoryHelper.OpDeclaration(Sin.NAME)
25870     public static final class Sin extends OnnxOp {
25871         public static final String NAME = "Sin";
25872 
25873         public enum Attribute implements OnnxAttribute.None { }
25874 
25875         public enum TypeConstraint implements OnnxTypeConstraint {
25876             T(new OnnxType.TypeVariable("T", List.of(OnnxType.tensor(OnnxType.bfloat16()), OnnxType.tensor(OnnxType.float16()), OnnxType.tensor(OnnxType.float32()), OnnxType.tensor(OnnxType.float64())))),
25877             ;
25878 
25879             final OnnxType.TypeVariable typeVariable;
25880 
25881             TypeConstraint(OnnxType.TypeVariable typeVariable) {
25882                 assert typeVariable.name().equals(name());
25883                 this.typeVariable = typeVariable;
25884             }
25885 
25886             @Override
25887             public OnnxType.TypeVariable typeVariable() {
25888                 return typeVariable;
25889             }
25890         }
25891 
25892         public enum InputParameter implements OnnxParameter {
25893             input(TypeConstraint.T.typeVariable(), Quantifier.REQUIRED),
25894             ;
25895 
25896             final OnnxType type;
25897             final Quantifier quantifier;
25898 
25899             InputParameter(OnnxType type, Quantifier quantifier) {
25900                 this.type = type;
25901                 this.quantifier = quantifier;
25902             }
25903 
25904             @Override
25905             public OnnxType type() {
25906                 return type;
25907             }
25908 
25909             @Override
25910             public Quantifier quantifier() {
25911                 return quantifier;
25912             }
25913         }
25914 
25915         public enum OutputParameter implements OnnxParameter {
25916             output(TypeConstraint.T.typeVariable(), Quantifier.REQUIRED),
25917             ;
25918 
25919             final OnnxType type;
25920             final Quantifier quantifier;
25921 
25922             OutputParameter(OnnxType type, Quantifier quantifier) {
25923                 this.type = type;
25924                 this.quantifier = quantifier;
25925             }
25926 
25927             @Override
25928             public OnnxType type() {
25929                 return type;
25930             }
25931 
25932             @Override
25933             public Quantifier quantifier() {
25934                 return quantifier;
25935             }
25936         }
25937 
25938         public static final OnnxSchema SCHEMA = new OnnxSchemaRecord(
25939                 NAME,
25940                 List.of(Attribute.values()),
25941                 List.of(TypeConstraint.values()),
25942                 List.of(InputParameter.values()),
25943                 List.of(OutputParameter.values())
25944         );
25945 
25946         public Sin(ExternalizedOp def) {
25947             super(SCHEMA, def);
25948         }
25949 
25950         Sin(Sin that, CopyContext cc) {
25951             super(that, cc);
25952         }
25953 
25954         @Override
25955         public Sin transform(CopyContext cc, OpTransformer ot) {
25956             return new Sin(this, cc);
25957         }
25958 
25959         Sin(TypeElement resultType, Value input) {
25960             super(SCHEMA, resultType, Set.of(), List.of(input), List.of());
25961         }
25962 
25963         @Override
25964         public SequencedSet<OnnxParameter> onnxOutputs() {
25965             return onnxOutputs(SCHEMA);
25966         }
25967 
25968         @Override
25969         public SequencedMap<OnnxParameter, Object> onnxInputs() {
25970             return onnxInputs(SCHEMA, List.of(input()));
25971         }
25972 
25973         public Value input() {
25974             return operands().get(0);
25975         }
25976 
25977     }
25978 
25979     public static Sin Sin(TypeElement resultType, Value input) {
25980         return new Sin(resultType, input);
25981     }
25982 
25983     @OpFactoryHelper.OpDeclaration(Sinh.NAME)
25984     public static final class Sinh extends OnnxOp {
25985         public static final String NAME = "Sinh";
25986 
25987         public enum Attribute implements OnnxAttribute.None { }
25988 
25989         public enum TypeConstraint implements OnnxTypeConstraint {
25990             T(new OnnxType.TypeVariable("T", List.of(OnnxType.tensor(OnnxType.bfloat16()), OnnxType.tensor(OnnxType.float16()), OnnxType.tensor(OnnxType.float32()), OnnxType.tensor(OnnxType.float64())))),
25991             ;
25992 
25993             final OnnxType.TypeVariable typeVariable;
25994 
25995             TypeConstraint(OnnxType.TypeVariable typeVariable) {
25996                 assert typeVariable.name().equals(name());
25997                 this.typeVariable = typeVariable;
25998             }
25999 
26000             @Override
26001             public OnnxType.TypeVariable typeVariable() {
26002                 return typeVariable;
26003             }
26004         }
26005 
26006         public enum InputParameter implements OnnxParameter {
26007             input(TypeConstraint.T.typeVariable(), Quantifier.REQUIRED),
26008             ;
26009 
26010             final OnnxType type;
26011             final Quantifier quantifier;
26012 
26013             InputParameter(OnnxType type, Quantifier quantifier) {
26014                 this.type = type;
26015                 this.quantifier = quantifier;
26016             }
26017 
26018             @Override
26019             public OnnxType type() {
26020                 return type;
26021             }
26022 
26023             @Override
26024             public Quantifier quantifier() {
26025                 return quantifier;
26026             }
26027         }
26028 
26029         public enum OutputParameter implements OnnxParameter {
26030             output(TypeConstraint.T.typeVariable(), Quantifier.REQUIRED),
26031             ;
26032 
26033             final OnnxType type;
26034             final Quantifier quantifier;
26035 
26036             OutputParameter(OnnxType type, Quantifier quantifier) {
26037                 this.type = type;
26038                 this.quantifier = quantifier;
26039             }
26040 
26041             @Override
26042             public OnnxType type() {
26043                 return type;
26044             }
26045 
26046             @Override
26047             public Quantifier quantifier() {
26048                 return quantifier;
26049             }
26050         }
26051 
26052         public static final OnnxSchema SCHEMA = new OnnxSchemaRecord(
26053                 NAME,
26054                 List.of(Attribute.values()),
26055                 List.of(TypeConstraint.values()),
26056                 List.of(InputParameter.values()),
26057                 List.of(OutputParameter.values())
26058         );
26059 
26060         public Sinh(ExternalizedOp def) {
26061             super(SCHEMA, def);
26062         }
26063 
26064         Sinh(Sinh that, CopyContext cc) {
26065             super(that, cc);
26066         }
26067 
26068         @Override
26069         public Sinh transform(CopyContext cc, OpTransformer ot) {
26070             return new Sinh(this, cc);
26071         }
26072 
26073         Sinh(TypeElement resultType, Value input) {
26074             super(SCHEMA, resultType, Set.of(), List.of(input), List.of());
26075         }
26076 
26077         @Override
26078         public SequencedSet<OnnxParameter> onnxOutputs() {
26079             return onnxOutputs(SCHEMA);
26080         }
26081 
26082         @Override
26083         public SequencedMap<OnnxParameter, Object> onnxInputs() {
26084             return onnxInputs(SCHEMA, List.of(input()));
26085         }
26086 
26087         public Value input() {
26088             return operands().get(0);
26089         }
26090 
26091     }
26092 
26093     public static Sinh Sinh(TypeElement resultType, Value input) {
26094         return new Sinh(resultType, input);
26095     }
26096 
26097     @OpFactoryHelper.OpDeclaration(Size.NAME)
26098     public static final class Size extends OnnxOp {
26099         public static final String NAME = "Size";
26100 
26101         public enum Attribute implements OnnxAttribute.None { }
26102 
26103         public enum TypeConstraint implements OnnxTypeConstraint {
26104             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())))),
26105             T1(new OnnxType.TypeVariable("T1", List.of(OnnxType.tensor(OnnxType.int64())))),
26106             ;
26107 
26108             final OnnxType.TypeVariable typeVariable;
26109 
26110             TypeConstraint(OnnxType.TypeVariable typeVariable) {
26111                 assert typeVariable.name().equals(name());
26112                 this.typeVariable = typeVariable;
26113             }
26114 
26115             @Override
26116             public OnnxType.TypeVariable typeVariable() {
26117                 return typeVariable;
26118             }
26119         }
26120 
26121         public enum InputParameter implements OnnxParameter {
26122             data(TypeConstraint.T.typeVariable(), Quantifier.REQUIRED),
26123             ;
26124 
26125             final OnnxType type;
26126             final Quantifier quantifier;
26127 
26128             InputParameter(OnnxType type, Quantifier quantifier) {
26129                 this.type = type;
26130                 this.quantifier = quantifier;
26131             }
26132 
26133             @Override
26134             public OnnxType type() {
26135                 return type;
26136             }
26137 
26138             @Override
26139             public Quantifier quantifier() {
26140                 return quantifier;
26141             }
26142         }
26143 
26144         public enum OutputParameter implements OnnxParameter {
26145             size(TypeConstraint.T1.typeVariable(), Quantifier.REQUIRED),
26146             ;
26147 
26148             final OnnxType type;
26149             final Quantifier quantifier;
26150 
26151             OutputParameter(OnnxType type, Quantifier quantifier) {
26152                 this.type = type;
26153                 this.quantifier = quantifier;
26154             }
26155 
26156             @Override
26157             public OnnxType type() {
26158                 return type;
26159             }
26160 
26161             @Override
26162             public Quantifier quantifier() {
26163                 return quantifier;
26164             }
26165         }
26166 
26167         public static final OnnxSchema SCHEMA = new OnnxSchemaRecord(
26168                 NAME,
26169                 List.of(Attribute.values()),
26170                 List.of(TypeConstraint.values()),
26171                 List.of(InputParameter.values()),
26172                 List.of(OutputParameter.values())
26173         );
26174 
26175         public Size(ExternalizedOp def) {
26176             super(SCHEMA, def);
26177         }
26178 
26179         Size(Size that, CopyContext cc) {
26180             super(that, cc);
26181         }
26182 
26183         @Override
26184         public Size transform(CopyContext cc, OpTransformer ot) {
26185             return new Size(this, cc);
26186         }
26187 
26188         Size(TypeElement resultType, Value data) {
26189             super(SCHEMA, resultType, Set.of(), List.of(data), List.of());
26190         }
26191 
26192         @Override
26193         public SequencedSet<OnnxParameter> onnxOutputs() {
26194             return onnxOutputs(SCHEMA);
26195         }
26196 
26197         @Override
26198         public SequencedMap<OnnxParameter, Object> onnxInputs() {
26199             return onnxInputs(SCHEMA, List.of(data()));
26200         }
26201 
26202         public Value data() {
26203             return operands().get(0);
26204         }
26205 
26206     }
26207 
26208     public static Size Size(TypeElement resultType, Value data) {
26209         return new Size(resultType, data);
26210     }
26211 
26212     @OpFactoryHelper.OpDeclaration(Slice.NAME)
26213     public static final class Slice extends OnnxOp {
26214         public static final String NAME = "Slice";
26215 
26216         public enum Attribute implements OnnxAttribute.None { }
26217 
26218         public enum TypeConstraint implements OnnxTypeConstraint {
26219             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())))),
26220             Tind(new OnnxType.TypeVariable("Tind", List.of(OnnxType.tensor(OnnxType.int32()), OnnxType.tensor(OnnxType.int64())))),
26221             ;
26222 
26223             final OnnxType.TypeVariable typeVariable;
26224 
26225             TypeConstraint(OnnxType.TypeVariable typeVariable) {
26226                 assert typeVariable.name().equals(name());
26227                 this.typeVariable = typeVariable;
26228             }
26229 
26230             @Override
26231             public OnnxType.TypeVariable typeVariable() {
26232                 return typeVariable;
26233             }
26234         }
26235 
26236         public enum InputParameter implements OnnxParameter {
26237             data(TypeConstraint.T.typeVariable(), Quantifier.REQUIRED),
26238             starts(TypeConstraint.Tind.typeVariable(), Quantifier.REQUIRED),
26239             ends(TypeConstraint.Tind.typeVariable(), Quantifier.REQUIRED),
26240             axes(TypeConstraint.Tind.typeVariable(), Quantifier.OPTIONAL),
26241             steps(TypeConstraint.Tind.typeVariable(), Quantifier.OPTIONAL),
26242             ;
26243 
26244             final OnnxType type;
26245             final Quantifier quantifier;
26246 
26247             InputParameter(OnnxType type, Quantifier quantifier) {
26248                 this.type = type;
26249                 this.quantifier = quantifier;
26250             }
26251 
26252             @Override
26253             public OnnxType type() {
26254                 return type;
26255             }
26256 
26257             @Override
26258             public Quantifier quantifier() {
26259                 return quantifier;
26260             }
26261         }
26262 
26263         public enum OutputParameter implements OnnxParameter {
26264             output(TypeConstraint.T.typeVariable(), Quantifier.REQUIRED),
26265             ;
26266 
26267             final OnnxType type;
26268             final Quantifier quantifier;
26269 
26270             OutputParameter(OnnxType type, Quantifier quantifier) {
26271                 this.type = type;
26272                 this.quantifier = quantifier;
26273             }
26274 
26275             @Override
26276             public OnnxType type() {
26277                 return type;
26278             }
26279 
26280             @Override
26281             public Quantifier quantifier() {
26282                 return quantifier;
26283             }
26284         }
26285 
26286         public static final OnnxSchema SCHEMA = new OnnxSchemaRecord(
26287                 NAME,
26288                 List.of(Attribute.values()),
26289                 List.of(TypeConstraint.values()),
26290                 List.of(InputParameter.values()),
26291                 List.of(OutputParameter.values())
26292         );
26293 
26294         public Slice(ExternalizedOp def) {
26295             super(SCHEMA, def);
26296         }
26297 
26298         Slice(Slice that, CopyContext cc) {
26299             super(that, cc);
26300         }
26301 
26302         @Override
26303         public Slice transform(CopyContext cc, OpTransformer ot) {
26304             return new Slice(this, cc);
26305         }
26306 
26307         Slice(TypeElement resultType, Value data, Value starts, Value ends, java.util.Optional<Value> axes, java.util.Optional<Value> steps) {
26308             super(SCHEMA, resultType, Set.of(), List.of(data, starts, ends, axes, steps), List.of());
26309         }
26310 
26311         @Override
26312         public SequencedSet<OnnxParameter> onnxOutputs() {
26313             return onnxOutputs(SCHEMA);
26314         }
26315 
26316         @Override
26317         public SequencedMap<OnnxParameter, Object> onnxInputs() {
26318             return onnxInputs(SCHEMA, List.of(data(), starts(), ends(), axes(), steps()));
26319         }
26320 
26321         public Value data() {
26322             return operands().get(0);
26323         }
26324 
26325         public Value starts() {
26326             return operands().get(1);
26327         }
26328 
26329         public Value ends() {
26330             return operands().get(2);
26331         }
26332 
26333         public java.util.Optional<Value> axes() {
26334             int i = optionalInputArguments.indexOf(InputParameter.axes);
26335             return i != -1 ? java.util.Optional.of(operands().get(3 + i)) : java.util.Optional.empty();
26336         }
26337 
26338         public java.util.Optional<Value> steps() {
26339             int i = optionalInputArguments.indexOf(InputParameter.steps);
26340             return i != -1 ? java.util.Optional.of(operands().get(3 + i)) : java.util.Optional.empty();
26341         }
26342 
26343     }
26344 
26345     public static Slice Slice(TypeElement resultType, Value data, Value starts, Value ends, java.util.Optional<Value> axes, java.util.Optional<Value> steps) {
26346         return new Slice(resultType, data, starts, ends, axes, steps);
26347     }
26348 
26349     @OpFactoryHelper.OpDeclaration(Softmax.NAME)
26350     public static final class Softmax extends OnnxOp {
26351         public static final String NAME = "Softmax";
26352 
26353         public enum Attribute implements OnnxAttribute {
26354             axis(Long.class, true, -1),
26355             ;
26356 
26357                 final Class<?> t;
26358                 final boolean optional;
26359                 final Object defaultValue;
26360 
26361                 Attribute(Class<?> type, boolean optional, Object defaultValue) {
26362                     this.t = type;
26363                     this.optional = optional;
26364                     this.defaultValue = defaultValue;
26365                     assert optional || defaultValue == null;
26366                 }
26367 
26368                 public Class<?> type() {
26369                     return t;
26370                 }
26371 
26372                 public boolean isOptional() {
26373                     return optional;
26374                 }
26375 
26376                 public Object defaultValue() {
26377                     return defaultValue;
26378                 }
26379         }
26380 
26381         public enum TypeConstraint implements OnnxTypeConstraint {
26382             T(new OnnxType.TypeVariable("T", List.of(OnnxType.tensor(OnnxType.float16()), OnnxType.tensor(OnnxType.float32()), OnnxType.tensor(OnnxType.float64()), OnnxType.tensor(OnnxType.bfloat16())))),
26383             ;
26384 
26385             final OnnxType.TypeVariable typeVariable;
26386 
26387             TypeConstraint(OnnxType.TypeVariable typeVariable) {
26388                 assert typeVariable.name().equals(name());
26389                 this.typeVariable = typeVariable;
26390             }
26391 
26392             @Override
26393             public OnnxType.TypeVariable typeVariable() {
26394                 return typeVariable;
26395             }
26396         }
26397 
26398         public enum InputParameter implements OnnxParameter {
26399             input(TypeConstraint.T.typeVariable(), Quantifier.REQUIRED),
26400             ;
26401 
26402             final OnnxType type;
26403             final Quantifier quantifier;
26404 
26405             InputParameter(OnnxType type, Quantifier quantifier) {
26406                 this.type = type;
26407                 this.quantifier = quantifier;
26408             }
26409 
26410             @Override
26411             public OnnxType type() {
26412                 return type;
26413             }
26414 
26415             @Override
26416             public Quantifier quantifier() {
26417                 return quantifier;
26418             }
26419         }
26420 
26421         public enum OutputParameter implements OnnxParameter {
26422             output(TypeConstraint.T.typeVariable(), Quantifier.REQUIRED),
26423             ;
26424 
26425             final OnnxType type;
26426             final Quantifier quantifier;
26427 
26428             OutputParameter(OnnxType type, Quantifier quantifier) {
26429                 this.type = type;
26430                 this.quantifier = quantifier;
26431             }
26432 
26433             @Override
26434             public OnnxType type() {
26435                 return type;
26436             }
26437 
26438             @Override
26439             public Quantifier quantifier() {
26440                 return quantifier;
26441             }
26442         }
26443 
26444         public static final OnnxSchema SCHEMA = new OnnxSchemaRecord(
26445                 NAME,
26446                 List.of(Attribute.values()),
26447                 List.of(TypeConstraint.values()),
26448                 List.of(InputParameter.values()),
26449                 List.of(OutputParameter.values())
26450         );
26451 
26452         public Softmax(ExternalizedOp def) {
26453             super(SCHEMA, def);
26454         }
26455 
26456         Softmax(Softmax that, CopyContext cc) {
26457             super(that, cc);
26458         }
26459 
26460         @Override
26461         public Softmax transform(CopyContext cc, OpTransformer ot) {
26462             return new Softmax(this, cc);
26463         }
26464 
26465         Softmax(TypeElement resultType, Value input, java.util.Optional<Long> axis) {
26466             super(SCHEMA, resultType, Set.of(), List.of(input), List.of(axis));
26467         }
26468 
26469         @Override
26470         public SequencedSet<OnnxParameter> onnxOutputs() {
26471             return onnxOutputs(SCHEMA);
26472         }
26473 
26474         @Override
26475         public SequencedMap<OnnxParameter, Object> onnxInputs() {
26476             return onnxInputs(SCHEMA, List.of(input()));
26477         }
26478 
26479         public Value input() {
26480             return operands().get(0);
26481         }
26482 
26483         public java.util.Optional<Long> axis() {
26484             Long axis = Attribute.axis.access(Long.class, onnxAttributes);
26485             return java.util.Optional.ofNullable(axis);
26486         }
26487 
26488     }
26489 
26490     public static Softmax Softmax(TypeElement resultType, Value input, java.util.Optional<Long> axis) {
26491         return new Softmax(resultType, input, axis);
26492     }
26493 
26494     @OpFactoryHelper.OpDeclaration(SoftmaxCrossEntropyLoss.NAME)
26495     public static final class SoftmaxCrossEntropyLoss extends OnnxOp {
26496         public static final String NAME = "SoftmaxCrossEntropyLoss";
26497 
26498         public enum Attribute implements OnnxAttribute {
26499             ignore_index(Long.class, true, null),
26500             reduction(String.class, true, "mean"),
26501             ;
26502 
26503                 final Class<?> t;
26504                 final boolean optional;
26505                 final Object defaultValue;
26506 
26507                 Attribute(Class<?> type, boolean optional, Object defaultValue) {
26508                     this.t = type;
26509                     this.optional = optional;
26510                     this.defaultValue = defaultValue;
26511                     assert optional || defaultValue == null;
26512                 }
26513 
26514                 public Class<?> type() {
26515                     return t;
26516                 }
26517 
26518                 public boolean isOptional() {
26519                     return optional;
26520                 }
26521 
26522                 public Object defaultValue() {
26523                     return defaultValue;
26524                 }
26525         }
26526 
26527         public enum TypeConstraint implements OnnxTypeConstraint {
26528             T(new OnnxType.TypeVariable("T", List.of(OnnxType.tensor(OnnxType.float16()), OnnxType.tensor(OnnxType.float32()), OnnxType.tensor(OnnxType.float64()), OnnxType.tensor(OnnxType.bfloat16())))),
26529             Tind(new OnnxType.TypeVariable("Tind", List.of(OnnxType.tensor(OnnxType.int32()), OnnxType.tensor(OnnxType.int64())))),
26530             ;
26531 
26532             final OnnxType.TypeVariable typeVariable;
26533 
26534             TypeConstraint(OnnxType.TypeVariable typeVariable) {
26535                 assert typeVariable.name().equals(name());
26536                 this.typeVariable = typeVariable;
26537             }
26538 
26539             @Override
26540             public OnnxType.TypeVariable typeVariable() {
26541                 return typeVariable;
26542             }
26543         }
26544 
26545         public enum InputParameter implements OnnxParameter {
26546             scores(TypeConstraint.T.typeVariable(), Quantifier.REQUIRED),
26547             labels(TypeConstraint.Tind.typeVariable(), Quantifier.REQUIRED),
26548             weights(TypeConstraint.T.typeVariable(), Quantifier.OPTIONAL),
26549             ;
26550 
26551             final OnnxType type;
26552             final Quantifier quantifier;
26553 
26554             InputParameter(OnnxType type, Quantifier quantifier) {
26555                 this.type = type;
26556                 this.quantifier = quantifier;
26557             }
26558 
26559             @Override
26560             public OnnxType type() {
26561                 return type;
26562             }
26563 
26564             @Override
26565             public Quantifier quantifier() {
26566                 return quantifier;
26567             }
26568         }
26569 
26570         public enum OutputParameter implements OnnxParameter {
26571             output(TypeConstraint.T.typeVariable(), Quantifier.REQUIRED),
26572             log_prob(TypeConstraint.T.typeVariable(), Quantifier.OPTIONAL),
26573             ;
26574 
26575             final OnnxType type;
26576             final Quantifier quantifier;
26577 
26578             OutputParameter(OnnxType type, Quantifier quantifier) {
26579                 this.type = type;
26580                 this.quantifier = quantifier;
26581             }
26582 
26583             @Override
26584             public OnnxType type() {
26585                 return type;
26586             }
26587 
26588             @Override
26589             public Quantifier quantifier() {
26590                 return quantifier;
26591             }
26592         }
26593 
26594         public static final OnnxSchema SCHEMA = new OnnxSchemaRecord(
26595                 NAME,
26596                 List.of(Attribute.values()),
26597                 List.of(TypeConstraint.values()),
26598                 List.of(InputParameter.values()),
26599                 List.of(OutputParameter.values())
26600         );
26601 
26602         public SoftmaxCrossEntropyLoss(ExternalizedOp def) {
26603             super(SCHEMA, def);
26604         }
26605 
26606         SoftmaxCrossEntropyLoss(SoftmaxCrossEntropyLoss that, CopyContext cc) {
26607             super(that, cc);
26608         }
26609 
26610         @Override
26611         public SoftmaxCrossEntropyLoss transform(CopyContext cc, OpTransformer ot) {
26612             return new SoftmaxCrossEntropyLoss(this, cc);
26613         }
26614 
26615         SoftmaxCrossEntropyLoss(TypeElement resultType, Set<OutputParameter> optionalOutputs, Value scores, Value labels, java.util.Optional<Value> weights, java.util.Optional<Long> ignore_index, java.util.Optional<String> reduction) {
26616             super(SCHEMA, resultType, optionalOutputs, List.of(scores, labels, weights), List.of(ignore_index, reduction));
26617         }
26618 
26619         @Override
26620         public SequencedSet<OnnxParameter> onnxOutputs() {
26621             return onnxOutputs(SCHEMA);
26622         }
26623 
26624         @Override
26625         public SequencedMap<OnnxParameter, Object> onnxInputs() {
26626             return onnxInputs(SCHEMA, List.of(scores(), labels(), weights()));
26627         }
26628 
26629         public Value scores() {
26630             return operands().get(0);
26631         }
26632 
26633         public Value labels() {
26634             return operands().get(1);
26635         }
26636 
26637         public java.util.Optional<Value> weights() {
26638             int i = optionalInputArguments.indexOf(InputParameter.weights);
26639             return i != -1 ? java.util.Optional.of(operands().get(2 + i)) : java.util.Optional.empty();
26640         }
26641 
26642         public java.util.Optional<Long> ignore_index() {
26643             Long ignore_index = Attribute.ignore_index.access(Long.class, onnxAttributes);
26644             return java.util.Optional.ofNullable(ignore_index);
26645         }
26646 
26647         public java.util.Optional<String> reduction() {
26648             String reduction = Attribute.reduction.access(String.class, onnxAttributes);
26649             return java.util.Optional.ofNullable(reduction);
26650         }
26651 
26652     }
26653 
26654     public static SoftmaxCrossEntropyLoss SoftmaxCrossEntropyLoss(TypeElement resultType, Set<SoftmaxCrossEntropyLoss.OutputParameter> optionalOutputs, Value scores, Value labels, java.util.Optional<Value> weights, java.util.Optional<Long> ignore_index, java.util.Optional<String> reduction) {
26655         return new SoftmaxCrossEntropyLoss(resultType, optionalOutputs, scores, labels, weights, ignore_index, reduction);
26656     }
26657 
26658     @OpFactoryHelper.OpDeclaration(Softplus.NAME)
26659     public static final class Softplus extends OnnxOp {
26660         public static final String NAME = "Softplus";
26661 
26662         public enum Attribute implements OnnxAttribute.None { }
26663 
26664         public enum TypeConstraint implements OnnxTypeConstraint {
26665             T(new OnnxType.TypeVariable("T", List.of(OnnxType.tensor(OnnxType.bfloat16()), OnnxType.tensor(OnnxType.float16()), OnnxType.tensor(OnnxType.float32()), OnnxType.tensor(OnnxType.float64())))),
26666             ;
26667 
26668             final OnnxType.TypeVariable typeVariable;
26669 
26670             TypeConstraint(OnnxType.TypeVariable typeVariable) {
26671                 assert typeVariable.name().equals(name());
26672                 this.typeVariable = typeVariable;
26673             }
26674 
26675             @Override
26676             public OnnxType.TypeVariable typeVariable() {
26677                 return typeVariable;
26678             }
26679         }
26680 
26681         public enum InputParameter implements OnnxParameter {
26682             X(TypeConstraint.T.typeVariable(), Quantifier.REQUIRED),
26683             ;
26684 
26685             final OnnxType type;
26686             final Quantifier quantifier;
26687 
26688             InputParameter(OnnxType type, Quantifier quantifier) {
26689                 this.type = type;
26690                 this.quantifier = quantifier;
26691             }
26692 
26693             @Override
26694             public OnnxType type() {
26695                 return type;
26696             }
26697 
26698             @Override
26699             public Quantifier quantifier() {
26700                 return quantifier;
26701             }
26702         }
26703 
26704         public enum OutputParameter implements OnnxParameter {
26705             Y(TypeConstraint.T.typeVariable(), Quantifier.REQUIRED),
26706             ;
26707 
26708             final OnnxType type;
26709             final Quantifier quantifier;
26710 
26711             OutputParameter(OnnxType type, Quantifier quantifier) {
26712                 this.type = type;
26713                 this.quantifier = quantifier;
26714             }
26715 
26716             @Override
26717             public OnnxType type() {
26718                 return type;
26719             }
26720 
26721             @Override
26722             public Quantifier quantifier() {
26723                 return quantifier;
26724             }
26725         }
26726 
26727         public static final OnnxSchema SCHEMA = new OnnxSchemaRecord(
26728                 NAME,
26729                 List.of(Attribute.values()),
26730                 List.of(TypeConstraint.values()),
26731                 List.of(InputParameter.values()),
26732                 List.of(OutputParameter.values())
26733         );
26734 
26735         public Softplus(ExternalizedOp def) {
26736             super(SCHEMA, def);
26737         }
26738 
26739         Softplus(Softplus that, CopyContext cc) {
26740             super(that, cc);
26741         }
26742 
26743         @Override
26744         public Softplus transform(CopyContext cc, OpTransformer ot) {
26745             return new Softplus(this, cc);
26746         }
26747 
26748         Softplus(TypeElement resultType, Value X) {
26749             super(SCHEMA, resultType, Set.of(), List.of(X), List.of());
26750         }
26751 
26752         @Override
26753         public SequencedSet<OnnxParameter> onnxOutputs() {
26754             return onnxOutputs(SCHEMA);
26755         }
26756 
26757         @Override
26758         public SequencedMap<OnnxParameter, Object> onnxInputs() {
26759             return onnxInputs(SCHEMA, List.of(X()));
26760         }
26761 
26762         public Value X() {
26763             return operands().get(0);
26764         }
26765 
26766     }
26767 
26768     public static Softplus Softplus(TypeElement resultType, Value X) {
26769         return new Softplus(resultType, X);
26770     }
26771 
26772     @OpFactoryHelper.OpDeclaration(Softsign.NAME)
26773     public static final class Softsign extends OnnxOp {
26774         public static final String NAME = "Softsign";
26775 
26776         public enum Attribute implements OnnxAttribute.None { }
26777 
26778         public enum TypeConstraint implements OnnxTypeConstraint {
26779             T(new OnnxType.TypeVariable("T", List.of(OnnxType.tensor(OnnxType.bfloat16()), OnnxType.tensor(OnnxType.float16()), OnnxType.tensor(OnnxType.float32()), OnnxType.tensor(OnnxType.float64())))),
26780             ;
26781 
26782             final OnnxType.TypeVariable typeVariable;
26783 
26784             TypeConstraint(OnnxType.TypeVariable typeVariable) {
26785                 assert typeVariable.name().equals(name());
26786                 this.typeVariable = typeVariable;
26787             }
26788 
26789             @Override
26790             public OnnxType.TypeVariable typeVariable() {
26791                 return typeVariable;
26792             }
26793         }
26794 
26795         public enum InputParameter implements OnnxParameter {
26796             input(TypeConstraint.T.typeVariable(), Quantifier.REQUIRED),
26797             ;
26798 
26799             final OnnxType type;
26800             final Quantifier quantifier;
26801 
26802             InputParameter(OnnxType type, Quantifier quantifier) {
26803                 this.type = type;
26804                 this.quantifier = quantifier;
26805             }
26806 
26807             @Override
26808             public OnnxType type() {
26809                 return type;
26810             }
26811 
26812             @Override
26813             public Quantifier quantifier() {
26814                 return quantifier;
26815             }
26816         }
26817 
26818         public enum OutputParameter implements OnnxParameter {
26819             output(TypeConstraint.T.typeVariable(), Quantifier.REQUIRED),
26820             ;
26821 
26822             final OnnxType type;
26823             final Quantifier quantifier;
26824 
26825             OutputParameter(OnnxType type, Quantifier quantifier) {
26826                 this.type = type;
26827                 this.quantifier = quantifier;
26828             }
26829 
26830             @Override
26831             public OnnxType type() {
26832                 return type;
26833             }
26834 
26835             @Override
26836             public Quantifier quantifier() {
26837                 return quantifier;
26838             }
26839         }
26840 
26841         public static final OnnxSchema SCHEMA = new OnnxSchemaRecord(
26842                 NAME,
26843                 List.of(Attribute.values()),
26844                 List.of(TypeConstraint.values()),
26845                 List.of(InputParameter.values()),
26846                 List.of(OutputParameter.values())
26847         );
26848 
26849         public Softsign(ExternalizedOp def) {
26850             super(SCHEMA, def);
26851         }
26852 
26853         Softsign(Softsign that, CopyContext cc) {
26854             super(that, cc);
26855         }
26856 
26857         @Override
26858         public Softsign transform(CopyContext cc, OpTransformer ot) {
26859             return new Softsign(this, cc);
26860         }
26861 
26862         Softsign(TypeElement resultType, Value input) {
26863             super(SCHEMA, resultType, Set.of(), List.of(input), List.of());
26864         }
26865 
26866         @Override
26867         public SequencedSet<OnnxParameter> onnxOutputs() {
26868             return onnxOutputs(SCHEMA);
26869         }
26870 
26871         @Override
26872         public SequencedMap<OnnxParameter, Object> onnxInputs() {
26873             return onnxInputs(SCHEMA, List.of(input()));
26874         }
26875 
26876         public Value input() {
26877             return operands().get(0);
26878         }
26879 
26880     }
26881 
26882     public static Softsign Softsign(TypeElement resultType, Value input) {
26883         return new Softsign(resultType, input);
26884     }
26885 
26886     @OpFactoryHelper.OpDeclaration(SpaceToDepth.NAME)
26887     public static final class SpaceToDepth extends OnnxOp {
26888         public static final String NAME = "SpaceToDepth";
26889 
26890         public enum Attribute implements OnnxAttribute {
26891             blocksize(Long.class, false, null),
26892             ;
26893 
26894                 final Class<?> t;
26895                 final boolean optional;
26896                 final Object defaultValue;
26897 
26898                 Attribute(Class<?> type, boolean optional, Object defaultValue) {
26899                     this.t = type;
26900                     this.optional = optional;
26901                     this.defaultValue = defaultValue;
26902                     assert optional || defaultValue == null;
26903                 }
26904 
26905                 public Class<?> type() {
26906                     return t;
26907                 }
26908 
26909                 public boolean isOptional() {
26910                     return optional;
26911                 }
26912 
26913                 public Object defaultValue() {
26914                     return defaultValue;
26915                 }
26916         }
26917 
26918         public enum TypeConstraint implements OnnxTypeConstraint {
26919             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())))),
26920             ;
26921 
26922             final OnnxType.TypeVariable typeVariable;
26923 
26924             TypeConstraint(OnnxType.TypeVariable typeVariable) {
26925                 assert typeVariable.name().equals(name());
26926                 this.typeVariable = typeVariable;
26927             }
26928 
26929             @Override
26930             public OnnxType.TypeVariable typeVariable() {
26931                 return typeVariable;
26932             }
26933         }
26934 
26935         public enum InputParameter implements OnnxParameter {
26936             input(TypeConstraint.T.typeVariable(), Quantifier.REQUIRED),
26937             ;
26938 
26939             final OnnxType type;
26940             final Quantifier quantifier;
26941 
26942             InputParameter(OnnxType type, Quantifier quantifier) {
26943                 this.type = type;
26944                 this.quantifier = quantifier;
26945             }
26946 
26947             @Override
26948             public OnnxType type() {
26949                 return type;
26950             }
26951 
26952             @Override
26953             public Quantifier quantifier() {
26954                 return quantifier;
26955             }
26956         }
26957 
26958         public enum OutputParameter implements OnnxParameter {
26959             output(TypeConstraint.T.typeVariable(), Quantifier.REQUIRED),
26960             ;
26961 
26962             final OnnxType type;
26963             final Quantifier quantifier;
26964 
26965             OutputParameter(OnnxType type, Quantifier quantifier) {
26966                 this.type = type;
26967                 this.quantifier = quantifier;
26968             }
26969 
26970             @Override
26971             public OnnxType type() {
26972                 return type;
26973             }
26974 
26975             @Override
26976             public Quantifier quantifier() {
26977                 return quantifier;
26978             }
26979         }
26980 
26981         public static final OnnxSchema SCHEMA = new OnnxSchemaRecord(
26982                 NAME,
26983                 List.of(Attribute.values()),
26984                 List.of(TypeConstraint.values()),
26985                 List.of(InputParameter.values()),
26986                 List.of(OutputParameter.values())
26987         );
26988 
26989         public SpaceToDepth(ExternalizedOp def) {
26990             super(SCHEMA, def);
26991         }
26992 
26993         SpaceToDepth(SpaceToDepth that, CopyContext cc) {
26994             super(that, cc);
26995         }
26996 
26997         @Override
26998         public SpaceToDepth transform(CopyContext cc, OpTransformer ot) {
26999             return new SpaceToDepth(this, cc);
27000         }
27001 
27002         SpaceToDepth(TypeElement resultType, Value input, long blocksize) {
27003             super(SCHEMA, resultType, Set.of(), List.of(input), List.of(blocksize));
27004         }
27005 
27006         @Override
27007         public SequencedSet<OnnxParameter> onnxOutputs() {
27008             return onnxOutputs(SCHEMA);
27009         }
27010 
27011         @Override
27012         public SequencedMap<OnnxParameter, Object> onnxInputs() {
27013             return onnxInputs(SCHEMA, List.of(input()));
27014         }
27015 
27016         public Value input() {
27017             return operands().get(0);
27018         }
27019 
27020         public long blocksize() {
27021             long blocksize = Attribute.blocksize.access(Long.class, onnxAttributes);
27022             return blocksize;
27023         }
27024 
27025     }
27026 
27027     public static SpaceToDepth SpaceToDepth(TypeElement resultType, Value input, long blocksize) {
27028         return new SpaceToDepth(resultType, input, blocksize);
27029     }
27030 
27031     @OpFactoryHelper.OpDeclaration(Split.NAME)
27032     public static final class Split extends OnnxOp {
27033         public static final String NAME = "Split";
27034 
27035         public enum Attribute implements OnnxAttribute {
27036             num_outputs(Long.class, true, null),
27037             axis(Long.class, true, 0),
27038             ;
27039 
27040                 final Class<?> t;
27041                 final boolean optional;
27042                 final Object defaultValue;
27043 
27044                 Attribute(Class<?> type, boolean optional, Object defaultValue) {
27045                     this.t = type;
27046                     this.optional = optional;
27047                     this.defaultValue = defaultValue;
27048                     assert optional || defaultValue == null;
27049                 }
27050 
27051                 public Class<?> type() {
27052                     return t;
27053                 }
27054 
27055                 public boolean isOptional() {
27056                     return optional;
27057                 }
27058 
27059                 public Object defaultValue() {
27060                     return defaultValue;
27061                 }
27062         }
27063 
27064         public enum TypeConstraint implements OnnxTypeConstraint {
27065             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())))),
27066             ;
27067 
27068             final OnnxType.TypeVariable typeVariable;
27069 
27070             TypeConstraint(OnnxType.TypeVariable typeVariable) {
27071                 assert typeVariable.name().equals(name());
27072                 this.typeVariable = typeVariable;
27073             }
27074 
27075             @Override
27076             public OnnxType.TypeVariable typeVariable() {
27077                 return typeVariable;
27078             }
27079         }
27080 
27081         public enum InputParameter implements OnnxParameter {
27082             input(TypeConstraint.T.typeVariable(), Quantifier.REQUIRED),
27083             split(OnnxType.tensor(OnnxType.int64()), Quantifier.OPTIONAL),
27084             ;
27085 
27086             final OnnxType type;
27087             final Quantifier quantifier;
27088 
27089             InputParameter(OnnxType type, Quantifier quantifier) {
27090                 this.type = type;
27091                 this.quantifier = quantifier;
27092             }
27093 
27094             @Override
27095             public OnnxType type() {
27096                 return type;
27097             }
27098 
27099             @Override
27100             public Quantifier quantifier() {
27101                 return quantifier;
27102             }
27103         }
27104 
27105         public enum OutputParameter implements OnnxParameter {
27106             outputs(TypeConstraint.T.typeVariable(), Quantifier.VARIADIC),
27107             ;
27108 
27109             final OnnxType type;
27110             final Quantifier quantifier;
27111 
27112             OutputParameter(OnnxType type, Quantifier quantifier) {
27113                 this.type = type;
27114                 this.quantifier = quantifier;
27115             }
27116 
27117             @Override
27118             public OnnxType type() {
27119                 return type;
27120             }
27121 
27122             @Override
27123             public Quantifier quantifier() {
27124                 return quantifier;
27125             }
27126         }
27127 
27128         public static final OnnxSchema SCHEMA = new OnnxSchemaRecord(
27129                 NAME,
27130                 List.of(Attribute.values()),
27131                 List.of(TypeConstraint.values()),
27132                 List.of(InputParameter.values()),
27133                 List.of(OutputParameter.values())
27134         );
27135 
27136         public Split(ExternalizedOp def) {
27137             super(SCHEMA, def);
27138         }
27139 
27140         Split(Split that, CopyContext cc) {
27141             super(that, cc);
27142         }
27143 
27144         @Override
27145         public Split transform(CopyContext cc, OpTransformer ot) {
27146             return new Split(this, cc);
27147         }
27148 
27149         Split(TypeElement resultType, Value input, java.util.Optional<Value> split, java.util.Optional<Long> num_outputs, java.util.Optional<Long> axis) {
27150             super(SCHEMA, resultType, Set.of(), List.of(input, split), List.of(num_outputs, axis));
27151         }
27152 
27153         @Override
27154         public SequencedSet<OnnxParameter> onnxOutputs() {
27155             return onnxOutputs(SCHEMA);
27156         }
27157 
27158         @Override
27159         public SequencedMap<OnnxParameter, Object> onnxInputs() {
27160             return onnxInputs(SCHEMA, List.of(input(), split()));
27161         }
27162 
27163         public Value input() {
27164             return operands().get(0);
27165         }
27166 
27167         public java.util.Optional<Value> split() {
27168             int i = optionalInputArguments.indexOf(InputParameter.split);
27169             return i != -1 ? java.util.Optional.of(operands().get(1 + i)) : java.util.Optional.empty();
27170         }
27171 
27172         public java.util.Optional<Long> num_outputs() {
27173             Long num_outputs = Attribute.num_outputs.access(Long.class, onnxAttributes);
27174             return java.util.Optional.ofNullable(num_outputs);
27175         }
27176 
27177         public java.util.Optional<Long> axis() {
27178             Long axis = Attribute.axis.access(Long.class, onnxAttributes);
27179             return java.util.Optional.ofNullable(axis);
27180         }
27181 
27182     }
27183 
27184     public static Split Split(TypeElement resultType, Value input, java.util.Optional<Value> split, java.util.Optional<Long> num_outputs, java.util.Optional<Long> axis) {
27185         return new Split(resultType, input, split, num_outputs, axis);
27186     }
27187 
27188     @OpFactoryHelper.OpDeclaration(SplitToSequence.NAME)
27189     public static final class SplitToSequence extends OnnxOp {
27190         public static final String NAME = "SplitToSequence";
27191 
27192         public enum Attribute implements OnnxAttribute {
27193             keepdims(Long.class, true, 1),
27194             axis(Long.class, true, 0),
27195             ;
27196 
27197                 final Class<?> t;
27198                 final boolean optional;
27199                 final Object defaultValue;
27200 
27201                 Attribute(Class<?> type, boolean optional, Object defaultValue) {
27202                     this.t = type;
27203                     this.optional = optional;
27204                     this.defaultValue = defaultValue;
27205                     assert optional || defaultValue == null;
27206                 }
27207 
27208                 public Class<?> type() {
27209                     return t;
27210                 }
27211 
27212                 public boolean isOptional() {
27213                     return optional;
27214                 }
27215 
27216                 public Object defaultValue() {
27217                     return defaultValue;
27218                 }
27219         }
27220 
27221         public enum TypeConstraint implements OnnxTypeConstraint {
27222             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())))),
27223             I(new OnnxType.TypeVariable("I", List.of(OnnxType.tensor(OnnxType.int32()), OnnxType.tensor(OnnxType.int64())))),
27224             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()))))),
27225             ;
27226 
27227             final OnnxType.TypeVariable typeVariable;
27228 
27229             TypeConstraint(OnnxType.TypeVariable typeVariable) {
27230                 assert typeVariable.name().equals(name());
27231                 this.typeVariable = typeVariable;
27232             }
27233 
27234             @Override
27235             public OnnxType.TypeVariable typeVariable() {
27236                 return typeVariable;
27237             }
27238         }
27239 
27240         public enum InputParameter implements OnnxParameter {
27241             input(TypeConstraint.T.typeVariable(), Quantifier.REQUIRED),
27242             split(TypeConstraint.I.typeVariable(), Quantifier.OPTIONAL),
27243             ;
27244 
27245             final OnnxType type;
27246             final Quantifier quantifier;
27247 
27248             InputParameter(OnnxType type, Quantifier quantifier) {
27249                 this.type = type;
27250                 this.quantifier = quantifier;
27251             }
27252 
27253             @Override
27254             public OnnxType type() {
27255                 return type;
27256             }
27257 
27258             @Override
27259             public Quantifier quantifier() {
27260                 return quantifier;
27261             }
27262         }
27263 
27264         public enum OutputParameter implements OnnxParameter {
27265             output_sequence(TypeConstraint.S.typeVariable(), Quantifier.REQUIRED),
27266             ;
27267 
27268             final OnnxType type;
27269             final Quantifier quantifier;
27270 
27271             OutputParameter(OnnxType type, Quantifier quantifier) {
27272                 this.type = type;
27273                 this.quantifier = quantifier;
27274             }
27275 
27276             @Override
27277             public OnnxType type() {
27278                 return type;
27279             }
27280 
27281             @Override
27282             public Quantifier quantifier() {
27283                 return quantifier;
27284             }
27285         }
27286 
27287         public static final OnnxSchema SCHEMA = new OnnxSchemaRecord(
27288                 NAME,
27289                 List.of(Attribute.values()),
27290                 List.of(TypeConstraint.values()),
27291                 List.of(InputParameter.values()),
27292                 List.of(OutputParameter.values())
27293         );
27294 
27295         public SplitToSequence(ExternalizedOp def) {
27296             super(SCHEMA, def);
27297         }
27298 
27299         SplitToSequence(SplitToSequence that, CopyContext cc) {
27300             super(that, cc);
27301         }
27302 
27303         @Override
27304         public SplitToSequence transform(CopyContext cc, OpTransformer ot) {
27305             return new SplitToSequence(this, cc);
27306         }
27307 
27308         SplitToSequence(TypeElement resultType, Value input, java.util.Optional<Value> split, java.util.Optional<Long> keepdims, java.util.Optional<Long> axis) {
27309             super(SCHEMA, resultType, Set.of(), List.of(input, split), List.of(keepdims, axis));
27310         }
27311 
27312         @Override
27313         public SequencedSet<OnnxParameter> onnxOutputs() {
27314             return onnxOutputs(SCHEMA);
27315         }
27316 
27317         @Override
27318         public SequencedMap<OnnxParameter, Object> onnxInputs() {
27319             return onnxInputs(SCHEMA, List.of(input(), split()));
27320         }
27321 
27322         public Value input() {
27323             return operands().get(0);
27324         }
27325 
27326         public java.util.Optional<Value> split() {
27327             int i = optionalInputArguments.indexOf(InputParameter.split);
27328             return i != -1 ? java.util.Optional.of(operands().get(1 + i)) : java.util.Optional.empty();
27329         }
27330 
27331         public java.util.Optional<Long> keepdims() {
27332             Long keepdims = Attribute.keepdims.access(Long.class, onnxAttributes);
27333             return java.util.Optional.ofNullable(keepdims);
27334         }
27335 
27336         public java.util.Optional<Long> axis() {
27337             Long axis = Attribute.axis.access(Long.class, onnxAttributes);
27338             return java.util.Optional.ofNullable(axis);
27339         }
27340 
27341     }
27342 
27343     public static SplitToSequence SplitToSequence(TypeElement resultType, Value input, java.util.Optional<Value> split, java.util.Optional<Long> keepdims, java.util.Optional<Long> axis) {
27344         return new SplitToSequence(resultType, input, split, keepdims, axis);
27345     }
27346 
27347     @OpFactoryHelper.OpDeclaration(Sqrt.NAME)
27348     public static final class Sqrt extends OnnxOp {
27349         public static final String NAME = "Sqrt";
27350 
27351         public enum Attribute implements OnnxAttribute.None { }
27352 
27353         public enum TypeConstraint implements OnnxTypeConstraint {
27354             T(new OnnxType.TypeVariable("T", List.of(OnnxType.tensor(OnnxType.float16()), OnnxType.tensor(OnnxType.float32()), OnnxType.tensor(OnnxType.float64()), OnnxType.tensor(OnnxType.bfloat16())))),
27355             ;
27356 
27357             final OnnxType.TypeVariable typeVariable;
27358 
27359             TypeConstraint(OnnxType.TypeVariable typeVariable) {
27360                 assert typeVariable.name().equals(name());
27361                 this.typeVariable = typeVariable;
27362             }
27363 
27364             @Override
27365             public OnnxType.TypeVariable typeVariable() {
27366                 return typeVariable;
27367             }
27368         }
27369 
27370         public enum InputParameter implements OnnxParameter {
27371             X(TypeConstraint.T.typeVariable(), Quantifier.REQUIRED),
27372             ;
27373 
27374             final OnnxType type;
27375             final Quantifier quantifier;
27376 
27377             InputParameter(OnnxType type, Quantifier quantifier) {
27378                 this.type = type;
27379                 this.quantifier = quantifier;
27380             }
27381 
27382             @Override
27383             public OnnxType type() {
27384                 return type;
27385             }
27386 
27387             @Override
27388             public Quantifier quantifier() {
27389                 return quantifier;
27390             }
27391         }
27392 
27393         public enum OutputParameter implements OnnxParameter {
27394             Y(TypeConstraint.T.typeVariable(), Quantifier.REQUIRED),
27395             ;
27396 
27397             final OnnxType type;
27398             final Quantifier quantifier;
27399 
27400             OutputParameter(OnnxType type, Quantifier quantifier) {
27401                 this.type = type;
27402                 this.quantifier = quantifier;
27403             }
27404 
27405             @Override
27406             public OnnxType type() {
27407                 return type;
27408             }
27409 
27410             @Override
27411             public Quantifier quantifier() {
27412                 return quantifier;
27413             }
27414         }
27415 
27416         public static final OnnxSchema SCHEMA = new OnnxSchemaRecord(
27417                 NAME,
27418                 List.of(Attribute.values()),
27419                 List.of(TypeConstraint.values()),
27420                 List.of(InputParameter.values()),
27421                 List.of(OutputParameter.values())
27422         );
27423 
27424         public Sqrt(ExternalizedOp def) {
27425             super(SCHEMA, def);
27426         }
27427 
27428         Sqrt(Sqrt that, CopyContext cc) {
27429             super(that, cc);
27430         }
27431 
27432         @Override
27433         public Sqrt transform(CopyContext cc, OpTransformer ot) {
27434             return new Sqrt(this, cc);
27435         }
27436 
27437         Sqrt(TypeElement resultType, Value X) {
27438             super(SCHEMA, resultType, Set.of(), List.of(X), List.of());
27439         }
27440 
27441         @Override
27442         public SequencedSet<OnnxParameter> onnxOutputs() {
27443             return onnxOutputs(SCHEMA);
27444         }
27445 
27446         @Override
27447         public SequencedMap<OnnxParameter, Object> onnxInputs() {
27448             return onnxInputs(SCHEMA, List.of(X()));
27449         }
27450 
27451         public Value X() {
27452             return operands().get(0);
27453         }
27454 
27455     }
27456 
27457     public static Sqrt Sqrt(TypeElement resultType, Value X) {
27458         return new Sqrt(resultType, X);
27459     }
27460 
27461     @OpFactoryHelper.OpDeclaration(Squeeze.NAME)
27462     public static final class Squeeze extends OnnxOp {
27463         public static final String NAME = "Squeeze";
27464 
27465         public enum Attribute implements OnnxAttribute.None { }
27466 
27467         public enum TypeConstraint implements OnnxTypeConstraint {
27468             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())))),
27469             ;
27470 
27471             final OnnxType.TypeVariable typeVariable;
27472 
27473             TypeConstraint(OnnxType.TypeVariable typeVariable) {
27474                 assert typeVariable.name().equals(name());
27475                 this.typeVariable = typeVariable;
27476             }
27477 
27478             @Override
27479             public OnnxType.TypeVariable typeVariable() {
27480                 return typeVariable;
27481             }
27482         }
27483 
27484         public enum InputParameter implements OnnxParameter {
27485             data(TypeConstraint.T.typeVariable(), Quantifier.REQUIRED),
27486             axes(OnnxType.tensor(OnnxType.int64()), Quantifier.OPTIONAL),
27487             ;
27488 
27489             final OnnxType type;
27490             final Quantifier quantifier;
27491 
27492             InputParameter(OnnxType type, Quantifier quantifier) {
27493                 this.type = type;
27494                 this.quantifier = quantifier;
27495             }
27496 
27497             @Override
27498             public OnnxType type() {
27499                 return type;
27500             }
27501 
27502             @Override
27503             public Quantifier quantifier() {
27504                 return quantifier;
27505             }
27506         }
27507 
27508         public enum OutputParameter implements OnnxParameter {
27509             squeezed(TypeConstraint.T.typeVariable(), Quantifier.REQUIRED),
27510             ;
27511 
27512             final OnnxType type;
27513             final Quantifier quantifier;
27514 
27515             OutputParameter(OnnxType type, Quantifier quantifier) {
27516                 this.type = type;
27517                 this.quantifier = quantifier;
27518             }
27519 
27520             @Override
27521             public OnnxType type() {
27522                 return type;
27523             }
27524 
27525             @Override
27526             public Quantifier quantifier() {
27527                 return quantifier;
27528             }
27529         }
27530 
27531         public static final OnnxSchema SCHEMA = new OnnxSchemaRecord(
27532                 NAME,
27533                 List.of(Attribute.values()),
27534                 List.of(TypeConstraint.values()),
27535                 List.of(InputParameter.values()),
27536                 List.of(OutputParameter.values())
27537         );
27538 
27539         public Squeeze(ExternalizedOp def) {
27540             super(SCHEMA, def);
27541         }
27542 
27543         Squeeze(Squeeze that, CopyContext cc) {
27544             super(that, cc);
27545         }
27546 
27547         @Override
27548         public Squeeze transform(CopyContext cc, OpTransformer ot) {
27549             return new Squeeze(this, cc);
27550         }
27551 
27552         Squeeze(TypeElement resultType, Value data, java.util.Optional<Value> axes) {
27553             super(SCHEMA, resultType, Set.of(), List.of(data, axes), List.of());
27554         }
27555 
27556         @Override
27557         public SequencedSet<OnnxParameter> onnxOutputs() {
27558             return onnxOutputs(SCHEMA);
27559         }
27560 
27561         @Override
27562         public SequencedMap<OnnxParameter, Object> onnxInputs() {
27563             return onnxInputs(SCHEMA, List.of(data(), axes()));
27564         }
27565 
27566         public Value data() {
27567             return operands().get(0);
27568         }
27569 
27570         public java.util.Optional<Value> axes() {
27571             int i = optionalInputArguments.indexOf(InputParameter.axes);
27572             return i != -1 ? java.util.Optional.of(operands().get(1 + i)) : java.util.Optional.empty();
27573         }
27574 
27575     }
27576 
27577     public static Squeeze Squeeze(TypeElement resultType, Value data, java.util.Optional<Value> axes) {
27578         return new Squeeze(resultType, data, axes);
27579     }
27580 
27581     @OpFactoryHelper.OpDeclaration(StringConcat.NAME)
27582     public static final class StringConcat extends OnnxOp {
27583         public static final String NAME = "StringConcat";
27584 
27585         public enum Attribute implements OnnxAttribute.None { }
27586 
27587         public enum TypeConstraint implements OnnxTypeConstraint {
27588             T(new OnnxType.TypeVariable("T", List.of(OnnxType.tensor(OnnxType.string())))),
27589             ;
27590 
27591             final OnnxType.TypeVariable typeVariable;
27592 
27593             TypeConstraint(OnnxType.TypeVariable typeVariable) {
27594                 assert typeVariable.name().equals(name());
27595                 this.typeVariable = typeVariable;
27596             }
27597 
27598             @Override
27599             public OnnxType.TypeVariable typeVariable() {
27600                 return typeVariable;
27601             }
27602         }
27603 
27604         public enum InputParameter implements OnnxParameter {
27605             X(TypeConstraint.T.typeVariable(), Quantifier.REQUIRED),
27606             Y(TypeConstraint.T.typeVariable(), Quantifier.REQUIRED),
27607             ;
27608 
27609             final OnnxType type;
27610             final Quantifier quantifier;
27611 
27612             InputParameter(OnnxType type, Quantifier quantifier) {
27613                 this.type = type;
27614                 this.quantifier = quantifier;
27615             }
27616 
27617             @Override
27618             public OnnxType type() {
27619                 return type;
27620             }
27621 
27622             @Override
27623             public Quantifier quantifier() {
27624                 return quantifier;
27625             }
27626         }
27627 
27628         public enum OutputParameter implements OnnxParameter {
27629             Z(TypeConstraint.T.typeVariable(), Quantifier.REQUIRED),
27630             ;
27631 
27632             final OnnxType type;
27633             final Quantifier quantifier;
27634 
27635             OutputParameter(OnnxType type, Quantifier quantifier) {
27636                 this.type = type;
27637                 this.quantifier = quantifier;
27638             }
27639 
27640             @Override
27641             public OnnxType type() {
27642                 return type;
27643             }
27644 
27645             @Override
27646             public Quantifier quantifier() {
27647                 return quantifier;
27648             }
27649         }
27650 
27651         public static final OnnxSchema SCHEMA = new OnnxSchemaRecord(
27652                 NAME,
27653                 List.of(Attribute.values()),
27654                 List.of(TypeConstraint.values()),
27655                 List.of(InputParameter.values()),
27656                 List.of(OutputParameter.values())
27657         );
27658 
27659         public StringConcat(ExternalizedOp def) {
27660             super(SCHEMA, def);
27661         }
27662 
27663         StringConcat(StringConcat that, CopyContext cc) {
27664             super(that, cc);
27665         }
27666 
27667         @Override
27668         public StringConcat transform(CopyContext cc, OpTransformer ot) {
27669             return new StringConcat(this, cc);
27670         }
27671 
27672         StringConcat(TypeElement resultType, Value X, Value Y) {
27673             super(SCHEMA, resultType, Set.of(), List.of(X, Y), List.of());
27674         }
27675 
27676         @Override
27677         public SequencedSet<OnnxParameter> onnxOutputs() {
27678             return onnxOutputs(SCHEMA);
27679         }
27680 
27681         @Override
27682         public SequencedMap<OnnxParameter, Object> onnxInputs() {
27683             return onnxInputs(SCHEMA, List.of(X(), Y()));
27684         }
27685 
27686         public Value X() {
27687             return operands().get(0);
27688         }
27689 
27690         public Value Y() {
27691             return operands().get(1);
27692         }
27693 
27694     }
27695 
27696     public static StringConcat StringConcat(TypeElement resultType, Value X, Value Y) {
27697         return new StringConcat(resultType, X, Y);
27698     }
27699 
27700     @OpFactoryHelper.OpDeclaration(StringNormalizer.NAME)
27701     public static final class StringNormalizer extends OnnxOp {
27702         public static final String NAME = "StringNormalizer";
27703 
27704         public enum Attribute implements OnnxAttribute {
27705             is_case_sensitive(Long.class, true, 0),
27706             locale(String.class, true, null),
27707             stopwords(String[].class, true, null),
27708             case_change_action(String.class, true, "NONE"),
27709             ;
27710 
27711                 final Class<?> t;
27712                 final boolean optional;
27713                 final Object defaultValue;
27714 
27715                 Attribute(Class<?> type, boolean optional, Object defaultValue) {
27716                     this.t = type;
27717                     this.optional = optional;
27718                     this.defaultValue = defaultValue;
27719                     assert optional || defaultValue == null;
27720                 }
27721 
27722                 public Class<?> type() {
27723                     return t;
27724                 }
27725 
27726                 public boolean isOptional() {
27727                     return optional;
27728                 }
27729 
27730                 public Object defaultValue() {
27731                     return defaultValue;
27732                 }
27733         }
27734 
27735         public enum TypeConstraint implements OnnxTypeConstraint.None { }
27736 
27737         public enum InputParameter implements OnnxParameter {
27738             X(OnnxType.tensor(OnnxType.string()), Quantifier.REQUIRED),
27739             ;
27740 
27741             final OnnxType type;
27742             final Quantifier quantifier;
27743 
27744             InputParameter(OnnxType type, Quantifier quantifier) {
27745                 this.type = type;
27746                 this.quantifier = quantifier;
27747             }
27748 
27749             @Override
27750             public OnnxType type() {
27751                 return type;
27752             }
27753 
27754             @Override
27755             public Quantifier quantifier() {
27756                 return quantifier;
27757             }
27758         }
27759 
27760         public enum OutputParameter implements OnnxParameter {
27761             Y(OnnxType.tensor(OnnxType.string()), Quantifier.REQUIRED),
27762             ;
27763 
27764             final OnnxType type;
27765             final Quantifier quantifier;
27766 
27767             OutputParameter(OnnxType type, Quantifier quantifier) {
27768                 this.type = type;
27769                 this.quantifier = quantifier;
27770             }
27771 
27772             @Override
27773             public OnnxType type() {
27774                 return type;
27775             }
27776 
27777             @Override
27778             public Quantifier quantifier() {
27779                 return quantifier;
27780             }
27781         }
27782 
27783         public static final OnnxSchema SCHEMA = new OnnxSchemaRecord(
27784                 NAME,
27785                 List.of(Attribute.values()),
27786                 List.of(TypeConstraint.values()),
27787                 List.of(InputParameter.values()),
27788                 List.of(OutputParameter.values())
27789         );
27790 
27791         public StringNormalizer(ExternalizedOp def) {
27792             super(SCHEMA, def);
27793         }
27794 
27795         StringNormalizer(StringNormalizer that, CopyContext cc) {
27796             super(that, cc);
27797         }
27798 
27799         @Override
27800         public StringNormalizer transform(CopyContext cc, OpTransformer ot) {
27801             return new StringNormalizer(this, cc);
27802         }
27803 
27804         StringNormalizer(TypeElement resultType, Value X, java.util.Optional<Long> is_case_sensitive, java.util.Optional<String> locale, java.util.Optional<String[]> stopwords, java.util.Optional<String> case_change_action) {
27805             super(SCHEMA, resultType, Set.of(), List.of(X), List.of(is_case_sensitive, locale, stopwords, case_change_action));
27806         }
27807 
27808         @Override
27809         public SequencedSet<OnnxParameter> onnxOutputs() {
27810             return onnxOutputs(SCHEMA);
27811         }
27812 
27813         @Override
27814         public SequencedMap<OnnxParameter, Object> onnxInputs() {
27815             return onnxInputs(SCHEMA, List.of(X()));
27816         }
27817 
27818         public Value X() {
27819             return operands().get(0);
27820         }
27821 
27822         public java.util.Optional<Long> is_case_sensitive() {
27823             Long is_case_sensitive = Attribute.is_case_sensitive.access(Long.class, onnxAttributes);
27824             return java.util.Optional.ofNullable(is_case_sensitive);
27825         }
27826 
27827         public java.util.Optional<String> locale() {
27828             String locale = Attribute.locale.access(String.class, onnxAttributes);
27829             return java.util.Optional.ofNullable(locale);
27830         }
27831 
27832         public java.util.Optional<String[]> stopwords() {
27833             String[] stopwords = Attribute.stopwords.access(String[].class, onnxAttributes);
27834             return java.util.Optional.ofNullable(stopwords).map(String[]::clone);
27835         }
27836 
27837         public java.util.Optional<String> case_change_action() {
27838             String case_change_action = Attribute.case_change_action.access(String.class, onnxAttributes);
27839             return java.util.Optional.ofNullable(case_change_action);
27840         }
27841 
27842     }
27843 
27844     public static StringNormalizer StringNormalizer(TypeElement resultType, Value X, java.util.Optional<Long> is_case_sensitive, java.util.Optional<String> locale, java.util.Optional<String[]> stopwords, java.util.Optional<String> case_change_action) {
27845         return new StringNormalizer(resultType, X, is_case_sensitive, locale, stopwords, case_change_action);
27846     }
27847 
27848     @OpFactoryHelper.OpDeclaration(StringSplit.NAME)
27849     public static final class StringSplit extends OnnxOp {
27850         public static final String NAME = "StringSplit";
27851 
27852         public enum Attribute implements OnnxAttribute {
27853             delimiter(String.class, true, null),
27854             maxsplit(Long.class, true, null),
27855             ;
27856 
27857                 final Class<?> t;
27858                 final boolean optional;
27859                 final Object defaultValue;
27860 
27861                 Attribute(Class<?> type, boolean optional, Object defaultValue) {
27862                     this.t = type;
27863                     this.optional = optional;
27864                     this.defaultValue = defaultValue;
27865                     assert optional || defaultValue == null;
27866                 }
27867 
27868                 public Class<?> type() {
27869                     return t;
27870                 }
27871 
27872                 public boolean isOptional() {
27873                     return optional;
27874                 }
27875 
27876                 public Object defaultValue() {
27877                     return defaultValue;
27878                 }
27879         }
27880 
27881         public enum TypeConstraint implements OnnxTypeConstraint {
27882             T1(new OnnxType.TypeVariable("T1", List.of(OnnxType.tensor(OnnxType.string())))),
27883             T2(new OnnxType.TypeVariable("T2", List.of(OnnxType.tensor(OnnxType.string())))),
27884             T3(new OnnxType.TypeVariable("T3", List.of(OnnxType.tensor(OnnxType.int64())))),
27885             ;
27886 
27887             final OnnxType.TypeVariable typeVariable;
27888 
27889             TypeConstraint(OnnxType.TypeVariable typeVariable) {
27890                 assert typeVariable.name().equals(name());
27891                 this.typeVariable = typeVariable;
27892             }
27893 
27894             @Override
27895             public OnnxType.TypeVariable typeVariable() {
27896                 return typeVariable;
27897             }
27898         }
27899 
27900         public enum InputParameter implements OnnxParameter {
27901             X(TypeConstraint.T1.typeVariable(), Quantifier.REQUIRED),
27902             ;
27903 
27904             final OnnxType type;
27905             final Quantifier quantifier;
27906 
27907             InputParameter(OnnxType type, Quantifier quantifier) {
27908                 this.type = type;
27909                 this.quantifier = quantifier;
27910             }
27911 
27912             @Override
27913             public OnnxType type() {
27914                 return type;
27915             }
27916 
27917             @Override
27918             public Quantifier quantifier() {
27919                 return quantifier;
27920             }
27921         }
27922 
27923         public enum OutputParameter implements OnnxParameter {
27924             Y(TypeConstraint.T2.typeVariable(), Quantifier.REQUIRED),
27925             Z(TypeConstraint.T3.typeVariable(), Quantifier.REQUIRED),
27926             ;
27927 
27928             final OnnxType type;
27929             final Quantifier quantifier;
27930 
27931             OutputParameter(OnnxType type, Quantifier quantifier) {
27932                 this.type = type;
27933                 this.quantifier = quantifier;
27934             }
27935 
27936             @Override
27937             public OnnxType type() {
27938                 return type;
27939             }
27940 
27941             @Override
27942             public Quantifier quantifier() {
27943                 return quantifier;
27944             }
27945         }
27946 
27947         public static final OnnxSchema SCHEMA = new OnnxSchemaRecord(
27948                 NAME,
27949                 List.of(Attribute.values()),
27950                 List.of(TypeConstraint.values()),
27951                 List.of(InputParameter.values()),
27952                 List.of(OutputParameter.values())
27953         );
27954 
27955         public StringSplit(ExternalizedOp def) {
27956             super(SCHEMA, def);
27957         }
27958 
27959         StringSplit(StringSplit that, CopyContext cc) {
27960             super(that, cc);
27961         }
27962 
27963         @Override
27964         public StringSplit transform(CopyContext cc, OpTransformer ot) {
27965             return new StringSplit(this, cc);
27966         }
27967 
27968         StringSplit(TypeElement resultType, Value X, java.util.Optional<String> delimiter, java.util.Optional<Long> maxsplit) {
27969             super(SCHEMA, resultType, Set.of(), List.of(X), List.of(delimiter, maxsplit));
27970         }
27971 
27972         @Override
27973         public SequencedSet<OnnxParameter> onnxOutputs() {
27974             return onnxOutputs(SCHEMA);
27975         }
27976 
27977         @Override
27978         public SequencedMap<OnnxParameter, Object> onnxInputs() {
27979             return onnxInputs(SCHEMA, List.of(X()));
27980         }
27981 
27982         public Value X() {
27983             return operands().get(0);
27984         }
27985 
27986         public java.util.Optional<String> delimiter() {
27987             String delimiter = Attribute.delimiter.access(String.class, onnxAttributes);
27988             return java.util.Optional.ofNullable(delimiter);
27989         }
27990 
27991         public java.util.Optional<Long> maxsplit() {
27992             Long maxsplit = Attribute.maxsplit.access(Long.class, onnxAttributes);
27993             return java.util.Optional.ofNullable(maxsplit);
27994         }
27995 
27996     }
27997 
27998     public static StringSplit StringSplit(TypeElement resultType, Value X, java.util.Optional<String> delimiter, java.util.Optional<Long> maxsplit) {
27999         return new StringSplit(resultType, X, delimiter, maxsplit);
28000     }
28001 
28002     @OpFactoryHelper.OpDeclaration(Sub.NAME)
28003     public static final class Sub extends OnnxOp {
28004         public static final String NAME = "Sub";
28005 
28006         public enum Attribute implements OnnxAttribute.None { }
28007 
28008         public enum TypeConstraint implements OnnxTypeConstraint {
28009             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())))),
28010             ;
28011 
28012             final OnnxType.TypeVariable typeVariable;
28013 
28014             TypeConstraint(OnnxType.TypeVariable typeVariable) {
28015                 assert typeVariable.name().equals(name());
28016                 this.typeVariable = typeVariable;
28017             }
28018 
28019             @Override
28020             public OnnxType.TypeVariable typeVariable() {
28021                 return typeVariable;
28022             }
28023         }
28024 
28025         public enum InputParameter implements OnnxParameter {
28026             A(TypeConstraint.T.typeVariable(), Quantifier.REQUIRED),
28027             B(TypeConstraint.T.typeVariable(), Quantifier.REQUIRED),
28028             ;
28029 
28030             final OnnxType type;
28031             final Quantifier quantifier;
28032 
28033             InputParameter(OnnxType type, Quantifier quantifier) {
28034                 this.type = type;
28035                 this.quantifier = quantifier;
28036             }
28037 
28038             @Override
28039             public OnnxType type() {
28040                 return type;
28041             }
28042 
28043             @Override
28044             public Quantifier quantifier() {
28045                 return quantifier;
28046             }
28047         }
28048 
28049         public enum OutputParameter implements OnnxParameter {
28050             C(TypeConstraint.T.typeVariable(), Quantifier.REQUIRED),
28051             ;
28052 
28053             final OnnxType type;
28054             final Quantifier quantifier;
28055 
28056             OutputParameter(OnnxType type, Quantifier quantifier) {
28057                 this.type = type;
28058                 this.quantifier = quantifier;
28059             }
28060 
28061             @Override
28062             public OnnxType type() {
28063                 return type;
28064             }
28065 
28066             @Override
28067             public Quantifier quantifier() {
28068                 return quantifier;
28069             }
28070         }
28071 
28072         public static final OnnxSchema SCHEMA = new OnnxSchemaRecord(
28073                 NAME,
28074                 List.of(Attribute.values()),
28075                 List.of(TypeConstraint.values()),
28076                 List.of(InputParameter.values()),
28077                 List.of(OutputParameter.values())
28078         );
28079 
28080         public Sub(ExternalizedOp def) {
28081             super(SCHEMA, def);
28082         }
28083 
28084         Sub(Sub that, CopyContext cc) {
28085             super(that, cc);
28086         }
28087 
28088         @Override
28089         public Sub transform(CopyContext cc, OpTransformer ot) {
28090             return new Sub(this, cc);
28091         }
28092 
28093         Sub(TypeElement resultType, Value A, Value B) {
28094             super(SCHEMA, resultType, Set.of(), List.of(A, B), List.of());
28095         }
28096 
28097         @Override
28098         public SequencedSet<OnnxParameter> onnxOutputs() {
28099             return onnxOutputs(SCHEMA);
28100         }
28101 
28102         @Override
28103         public SequencedMap<OnnxParameter, Object> onnxInputs() {
28104             return onnxInputs(SCHEMA, List.of(A(), B()));
28105         }
28106 
28107         public Value A() {
28108             return operands().get(0);
28109         }
28110 
28111         public Value B() {
28112             return operands().get(1);
28113         }
28114 
28115     }
28116 
28117     public static Sub Sub(TypeElement resultType, Value A, Value B) {
28118         return new Sub(resultType, A, B);
28119     }
28120 
28121     @OpFactoryHelper.OpDeclaration(Sum.NAME)
28122     public static final class Sum extends OnnxOp {
28123         public static final String NAME = "Sum";
28124 
28125         public enum Attribute implements OnnxAttribute.None { }
28126 
28127         public enum TypeConstraint implements OnnxTypeConstraint {
28128             T(new OnnxType.TypeVariable("T", List.of(OnnxType.tensor(OnnxType.float16()), OnnxType.tensor(OnnxType.float32()), OnnxType.tensor(OnnxType.float64()), OnnxType.tensor(OnnxType.bfloat16())))),
28129             ;
28130 
28131             final OnnxType.TypeVariable typeVariable;
28132 
28133             TypeConstraint(OnnxType.TypeVariable typeVariable) {
28134                 assert typeVariable.name().equals(name());
28135                 this.typeVariable = typeVariable;
28136             }
28137 
28138             @Override
28139             public OnnxType.TypeVariable typeVariable() {
28140                 return typeVariable;
28141             }
28142         }
28143 
28144         public enum InputParameter implements OnnxParameter {
28145             data_0(TypeConstraint.T.typeVariable(), Quantifier.VARIADIC),
28146             ;
28147 
28148             final OnnxType type;
28149             final Quantifier quantifier;
28150 
28151             InputParameter(OnnxType type, Quantifier quantifier) {
28152                 this.type = type;
28153                 this.quantifier = quantifier;
28154             }
28155 
28156             @Override
28157             public OnnxType type() {
28158                 return type;
28159             }
28160 
28161             @Override
28162             public Quantifier quantifier() {
28163                 return quantifier;
28164             }
28165         }
28166 
28167         public enum OutputParameter implements OnnxParameter {
28168             sum(TypeConstraint.T.typeVariable(), Quantifier.REQUIRED),
28169             ;
28170 
28171             final OnnxType type;
28172             final Quantifier quantifier;
28173 
28174             OutputParameter(OnnxType type, Quantifier quantifier) {
28175                 this.type = type;
28176                 this.quantifier = quantifier;
28177             }
28178 
28179             @Override
28180             public OnnxType type() {
28181                 return type;
28182             }
28183 
28184             @Override
28185             public Quantifier quantifier() {
28186                 return quantifier;
28187             }
28188         }
28189 
28190         public static final OnnxSchema SCHEMA = new OnnxSchemaRecord(
28191                 NAME,
28192                 List.of(Attribute.values()),
28193                 List.of(TypeConstraint.values()),
28194                 List.of(InputParameter.values()),
28195                 List.of(OutputParameter.values())
28196         );
28197 
28198         public Sum(ExternalizedOp def) {
28199             super(SCHEMA, def);
28200         }
28201 
28202         Sum(Sum that, CopyContext cc) {
28203             super(that, cc);
28204         }
28205 
28206         @Override
28207         public Sum transform(CopyContext cc, OpTransformer ot) {
28208             return new Sum(this, cc);
28209         }
28210 
28211         Sum(TypeElement resultType, List<Value> data_0) {
28212             super(SCHEMA, resultType, Set.of(), List.of(data_0), List.of());
28213         }
28214 
28215         @Override
28216         public SequencedSet<OnnxParameter> onnxOutputs() {
28217             return onnxOutputs(SCHEMA);
28218         }
28219 
28220         @Override
28221         public SequencedMap<OnnxParameter, Object> onnxInputs() {
28222             return onnxInputs(SCHEMA, List.of(data_0()));
28223         }
28224 
28225         public List<Value> data_0() {
28226             return operands();
28227         }
28228 
28229     }
28230 
28231     public static Sum Sum(TypeElement resultType, List<Value> data_0) {
28232         return new Sum(resultType, data_0);
28233     }
28234 
28235     @OpFactoryHelper.OpDeclaration(Tan.NAME)
28236     public static final class Tan extends OnnxOp {
28237         public static final String NAME = "Tan";
28238 
28239         public enum Attribute implements OnnxAttribute.None { }
28240 
28241         public enum TypeConstraint implements OnnxTypeConstraint {
28242             T(new OnnxType.TypeVariable("T", List.of(OnnxType.tensor(OnnxType.bfloat16()), OnnxType.tensor(OnnxType.float16()), OnnxType.tensor(OnnxType.float32()), OnnxType.tensor(OnnxType.float64())))),
28243             ;
28244 
28245             final OnnxType.TypeVariable typeVariable;
28246 
28247             TypeConstraint(OnnxType.TypeVariable typeVariable) {
28248                 assert typeVariable.name().equals(name());
28249                 this.typeVariable = typeVariable;
28250             }
28251 
28252             @Override
28253             public OnnxType.TypeVariable typeVariable() {
28254                 return typeVariable;
28255             }
28256         }
28257 
28258         public enum InputParameter implements OnnxParameter {
28259             input(TypeConstraint.T.typeVariable(), Quantifier.REQUIRED),
28260             ;
28261 
28262             final OnnxType type;
28263             final Quantifier quantifier;
28264 
28265             InputParameter(OnnxType type, Quantifier quantifier) {
28266                 this.type = type;
28267                 this.quantifier = quantifier;
28268             }
28269 
28270             @Override
28271             public OnnxType type() {
28272                 return type;
28273             }
28274 
28275             @Override
28276             public Quantifier quantifier() {
28277                 return quantifier;
28278             }
28279         }
28280 
28281         public enum OutputParameter implements OnnxParameter {
28282             output(TypeConstraint.T.typeVariable(), Quantifier.REQUIRED),
28283             ;
28284 
28285             final OnnxType type;
28286             final Quantifier quantifier;
28287 
28288             OutputParameter(OnnxType type, Quantifier quantifier) {
28289                 this.type = type;
28290                 this.quantifier = quantifier;
28291             }
28292 
28293             @Override
28294             public OnnxType type() {
28295                 return type;
28296             }
28297 
28298             @Override
28299             public Quantifier quantifier() {
28300                 return quantifier;
28301             }
28302         }
28303 
28304         public static final OnnxSchema SCHEMA = new OnnxSchemaRecord(
28305                 NAME,
28306                 List.of(Attribute.values()),
28307                 List.of(TypeConstraint.values()),
28308                 List.of(InputParameter.values()),
28309                 List.of(OutputParameter.values())
28310         );
28311 
28312         public Tan(ExternalizedOp def) {
28313             super(SCHEMA, def);
28314         }
28315 
28316         Tan(Tan that, CopyContext cc) {
28317             super(that, cc);
28318         }
28319 
28320         @Override
28321         public Tan transform(CopyContext cc, OpTransformer ot) {
28322             return new Tan(this, cc);
28323         }
28324 
28325         Tan(TypeElement resultType, Value input) {
28326             super(SCHEMA, resultType, Set.of(), List.of(input), List.of());
28327         }
28328 
28329         @Override
28330         public SequencedSet<OnnxParameter> onnxOutputs() {
28331             return onnxOutputs(SCHEMA);
28332         }
28333 
28334         @Override
28335         public SequencedMap<OnnxParameter, Object> onnxInputs() {
28336             return onnxInputs(SCHEMA, List.of(input()));
28337         }
28338 
28339         public Value input() {
28340             return operands().get(0);
28341         }
28342 
28343     }
28344 
28345     public static Tan Tan(TypeElement resultType, Value input) {
28346         return new Tan(resultType, input);
28347     }
28348 
28349     @OpFactoryHelper.OpDeclaration(Tanh.NAME)
28350     public static final class Tanh extends OnnxOp {
28351         public static final String NAME = "Tanh";
28352 
28353         public enum Attribute implements OnnxAttribute.None { }
28354 
28355         public enum TypeConstraint implements OnnxTypeConstraint {
28356             T(new OnnxType.TypeVariable("T", List.of(OnnxType.tensor(OnnxType.bfloat16()), OnnxType.tensor(OnnxType.float16()), OnnxType.tensor(OnnxType.float32()), OnnxType.tensor(OnnxType.float64())))),
28357             ;
28358 
28359             final OnnxType.TypeVariable typeVariable;
28360 
28361             TypeConstraint(OnnxType.TypeVariable typeVariable) {
28362                 assert typeVariable.name().equals(name());
28363                 this.typeVariable = typeVariable;
28364             }
28365 
28366             @Override
28367             public OnnxType.TypeVariable typeVariable() {
28368                 return typeVariable;
28369             }
28370         }
28371 
28372         public enum InputParameter implements OnnxParameter {
28373             input(TypeConstraint.T.typeVariable(), Quantifier.REQUIRED),
28374             ;
28375 
28376             final OnnxType type;
28377             final Quantifier quantifier;
28378 
28379             InputParameter(OnnxType type, Quantifier quantifier) {
28380                 this.type = type;
28381                 this.quantifier = quantifier;
28382             }
28383 
28384             @Override
28385             public OnnxType type() {
28386                 return type;
28387             }
28388 
28389             @Override
28390             public Quantifier quantifier() {
28391                 return quantifier;
28392             }
28393         }
28394 
28395         public enum OutputParameter implements OnnxParameter {
28396             output(TypeConstraint.T.typeVariable(), Quantifier.REQUIRED),
28397             ;
28398 
28399             final OnnxType type;
28400             final Quantifier quantifier;
28401 
28402             OutputParameter(OnnxType type, Quantifier quantifier) {
28403                 this.type = type;
28404                 this.quantifier = quantifier;
28405             }
28406 
28407             @Override
28408             public OnnxType type() {
28409                 return type;
28410             }
28411 
28412             @Override
28413             public Quantifier quantifier() {
28414                 return quantifier;
28415             }
28416         }
28417 
28418         public static final OnnxSchema SCHEMA = new OnnxSchemaRecord(
28419                 NAME,
28420                 List.of(Attribute.values()),
28421                 List.of(TypeConstraint.values()),
28422                 List.of(InputParameter.values()),
28423                 List.of(OutputParameter.values())
28424         );
28425 
28426         public Tanh(ExternalizedOp def) {
28427             super(SCHEMA, def);
28428         }
28429 
28430         Tanh(Tanh that, CopyContext cc) {
28431             super(that, cc);
28432         }
28433 
28434         @Override
28435         public Tanh transform(CopyContext cc, OpTransformer ot) {
28436             return new Tanh(this, cc);
28437         }
28438 
28439         Tanh(TypeElement resultType, Value input) {
28440             super(SCHEMA, resultType, Set.of(), List.of(input), List.of());
28441         }
28442 
28443         @Override
28444         public SequencedSet<OnnxParameter> onnxOutputs() {
28445             return onnxOutputs(SCHEMA);
28446         }
28447 
28448         @Override
28449         public SequencedMap<OnnxParameter, Object> onnxInputs() {
28450             return onnxInputs(SCHEMA, List.of(input()));
28451         }
28452 
28453         public Value input() {
28454             return operands().get(0);
28455         }
28456 
28457     }
28458 
28459     public static Tanh Tanh(TypeElement resultType, Value input) {
28460         return new Tanh(resultType, input);
28461     }
28462 
28463     @OpFactoryHelper.OpDeclaration(TfIdfVectorizer.NAME)
28464     public static final class TfIdfVectorizer extends OnnxOp {
28465         public static final String NAME = "TfIdfVectorizer";
28466 
28467         public enum Attribute implements OnnxAttribute {
28468             ngram_counts(long[].class, false, null),
28469             min_gram_length(Long.class, false, null),
28470             pool_strings(String[].class, true, null),
28471             mode(String.class, false, null),
28472             max_gram_length(Long.class, false, null),
28473             max_skip_count(Long.class, false, null),
28474             pool_int64s(long[].class, true, null),
28475             weights(float[].class, true, null),
28476             ngram_indexes(long[].class, false, null),
28477             ;
28478 
28479                 final Class<?> t;
28480                 final boolean optional;
28481                 final Object defaultValue;
28482 
28483                 Attribute(Class<?> type, boolean optional, Object defaultValue) {
28484                     this.t = type;
28485                     this.optional = optional;
28486                     this.defaultValue = defaultValue;
28487                     assert optional || defaultValue == null;
28488                 }
28489 
28490                 public Class<?> type() {
28491                     return t;
28492                 }
28493 
28494                 public boolean isOptional() {
28495                     return optional;
28496                 }
28497 
28498                 public Object defaultValue() {
28499                     return defaultValue;
28500                 }
28501         }
28502 
28503         public enum TypeConstraint implements OnnxTypeConstraint {
28504             T(new OnnxType.TypeVariable("T", List.of(OnnxType.tensor(OnnxType.string()), OnnxType.tensor(OnnxType.int32()), OnnxType.tensor(OnnxType.int64())))),
28505             T1(new OnnxType.TypeVariable("T1", List.of(OnnxType.tensor(OnnxType.float32())))),
28506             ;
28507 
28508             final OnnxType.TypeVariable typeVariable;
28509 
28510             TypeConstraint(OnnxType.TypeVariable typeVariable) {
28511                 assert typeVariable.name().equals(name());
28512                 this.typeVariable = typeVariable;
28513             }
28514 
28515             @Override
28516             public OnnxType.TypeVariable typeVariable() {
28517                 return typeVariable;
28518             }
28519         }
28520 
28521         public enum InputParameter implements OnnxParameter {
28522             X(TypeConstraint.T.typeVariable(), Quantifier.REQUIRED),
28523             ;
28524 
28525             final OnnxType type;
28526             final Quantifier quantifier;
28527 
28528             InputParameter(OnnxType type, Quantifier quantifier) {
28529                 this.type = type;
28530                 this.quantifier = quantifier;
28531             }
28532 
28533             @Override
28534             public OnnxType type() {
28535                 return type;
28536             }
28537 
28538             @Override
28539             public Quantifier quantifier() {
28540                 return quantifier;
28541             }
28542         }
28543 
28544         public enum OutputParameter implements OnnxParameter {
28545             Y(TypeConstraint.T1.typeVariable(), Quantifier.REQUIRED),
28546             ;
28547 
28548             final OnnxType type;
28549             final Quantifier quantifier;
28550 
28551             OutputParameter(OnnxType type, Quantifier quantifier) {
28552                 this.type = type;
28553                 this.quantifier = quantifier;
28554             }
28555 
28556             @Override
28557             public OnnxType type() {
28558                 return type;
28559             }
28560 
28561             @Override
28562             public Quantifier quantifier() {
28563                 return quantifier;
28564             }
28565         }
28566 
28567         public static final OnnxSchema SCHEMA = new OnnxSchemaRecord(
28568                 NAME,
28569                 List.of(Attribute.values()),
28570                 List.of(TypeConstraint.values()),
28571                 List.of(InputParameter.values()),
28572                 List.of(OutputParameter.values())
28573         );
28574 
28575         public TfIdfVectorizer(ExternalizedOp def) {
28576             super(SCHEMA, def);
28577         }
28578 
28579         TfIdfVectorizer(TfIdfVectorizer that, CopyContext cc) {
28580             super(that, cc);
28581         }
28582 
28583         @Override
28584         public TfIdfVectorizer transform(CopyContext cc, OpTransformer ot) {
28585             return new TfIdfVectorizer(this, cc);
28586         }
28587 
28588         TfIdfVectorizer(TypeElement resultType, Value X, long[] ngram_counts, long min_gram_length, java.util.Optional<String[]> pool_strings, String mode, long max_gram_length, long max_skip_count, java.util.Optional<long[]> pool_int64s, java.util.Optional<float[]> weights, long[] ngram_indexes) {
28589             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));
28590         }
28591 
28592         @Override
28593         public SequencedSet<OnnxParameter> onnxOutputs() {
28594             return onnxOutputs(SCHEMA);
28595         }
28596 
28597         @Override
28598         public SequencedMap<OnnxParameter, Object> onnxInputs() {
28599             return onnxInputs(SCHEMA, List.of(X()));
28600         }
28601 
28602         public Value X() {
28603             return operands().get(0);
28604         }
28605 
28606         public long[] ngram_counts() {
28607             long[] ngram_counts = Attribute.ngram_counts.access(long[].class, onnxAttributes);
28608             return ngram_counts.clone();
28609         }
28610 
28611         public long min_gram_length() {
28612             long min_gram_length = Attribute.min_gram_length.access(Long.class, onnxAttributes);
28613             return min_gram_length;
28614         }
28615 
28616         public java.util.Optional<String[]> pool_strings() {
28617             String[] pool_strings = Attribute.pool_strings.access(String[].class, onnxAttributes);
28618             return java.util.Optional.ofNullable(pool_strings).map(String[]::clone);
28619         }
28620 
28621         public String mode() {
28622             String mode = Attribute.mode.access(String.class, onnxAttributes);
28623             return mode;
28624         }
28625 
28626         public long max_gram_length() {
28627             long max_gram_length = Attribute.max_gram_length.access(Long.class, onnxAttributes);
28628             return max_gram_length;
28629         }
28630 
28631         public long max_skip_count() {
28632             long max_skip_count = Attribute.max_skip_count.access(Long.class, onnxAttributes);
28633             return max_skip_count;
28634         }
28635 
28636         public java.util.Optional<long[]> pool_int64s() {
28637             long[] pool_int64s = Attribute.pool_int64s.access(long[].class, onnxAttributes);
28638             return java.util.Optional.ofNullable(pool_int64s).map(long[]::clone);
28639         }
28640 
28641         public java.util.Optional<float[]> weights() {
28642             float[] weights = Attribute.weights.access(float[].class, onnxAttributes);
28643             return java.util.Optional.ofNullable(weights).map(float[]::clone);
28644         }
28645 
28646         public long[] ngram_indexes() {
28647             long[] ngram_indexes = Attribute.ngram_indexes.access(long[].class, onnxAttributes);
28648             return ngram_indexes.clone();
28649         }
28650 
28651     }
28652 
28653     public static TfIdfVectorizer TfIdfVectorizer(TypeElement resultType, Value X, long[] ngram_counts, long min_gram_length, java.util.Optional<String[]> pool_strings, String mode, long max_gram_length, long max_skip_count, java.util.Optional<long[]> pool_int64s, java.util.Optional<float[]> weights, long[] ngram_indexes) {
28654         return new TfIdfVectorizer(resultType, X, ngram_counts, min_gram_length, pool_strings, mode, max_gram_length, max_skip_count, pool_int64s, weights, ngram_indexes);
28655     }
28656 
28657     @OpFactoryHelper.OpDeclaration(ThresholdedRelu.NAME)
28658     public static final class ThresholdedRelu extends OnnxOp {
28659         public static final String NAME = "ThresholdedRelu";
28660 
28661         public enum Attribute implements OnnxAttribute {
28662             alpha(Float.class, true, 1.0f),
28663             ;
28664 
28665                 final Class<?> t;
28666                 final boolean optional;
28667                 final Object defaultValue;
28668 
28669                 Attribute(Class<?> type, boolean optional, Object defaultValue) {
28670                     this.t = type;
28671                     this.optional = optional;
28672                     this.defaultValue = defaultValue;
28673                     assert optional || defaultValue == null;
28674                 }
28675 
28676                 public Class<?> type() {
28677                     return t;
28678                 }
28679 
28680                 public boolean isOptional() {
28681                     return optional;
28682                 }
28683 
28684                 public Object defaultValue() {
28685                     return defaultValue;
28686                 }
28687         }
28688 
28689         public enum TypeConstraint implements OnnxTypeConstraint {
28690             T(new OnnxType.TypeVariable("T", List.of(OnnxType.tensor(OnnxType.bfloat16()), OnnxType.tensor(OnnxType.float16()), OnnxType.tensor(OnnxType.float32()), OnnxType.tensor(OnnxType.float64())))),
28691             ;
28692 
28693             final OnnxType.TypeVariable typeVariable;
28694 
28695             TypeConstraint(OnnxType.TypeVariable typeVariable) {
28696                 assert typeVariable.name().equals(name());
28697                 this.typeVariable = typeVariable;
28698             }
28699 
28700             @Override
28701             public OnnxType.TypeVariable typeVariable() {
28702                 return typeVariable;
28703             }
28704         }
28705 
28706         public enum InputParameter implements OnnxParameter {
28707             X(TypeConstraint.T.typeVariable(), Quantifier.REQUIRED),
28708             ;
28709 
28710             final OnnxType type;
28711             final Quantifier quantifier;
28712 
28713             InputParameter(OnnxType type, Quantifier quantifier) {
28714                 this.type = type;
28715                 this.quantifier = quantifier;
28716             }
28717 
28718             @Override
28719             public OnnxType type() {
28720                 return type;
28721             }
28722 
28723             @Override
28724             public Quantifier quantifier() {
28725                 return quantifier;
28726             }
28727         }
28728 
28729         public enum OutputParameter implements OnnxParameter {
28730             Y(TypeConstraint.T.typeVariable(), Quantifier.REQUIRED),
28731             ;
28732 
28733             final OnnxType type;
28734             final Quantifier quantifier;
28735 
28736             OutputParameter(OnnxType type, Quantifier quantifier) {
28737                 this.type = type;
28738                 this.quantifier = quantifier;
28739             }
28740 
28741             @Override
28742             public OnnxType type() {
28743                 return type;
28744             }
28745 
28746             @Override
28747             public Quantifier quantifier() {
28748                 return quantifier;
28749             }
28750         }
28751 
28752         public static final OnnxSchema SCHEMA = new OnnxSchemaRecord(
28753                 NAME,
28754                 List.of(Attribute.values()),
28755                 List.of(TypeConstraint.values()),
28756                 List.of(InputParameter.values()),
28757                 List.of(OutputParameter.values())
28758         );
28759 
28760         public ThresholdedRelu(ExternalizedOp def) {
28761             super(SCHEMA, def);
28762         }
28763 
28764         ThresholdedRelu(ThresholdedRelu that, CopyContext cc) {
28765             super(that, cc);
28766         }
28767 
28768         @Override
28769         public ThresholdedRelu transform(CopyContext cc, OpTransformer ot) {
28770             return new ThresholdedRelu(this, cc);
28771         }
28772 
28773         ThresholdedRelu(TypeElement resultType, Value X, java.util.Optional<Float> alpha) {
28774             super(SCHEMA, resultType, Set.of(), List.of(X), List.of(alpha));
28775         }
28776 
28777         @Override
28778         public SequencedSet<OnnxParameter> onnxOutputs() {
28779             return onnxOutputs(SCHEMA);
28780         }
28781 
28782         @Override
28783         public SequencedMap<OnnxParameter, Object> onnxInputs() {
28784             return onnxInputs(SCHEMA, List.of(X()));
28785         }
28786 
28787         public Value X() {
28788             return operands().get(0);
28789         }
28790 
28791         public java.util.Optional<Float> alpha() {
28792             Float alpha = Attribute.alpha.access(Float.class, onnxAttributes);
28793             return java.util.Optional.ofNullable(alpha);
28794         }
28795 
28796     }
28797 
28798     public static ThresholdedRelu ThresholdedRelu(TypeElement resultType, Value X, java.util.Optional<Float> alpha) {
28799         return new ThresholdedRelu(resultType, X, alpha);
28800     }
28801 
28802     @OpFactoryHelper.OpDeclaration(Tile.NAME)
28803     public static final class Tile extends OnnxOp {
28804         public static final String NAME = "Tile";
28805 
28806         public enum Attribute implements OnnxAttribute.None { }
28807 
28808         public enum TypeConstraint implements OnnxTypeConstraint {
28809             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())))),
28810             T1(new OnnxType.TypeVariable("T1", List.of(OnnxType.tensor(OnnxType.int64())))),
28811             ;
28812 
28813             final OnnxType.TypeVariable typeVariable;
28814 
28815             TypeConstraint(OnnxType.TypeVariable typeVariable) {
28816                 assert typeVariable.name().equals(name());
28817                 this.typeVariable = typeVariable;
28818             }
28819 
28820             @Override
28821             public OnnxType.TypeVariable typeVariable() {
28822                 return typeVariable;
28823             }
28824         }
28825 
28826         public enum InputParameter implements OnnxParameter {
28827             input(TypeConstraint.T.typeVariable(), Quantifier.REQUIRED),
28828             repeats(TypeConstraint.T1.typeVariable(), Quantifier.REQUIRED),
28829             ;
28830 
28831             final OnnxType type;
28832             final Quantifier quantifier;
28833 
28834             InputParameter(OnnxType type, Quantifier quantifier) {
28835                 this.type = type;
28836                 this.quantifier = quantifier;
28837             }
28838 
28839             @Override
28840             public OnnxType type() {
28841                 return type;
28842             }
28843 
28844             @Override
28845             public Quantifier quantifier() {
28846                 return quantifier;
28847             }
28848         }
28849 
28850         public enum OutputParameter implements OnnxParameter {
28851             output(TypeConstraint.T.typeVariable(), Quantifier.REQUIRED),
28852             ;
28853 
28854             final OnnxType type;
28855             final Quantifier quantifier;
28856 
28857             OutputParameter(OnnxType type, Quantifier quantifier) {
28858                 this.type = type;
28859                 this.quantifier = quantifier;
28860             }
28861 
28862             @Override
28863             public OnnxType type() {
28864                 return type;
28865             }
28866 
28867             @Override
28868             public Quantifier quantifier() {
28869                 return quantifier;
28870             }
28871         }
28872 
28873         public static final OnnxSchema SCHEMA = new OnnxSchemaRecord(
28874                 NAME,
28875                 List.of(Attribute.values()),
28876                 List.of(TypeConstraint.values()),
28877                 List.of(InputParameter.values()),
28878                 List.of(OutputParameter.values())
28879         );
28880 
28881         public Tile(ExternalizedOp def) {
28882             super(SCHEMA, def);
28883         }
28884 
28885         Tile(Tile that, CopyContext cc) {
28886             super(that, cc);
28887         }
28888 
28889         @Override
28890         public Tile transform(CopyContext cc, OpTransformer ot) {
28891             return new Tile(this, cc);
28892         }
28893 
28894         Tile(TypeElement resultType, Value input, Value repeats) {
28895             super(SCHEMA, resultType, Set.of(), List.of(input, repeats), List.of());
28896         }
28897 
28898         @Override
28899         public SequencedSet<OnnxParameter> onnxOutputs() {
28900             return onnxOutputs(SCHEMA);
28901         }
28902 
28903         @Override
28904         public SequencedMap<OnnxParameter, Object> onnxInputs() {
28905             return onnxInputs(SCHEMA, List.of(input(), repeats()));
28906         }
28907 
28908         public Value input() {
28909             return operands().get(0);
28910         }
28911 
28912         public Value repeats() {
28913             return operands().get(1);
28914         }
28915 
28916     }
28917 
28918     public static Tile Tile(TypeElement resultType, Value input, Value repeats) {
28919         return new Tile(resultType, input, repeats);
28920     }
28921 
28922     @OpFactoryHelper.OpDeclaration(TopK.NAME)
28923     public static final class TopK extends OnnxOp {
28924         public static final String NAME = "TopK";
28925 
28926         public enum Attribute implements OnnxAttribute {
28927             largest(Long.class, true, 1),
28928             sorted(Long.class, true, 1),
28929             axis(Long.class, true, -1),
28930             ;
28931 
28932                 final Class<?> t;
28933                 final boolean optional;
28934                 final Object defaultValue;
28935 
28936                 Attribute(Class<?> type, boolean optional, Object defaultValue) {
28937                     this.t = type;
28938                     this.optional = optional;
28939                     this.defaultValue = defaultValue;
28940                     assert optional || defaultValue == null;
28941                 }
28942 
28943                 public Class<?> type() {
28944                     return t;
28945                 }
28946 
28947                 public boolean isOptional() {
28948                     return optional;
28949                 }
28950 
28951                 public Object defaultValue() {
28952                     return defaultValue;
28953                 }
28954         }
28955 
28956         public enum TypeConstraint implements OnnxTypeConstraint {
28957             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())))),
28958             I(new OnnxType.TypeVariable("I", List.of(OnnxType.tensor(OnnxType.int64())))),
28959             ;
28960 
28961             final OnnxType.TypeVariable typeVariable;
28962 
28963             TypeConstraint(OnnxType.TypeVariable typeVariable) {
28964                 assert typeVariable.name().equals(name());
28965                 this.typeVariable = typeVariable;
28966             }
28967 
28968             @Override
28969             public OnnxType.TypeVariable typeVariable() {
28970                 return typeVariable;
28971             }
28972         }
28973 
28974         public enum InputParameter implements OnnxParameter {
28975             X(TypeConstraint.T.typeVariable(), Quantifier.REQUIRED),
28976             K(OnnxType.tensor(OnnxType.int64()), Quantifier.REQUIRED),
28977             ;
28978 
28979             final OnnxType type;
28980             final Quantifier quantifier;
28981 
28982             InputParameter(OnnxType type, Quantifier quantifier) {
28983                 this.type = type;
28984                 this.quantifier = quantifier;
28985             }
28986 
28987             @Override
28988             public OnnxType type() {
28989                 return type;
28990             }
28991 
28992             @Override
28993             public Quantifier quantifier() {
28994                 return quantifier;
28995             }
28996         }
28997 
28998         public enum OutputParameter implements OnnxParameter {
28999             Values(TypeConstraint.T.typeVariable(), Quantifier.REQUIRED),
29000             Indices(TypeConstraint.I.typeVariable(), Quantifier.REQUIRED),
29001             ;
29002 
29003             final OnnxType type;
29004             final Quantifier quantifier;
29005 
29006             OutputParameter(OnnxType type, Quantifier quantifier) {
29007                 this.type = type;
29008                 this.quantifier = quantifier;
29009             }
29010 
29011             @Override
29012             public OnnxType type() {
29013                 return type;
29014             }
29015 
29016             @Override
29017             public Quantifier quantifier() {
29018                 return quantifier;
29019             }
29020         }
29021 
29022         public static final OnnxSchema SCHEMA = new OnnxSchemaRecord(
29023                 NAME,
29024                 List.of(Attribute.values()),
29025                 List.of(TypeConstraint.values()),
29026                 List.of(InputParameter.values()),
29027                 List.of(OutputParameter.values())
29028         );
29029 
29030         public TopK(ExternalizedOp def) {
29031             super(SCHEMA, def);
29032         }
29033 
29034         TopK(TopK that, CopyContext cc) {
29035             super(that, cc);
29036         }
29037 
29038         @Override
29039         public TopK transform(CopyContext cc, OpTransformer ot) {
29040             return new TopK(this, cc);
29041         }
29042 
29043         TopK(TypeElement resultType, Value X, Value K, java.util.Optional<Long> largest, java.util.Optional<Long> sorted, java.util.Optional<Long> axis) {
29044             super(SCHEMA, resultType, Set.of(), List.of(X, K), List.of(largest, sorted, axis));
29045         }
29046 
29047         @Override
29048         public SequencedSet<OnnxParameter> onnxOutputs() {
29049             return onnxOutputs(SCHEMA);
29050         }
29051 
29052         @Override
29053         public SequencedMap<OnnxParameter, Object> onnxInputs() {
29054             return onnxInputs(SCHEMA, List.of(X(), K()));
29055         }
29056 
29057         public Value X() {
29058             return operands().get(0);
29059         }
29060 
29061         public Value K() {
29062             return operands().get(1);
29063         }
29064 
29065         public java.util.Optional<Long> largest() {
29066             Long largest = Attribute.largest.access(Long.class, onnxAttributes);
29067             return java.util.Optional.ofNullable(largest);
29068         }
29069 
29070         public java.util.Optional<Long> sorted() {
29071             Long sorted = Attribute.sorted.access(Long.class, onnxAttributes);
29072             return java.util.Optional.ofNullable(sorted);
29073         }
29074 
29075         public java.util.Optional<Long> axis() {
29076             Long axis = Attribute.axis.access(Long.class, onnxAttributes);
29077             return java.util.Optional.ofNullable(axis);
29078         }
29079 
29080     }
29081 
29082     public static TopK TopK(TypeElement resultType, Value X, Value K, java.util.Optional<Long> largest, java.util.Optional<Long> sorted, java.util.Optional<Long> axis) {
29083         return new TopK(resultType, X, K, largest, sorted, axis);
29084     }
29085 
29086     @OpFactoryHelper.OpDeclaration(Transpose.NAME)
29087     public static final class Transpose extends OnnxOp {
29088         public static final String NAME = "Transpose";
29089 
29090         public enum Attribute implements OnnxAttribute {
29091             perm(long[].class, true, null),
29092             ;
29093 
29094                 final Class<?> t;
29095                 final boolean optional;
29096                 final Object defaultValue;
29097 
29098                 Attribute(Class<?> type, boolean optional, Object defaultValue) {
29099                     this.t = type;
29100                     this.optional = optional;
29101                     this.defaultValue = defaultValue;
29102                     assert optional || defaultValue == null;
29103                 }
29104 
29105                 public Class<?> type() {
29106                     return t;
29107                 }
29108 
29109                 public boolean isOptional() {
29110                     return optional;
29111                 }
29112 
29113                 public Object defaultValue() {
29114                     return defaultValue;
29115                 }
29116         }
29117 
29118         public enum TypeConstraint implements OnnxTypeConstraint {
29119             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())))),
29120             ;
29121 
29122             final OnnxType.TypeVariable typeVariable;
29123 
29124             TypeConstraint(OnnxType.TypeVariable typeVariable) {
29125                 assert typeVariable.name().equals(name());
29126                 this.typeVariable = typeVariable;
29127             }
29128 
29129             @Override
29130             public OnnxType.TypeVariable typeVariable() {
29131                 return typeVariable;
29132             }
29133         }
29134 
29135         public enum InputParameter implements OnnxParameter {
29136             data(TypeConstraint.T.typeVariable(), Quantifier.REQUIRED),
29137             ;
29138 
29139             final OnnxType type;
29140             final Quantifier quantifier;
29141 
29142             InputParameter(OnnxType type, Quantifier quantifier) {
29143                 this.type = type;
29144                 this.quantifier = quantifier;
29145             }
29146 
29147             @Override
29148             public OnnxType type() {
29149                 return type;
29150             }
29151 
29152             @Override
29153             public Quantifier quantifier() {
29154                 return quantifier;
29155             }
29156         }
29157 
29158         public enum OutputParameter implements OnnxParameter {
29159             transposed(TypeConstraint.T.typeVariable(), Quantifier.REQUIRED),
29160             ;
29161 
29162             final OnnxType type;
29163             final Quantifier quantifier;
29164 
29165             OutputParameter(OnnxType type, Quantifier quantifier) {
29166                 this.type = type;
29167                 this.quantifier = quantifier;
29168             }
29169 
29170             @Override
29171             public OnnxType type() {
29172                 return type;
29173             }
29174 
29175             @Override
29176             public Quantifier quantifier() {
29177                 return quantifier;
29178             }
29179         }
29180 
29181         public static final OnnxSchema SCHEMA = new OnnxSchemaRecord(
29182                 NAME,
29183                 List.of(Attribute.values()),
29184                 List.of(TypeConstraint.values()),
29185                 List.of(InputParameter.values()),
29186                 List.of(OutputParameter.values())
29187         );
29188 
29189         public Transpose(ExternalizedOp def) {
29190             super(SCHEMA, def);
29191         }
29192 
29193         Transpose(Transpose that, CopyContext cc) {
29194             super(that, cc);
29195         }
29196 
29197         @Override
29198         public Transpose transform(CopyContext cc, OpTransformer ot) {
29199             return new Transpose(this, cc);
29200         }
29201 
29202         Transpose(TypeElement resultType, Value data, java.util.Optional<long[]> perm) {
29203             super(SCHEMA, resultType, Set.of(), List.of(data), List.of(perm));
29204         }
29205 
29206         @Override
29207         public SequencedSet<OnnxParameter> onnxOutputs() {
29208             return onnxOutputs(SCHEMA);
29209         }
29210 
29211         @Override
29212         public SequencedMap<OnnxParameter, Object> onnxInputs() {
29213             return onnxInputs(SCHEMA, List.of(data()));
29214         }
29215 
29216         public Value data() {
29217             return operands().get(0);
29218         }
29219 
29220         public java.util.Optional<long[]> perm() {
29221             long[] perm = Attribute.perm.access(long[].class, onnxAttributes);
29222             return java.util.Optional.ofNullable(perm).map(long[]::clone);
29223         }
29224 
29225     }
29226 
29227     public static Transpose Transpose(TypeElement resultType, Value data, java.util.Optional<long[]> perm) {
29228         return new Transpose(resultType, data, perm);
29229     }
29230 
29231     @OpFactoryHelper.OpDeclaration(TreeEnsemble.NAME)
29232     public static final class TreeEnsemble extends OnnxOp {
29233         public static final String NAME = "TreeEnsemble";
29234 
29235         public enum Attribute implements OnnxAttribute {
29236             aggregate_function(Long.class, true, 1),
29237             nodes_hitrates(Tensor.class, true, null),
29238             nodes_featureids(long[].class, false, null),
29239             nodes_falseleafs(long[].class, false, null),
29240             post_transform(Long.class, true, 0),
29241             nodes_trueleafs(long[].class, false, null),
29242             nodes_modes(Tensor.class, false, null),
29243             nodes_falsenodeids(long[].class, false, null),
29244             nodes_truenodeids(long[].class, false, null),
29245             leaf_weights(Tensor.class, false, null),
29246             leaf_targetids(long[].class, false, null),
29247             tree_roots(long[].class, false, null),
29248             n_targets(Long.class, true, null),
29249             nodes_missing_value_tracks_true(long[].class, true, null),
29250             membership_values(Tensor.class, true, null),
29251             nodes_splits(Tensor.class, false, null),
29252             ;
29253 
29254                 final Class<?> t;
29255                 final boolean optional;
29256                 final Object defaultValue;
29257 
29258                 Attribute(Class<?> type, boolean optional, Object defaultValue) {
29259                     this.t = type;
29260                     this.optional = optional;
29261                     this.defaultValue = defaultValue;
29262                     assert optional || defaultValue == null;
29263                 }
29264 
29265                 public Class<?> type() {
29266                     return t;
29267                 }
29268 
29269                 public boolean isOptional() {
29270                     return optional;
29271                 }
29272 
29273                 public Object defaultValue() {
29274                     return defaultValue;
29275                 }
29276         }
29277 
29278         public enum TypeConstraint implements OnnxTypeConstraint {
29279             T(new OnnxType.TypeVariable("T", List.of(OnnxType.tensor(OnnxType.float32()), OnnxType.tensor(OnnxType.float64()), OnnxType.tensor(OnnxType.float16())))),
29280             ;
29281 
29282             final OnnxType.TypeVariable typeVariable;
29283 
29284             TypeConstraint(OnnxType.TypeVariable typeVariable) {
29285                 assert typeVariable.name().equals(name());
29286                 this.typeVariable = typeVariable;
29287             }
29288 
29289             @Override
29290             public OnnxType.TypeVariable typeVariable() {
29291                 return typeVariable;
29292             }
29293         }
29294 
29295         public enum InputParameter implements OnnxParameter {
29296             X(TypeConstraint.T.typeVariable(), Quantifier.REQUIRED),
29297             ;
29298 
29299             final OnnxType type;
29300             final Quantifier quantifier;
29301 
29302             InputParameter(OnnxType type, Quantifier quantifier) {
29303                 this.type = type;
29304                 this.quantifier = quantifier;
29305             }
29306 
29307             @Override
29308             public OnnxType type() {
29309                 return type;
29310             }
29311 
29312             @Override
29313             public Quantifier quantifier() {
29314                 return quantifier;
29315             }
29316         }
29317 
29318         public enum OutputParameter implements OnnxParameter {
29319             Y(TypeConstraint.T.typeVariable(), Quantifier.REQUIRED),
29320             ;
29321 
29322             final OnnxType type;
29323             final Quantifier quantifier;
29324 
29325             OutputParameter(OnnxType type, Quantifier quantifier) {
29326                 this.type = type;
29327                 this.quantifier = quantifier;
29328             }
29329 
29330             @Override
29331             public OnnxType type() {
29332                 return type;
29333             }
29334 
29335             @Override
29336             public Quantifier quantifier() {
29337                 return quantifier;
29338             }
29339         }
29340 
29341         public static final OnnxSchema SCHEMA = new OnnxSchemaRecord(
29342                 NAME,
29343                 List.of(Attribute.values()),
29344                 List.of(TypeConstraint.values()),
29345                 List.of(InputParameter.values()),
29346                 List.of(OutputParameter.values())
29347         );
29348 
29349         public TreeEnsemble(ExternalizedOp def) {
29350             super(SCHEMA, def);
29351         }
29352 
29353         TreeEnsemble(TreeEnsemble that, CopyContext cc) {
29354             super(that, cc);
29355         }
29356 
29357         @Override
29358         public TreeEnsemble transform(CopyContext cc, OpTransformer ot) {
29359             return new TreeEnsemble(this, cc);
29360         }
29361 
29362         TreeEnsemble(TypeElement resultType, Value X, java.util.Optional<Long> aggregate_function, java.util.Optional<Tensor> nodes_hitrates, long[] nodes_featureids, long[] nodes_falseleafs, java.util.Optional<Long> post_transform, long[] nodes_trueleafs, Tensor nodes_modes, long[] nodes_falsenodeids, long[] nodes_truenodeids, Tensor leaf_weights, long[] leaf_targetids, long[] tree_roots, java.util.Optional<Long> n_targets, java.util.Optional<long[]> nodes_missing_value_tracks_true, java.util.Optional<Tensor> membership_values, Tensor nodes_splits) {
29363             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));
29364         }
29365 
29366         @Override
29367         public SequencedSet<OnnxParameter> onnxOutputs() {
29368             return onnxOutputs(SCHEMA);
29369         }
29370 
29371         @Override
29372         public SequencedMap<OnnxParameter, Object> onnxInputs() {
29373             return onnxInputs(SCHEMA, List.of(X()));
29374         }
29375 
29376         public Value X() {
29377             return operands().get(0);
29378         }
29379 
29380         public java.util.Optional<Long> aggregate_function() {
29381             Long aggregate_function = Attribute.aggregate_function.access(Long.class, onnxAttributes);
29382             return java.util.Optional.ofNullable(aggregate_function);
29383         }
29384 
29385         public java.util.Optional<Tensor> nodes_hitrates() {
29386             Tensor nodes_hitrates = Attribute.nodes_hitrates.access(Tensor.class, onnxAttributes);
29387             return java.util.Optional.ofNullable(nodes_hitrates);
29388         }
29389 
29390         public long[] nodes_featureids() {
29391             long[] nodes_featureids = Attribute.nodes_featureids.access(long[].class, onnxAttributes);
29392             return nodes_featureids.clone();
29393         }
29394 
29395         public long[] nodes_falseleafs() {
29396             long[] nodes_falseleafs = Attribute.nodes_falseleafs.access(long[].class, onnxAttributes);
29397             return nodes_falseleafs.clone();
29398         }
29399 
29400         public java.util.Optional<Long> post_transform() {
29401             Long post_transform = Attribute.post_transform.access(Long.class, onnxAttributes);
29402             return java.util.Optional.ofNullable(post_transform);
29403         }
29404 
29405         public long[] nodes_trueleafs() {
29406             long[] nodes_trueleafs = Attribute.nodes_trueleafs.access(long[].class, onnxAttributes);
29407             return nodes_trueleafs.clone();
29408         }
29409 
29410         public Tensor nodes_modes() {
29411             Tensor nodes_modes = Attribute.nodes_modes.access(Tensor.class, onnxAttributes);
29412             return nodes_modes;
29413         }
29414 
29415         public long[] nodes_falsenodeids() {
29416             long[] nodes_falsenodeids = Attribute.nodes_falsenodeids.access(long[].class, onnxAttributes);
29417             return nodes_falsenodeids.clone();
29418         }
29419 
29420         public long[] nodes_truenodeids() {
29421             long[] nodes_truenodeids = Attribute.nodes_truenodeids.access(long[].class, onnxAttributes);
29422             return nodes_truenodeids.clone();
29423         }
29424 
29425         public Tensor leaf_weights() {
29426             Tensor leaf_weights = Attribute.leaf_weights.access(Tensor.class, onnxAttributes);
29427             return leaf_weights;
29428         }
29429 
29430         public long[] leaf_targetids() {
29431             long[] leaf_targetids = Attribute.leaf_targetids.access(long[].class, onnxAttributes);
29432             return leaf_targetids.clone();
29433         }
29434 
29435         public long[] tree_roots() {
29436             long[] tree_roots = Attribute.tree_roots.access(long[].class, onnxAttributes);
29437             return tree_roots.clone();
29438         }
29439 
29440         public java.util.Optional<Long> n_targets() {
29441             Long n_targets = Attribute.n_targets.access(Long.class, onnxAttributes);
29442             return java.util.Optional.ofNullable(n_targets);
29443         }
29444 
29445         public java.util.Optional<long[]> nodes_missing_value_tracks_true() {
29446             long[] nodes_missing_value_tracks_true = Attribute.nodes_missing_value_tracks_true.access(long[].class, onnxAttributes);
29447             return java.util.Optional.ofNullable(nodes_missing_value_tracks_true).map(long[]::clone);
29448         }
29449 
29450         public java.util.Optional<Tensor> membership_values() {
29451             Tensor membership_values = Attribute.membership_values.access(Tensor.class, onnxAttributes);
29452             return java.util.Optional.ofNullable(membership_values);
29453         }
29454 
29455         public Tensor nodes_splits() {
29456             Tensor nodes_splits = Attribute.nodes_splits.access(Tensor.class, onnxAttributes);
29457             return nodes_splits;
29458         }
29459 
29460     }
29461 
29462     public static TreeEnsemble TreeEnsemble(TypeElement resultType, Value X, java.util.Optional<Long> aggregate_function, java.util.Optional<Tensor> nodes_hitrates, long[] nodes_featureids, long[] nodes_falseleafs, java.util.Optional<Long> post_transform, long[] nodes_trueleafs, Tensor nodes_modes, long[] nodes_falsenodeids, long[] nodes_truenodeids, Tensor leaf_weights, long[] leaf_targetids, long[] tree_roots, java.util.Optional<Long> n_targets, java.util.Optional<long[]> nodes_missing_value_tracks_true, java.util.Optional<Tensor> membership_values, Tensor nodes_splits) {
29463         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);
29464     }
29465 
29466     @OpFactoryHelper.OpDeclaration(TreeEnsembleClassifier.NAME)
29467     public static final class TreeEnsembleClassifier extends OnnxOp {
29468         public static final String NAME = "TreeEnsembleClassifier";
29469 
29470         public enum Attribute implements OnnxAttribute {
29471             classlabels_int64s(long[].class, true, null),
29472             class_ids(long[].class, true, null),
29473             nodes_hitrates(float[].class, true, null),
29474             nodes_featureids(long[].class, true, null),
29475             nodes_treeids(long[].class, true, null),
29476             class_weights_as_tensor(Tensor.class, true, null),
29477             post_transform(String.class, true, "NONE"),
29478             nodes_modes(String[].class, true, null),
29479             nodes_falsenodeids(long[].class, true, null),
29480             classlabels_strings(String[].class, true, null),
29481             nodes_truenodeids(long[].class, true, null),
29482             nodes_nodeids(long[].class, true, null),
29483             nodes_hitrates_as_tensor(Tensor.class, true, null),
29484             class_weights(float[].class, true, null),
29485             base_values_as_tensor(Tensor.class, true, null),
29486             nodes_missing_value_tracks_true(long[].class, true, null),
29487             class_nodeids(long[].class, true, null),
29488             class_treeids(long[].class, true, null),
29489             base_values(float[].class, true, null),
29490             nodes_values(float[].class, true, null),
29491             nodes_values_as_tensor(Tensor.class, true, null),
29492             ;
29493 
29494                 final Class<?> t;
29495                 final boolean optional;
29496                 final Object defaultValue;
29497 
29498                 Attribute(Class<?> type, boolean optional, Object defaultValue) {
29499                     this.t = type;
29500                     this.optional = optional;
29501                     this.defaultValue = defaultValue;
29502                     assert optional || defaultValue == null;
29503                 }
29504 
29505                 public Class<?> type() {
29506                     return t;
29507                 }
29508 
29509                 public boolean isOptional() {
29510                     return optional;
29511                 }
29512 
29513                 public Object defaultValue() {
29514                     return defaultValue;
29515                 }
29516         }
29517 
29518         public enum TypeConstraint implements OnnxTypeConstraint {
29519             T1(new OnnxType.TypeVariable("T1", List.of(OnnxType.tensor(OnnxType.float32()), OnnxType.tensor(OnnxType.float64()), OnnxType.tensor(OnnxType.int64()), OnnxType.tensor(OnnxType.int32())))),
29520             T2(new OnnxType.TypeVariable("T2", List.of(OnnxType.tensor(OnnxType.string()), OnnxType.tensor(OnnxType.int64())))),
29521             ;
29522 
29523             final OnnxType.TypeVariable typeVariable;
29524 
29525             TypeConstraint(OnnxType.TypeVariable typeVariable) {
29526                 assert typeVariable.name().equals(name());
29527                 this.typeVariable = typeVariable;
29528             }
29529 
29530             @Override
29531             public OnnxType.TypeVariable typeVariable() {
29532                 return typeVariable;
29533             }
29534         }
29535 
29536         public enum InputParameter implements OnnxParameter {
29537             X(TypeConstraint.T1.typeVariable(), Quantifier.REQUIRED),
29538             ;
29539 
29540             final OnnxType type;
29541             final Quantifier quantifier;
29542 
29543             InputParameter(OnnxType type, Quantifier quantifier) {
29544                 this.type = type;
29545                 this.quantifier = quantifier;
29546             }
29547 
29548             @Override
29549             public OnnxType type() {
29550                 return type;
29551             }
29552 
29553             @Override
29554             public Quantifier quantifier() {
29555                 return quantifier;
29556             }
29557         }
29558 
29559         public enum OutputParameter implements OnnxParameter {
29560             Y(TypeConstraint.T2.typeVariable(), Quantifier.REQUIRED),
29561             Z(OnnxType.tensor(OnnxType.float32()), Quantifier.REQUIRED),
29562             ;
29563 
29564             final OnnxType type;
29565             final Quantifier quantifier;
29566 
29567             OutputParameter(OnnxType type, Quantifier quantifier) {
29568                 this.type = type;
29569                 this.quantifier = quantifier;
29570             }
29571 
29572             @Override
29573             public OnnxType type() {
29574                 return type;
29575             }
29576 
29577             @Override
29578             public Quantifier quantifier() {
29579                 return quantifier;
29580             }
29581         }
29582 
29583         public static final OnnxSchema SCHEMA = new OnnxSchemaRecord(
29584                 NAME,
29585                 List.of(Attribute.values()),
29586                 List.of(TypeConstraint.values()),
29587                 List.of(InputParameter.values()),
29588                 List.of(OutputParameter.values())
29589         );
29590 
29591         public TreeEnsembleClassifier(ExternalizedOp def) {
29592             super(SCHEMA, def);
29593         }
29594 
29595         TreeEnsembleClassifier(TreeEnsembleClassifier that, CopyContext cc) {
29596             super(that, cc);
29597         }
29598 
29599         @Override
29600         public TreeEnsembleClassifier transform(CopyContext cc, OpTransformer ot) {
29601             return new TreeEnsembleClassifier(this, cc);
29602         }
29603 
29604         TreeEnsembleClassifier(TypeElement resultType, Value X, java.util.Optional<long[]> classlabels_int64s, java.util.Optional<long[]> class_ids, java.util.Optional<float[]> nodes_hitrates, java.util.Optional<long[]> nodes_featureids, java.util.Optional<long[]> nodes_treeids, java.util.Optional<Tensor> class_weights_as_tensor, java.util.Optional<String> post_transform, java.util.Optional<String[]> nodes_modes, java.util.Optional<long[]> nodes_falsenodeids, java.util.Optional<String[]> classlabels_strings, java.util.Optional<long[]> nodes_truenodeids, java.util.Optional<long[]> nodes_nodeids, java.util.Optional<Tensor> nodes_hitrates_as_tensor, java.util.Optional<float[]> class_weights, java.util.Optional<Tensor> base_values_as_tensor, java.util.Optional<long[]> nodes_missing_value_tracks_true, java.util.Optional<long[]> class_nodeids, java.util.Optional<long[]> class_treeids, java.util.Optional<float[]> base_values, java.util.Optional<float[]> nodes_values, java.util.Optional<Tensor> nodes_values_as_tensor) {
29605             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));
29606         }
29607 
29608         @Override
29609         public SequencedSet<OnnxParameter> onnxOutputs() {
29610             return onnxOutputs(SCHEMA);
29611         }
29612 
29613         @Override
29614         public SequencedMap<OnnxParameter, Object> onnxInputs() {
29615             return onnxInputs(SCHEMA, List.of(X()));
29616         }
29617 
29618         public Value X() {
29619             return operands().get(0);
29620         }
29621 
29622         public java.util.Optional<long[]> classlabels_int64s() {
29623             long[] classlabels_int64s = Attribute.classlabels_int64s.access(long[].class, onnxAttributes);
29624             return java.util.Optional.ofNullable(classlabels_int64s).map(long[]::clone);
29625         }
29626 
29627         public java.util.Optional<long[]> class_ids() {
29628             long[] class_ids = Attribute.class_ids.access(long[].class, onnxAttributes);
29629             return java.util.Optional.ofNullable(class_ids).map(long[]::clone);
29630         }
29631 
29632         public java.util.Optional<float[]> nodes_hitrates() {
29633             float[] nodes_hitrates = Attribute.nodes_hitrates.access(float[].class, onnxAttributes);
29634             return java.util.Optional.ofNullable(nodes_hitrates).map(float[]::clone);
29635         }
29636 
29637         public java.util.Optional<long[]> nodes_featureids() {
29638             long[] nodes_featureids = Attribute.nodes_featureids.access(long[].class, onnxAttributes);
29639             return java.util.Optional.ofNullable(nodes_featureids).map(long[]::clone);
29640         }
29641 
29642         public java.util.Optional<long[]> nodes_treeids() {
29643             long[] nodes_treeids = Attribute.nodes_treeids.access(long[].class, onnxAttributes);
29644             return java.util.Optional.ofNullable(nodes_treeids).map(long[]::clone);
29645         }
29646 
29647         public java.util.Optional<Tensor> class_weights_as_tensor() {
29648             Tensor class_weights_as_tensor = Attribute.class_weights_as_tensor.access(Tensor.class, onnxAttributes);
29649             return java.util.Optional.ofNullable(class_weights_as_tensor);
29650         }
29651 
29652         public java.util.Optional<String> post_transform() {
29653             String post_transform = Attribute.post_transform.access(String.class, onnxAttributes);
29654             return java.util.Optional.ofNullable(post_transform);
29655         }
29656 
29657         public java.util.Optional<String[]> nodes_modes() {
29658             String[] nodes_modes = Attribute.nodes_modes.access(String[].class, onnxAttributes);
29659             return java.util.Optional.ofNullable(nodes_modes).map(String[]::clone);
29660         }
29661 
29662         public java.util.Optional<long[]> nodes_falsenodeids() {
29663             long[] nodes_falsenodeids = Attribute.nodes_falsenodeids.access(long[].class, onnxAttributes);
29664             return java.util.Optional.ofNullable(nodes_falsenodeids).map(long[]::clone);
29665         }
29666 
29667         public java.util.Optional<String[]> classlabels_strings() {
29668             String[] classlabels_strings = Attribute.classlabels_strings.access(String[].class, onnxAttributes);
29669             return java.util.Optional.ofNullable(classlabels_strings).map(String[]::clone);
29670         }
29671 
29672         public java.util.Optional<long[]> nodes_truenodeids() {
29673             long[] nodes_truenodeids = Attribute.nodes_truenodeids.access(long[].class, onnxAttributes);
29674             return java.util.Optional.ofNullable(nodes_truenodeids).map(long[]::clone);
29675         }
29676 
29677         public java.util.Optional<long[]> nodes_nodeids() {
29678             long[] nodes_nodeids = Attribute.nodes_nodeids.access(long[].class, onnxAttributes);
29679             return java.util.Optional.ofNullable(nodes_nodeids).map(long[]::clone);
29680         }
29681 
29682         public java.util.Optional<Tensor> nodes_hitrates_as_tensor() {
29683             Tensor nodes_hitrates_as_tensor = Attribute.nodes_hitrates_as_tensor.access(Tensor.class, onnxAttributes);
29684             return java.util.Optional.ofNullable(nodes_hitrates_as_tensor);
29685         }
29686 
29687         public java.util.Optional<float[]> class_weights() {
29688             float[] class_weights = Attribute.class_weights.access(float[].class, onnxAttributes);
29689             return java.util.Optional.ofNullable(class_weights).map(float[]::clone);
29690         }
29691 
29692         public java.util.Optional<Tensor> base_values_as_tensor() {
29693             Tensor base_values_as_tensor = Attribute.base_values_as_tensor.access(Tensor.class, onnxAttributes);
29694             return java.util.Optional.ofNullable(base_values_as_tensor);
29695         }
29696 
29697         public java.util.Optional<long[]> nodes_missing_value_tracks_true() {
29698             long[] nodes_missing_value_tracks_true = Attribute.nodes_missing_value_tracks_true.access(long[].class, onnxAttributes);
29699             return java.util.Optional.ofNullable(nodes_missing_value_tracks_true).map(long[]::clone);
29700         }
29701 
29702         public java.util.Optional<long[]> class_nodeids() {
29703             long[] class_nodeids = Attribute.class_nodeids.access(long[].class, onnxAttributes);
29704             return java.util.Optional.ofNullable(class_nodeids).map(long[]::clone);
29705         }
29706 
29707         public java.util.Optional<long[]> class_treeids() {
29708             long[] class_treeids = Attribute.class_treeids.access(long[].class, onnxAttributes);
29709             return java.util.Optional.ofNullable(class_treeids).map(long[]::clone);
29710         }
29711 
29712         public java.util.Optional<float[]> base_values() {
29713             float[] base_values = Attribute.base_values.access(float[].class, onnxAttributes);
29714             return java.util.Optional.ofNullable(base_values).map(float[]::clone);
29715         }
29716 
29717         public java.util.Optional<float[]> nodes_values() {
29718             float[] nodes_values = Attribute.nodes_values.access(float[].class, onnxAttributes);
29719             return java.util.Optional.ofNullable(nodes_values).map(float[]::clone);
29720         }
29721 
29722         public java.util.Optional<Tensor> nodes_values_as_tensor() {
29723             Tensor nodes_values_as_tensor = Attribute.nodes_values_as_tensor.access(Tensor.class, onnxAttributes);
29724             return java.util.Optional.ofNullable(nodes_values_as_tensor);
29725         }
29726 
29727     }
29728 
29729     public static TreeEnsembleClassifier TreeEnsembleClassifier(TypeElement resultType, Value X, java.util.Optional<long[]> classlabels_int64s, java.util.Optional<long[]> class_ids, java.util.Optional<float[]> nodes_hitrates, java.util.Optional<long[]> nodes_featureids, java.util.Optional<long[]> nodes_treeids, java.util.Optional<Tensor> class_weights_as_tensor, java.util.Optional<String> post_transform, java.util.Optional<String[]> nodes_modes, java.util.Optional<long[]> nodes_falsenodeids, java.util.Optional<String[]> classlabels_strings, java.util.Optional<long[]> nodes_truenodeids, java.util.Optional<long[]> nodes_nodeids, java.util.Optional<Tensor> nodes_hitrates_as_tensor, java.util.Optional<float[]> class_weights, java.util.Optional<Tensor> base_values_as_tensor, java.util.Optional<long[]> nodes_missing_value_tracks_true, java.util.Optional<long[]> class_nodeids, java.util.Optional<long[]> class_treeids, java.util.Optional<float[]> base_values, java.util.Optional<float[]> nodes_values, java.util.Optional<Tensor> nodes_values_as_tensor) {
29730         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);
29731     }
29732 
29733     @OpFactoryHelper.OpDeclaration(TreeEnsembleRegressor.NAME)
29734     public static final class TreeEnsembleRegressor extends OnnxOp {
29735         public static final String NAME = "TreeEnsembleRegressor";
29736 
29737         public enum Attribute implements OnnxAttribute {
29738             aggregate_function(String.class, true, "SUM"),
29739             nodes_hitrates(float[].class, true, null),
29740             target_weights_as_tensor(Tensor.class, true, null),
29741             nodes_featureids(long[].class, true, null),
29742             target_treeids(long[].class, true, null),
29743             nodes_treeids(long[].class, true, null),
29744             post_transform(String.class, true, "NONE"),
29745             nodes_modes(String[].class, true, null),
29746             target_weights(float[].class, true, null),
29747             nodes_falsenodeids(long[].class, true, null),
29748             target_ids(long[].class, true, null),
29749             nodes_truenodeids(long[].class, true, null),
29750             target_nodeids(long[].class, true, null),
29751             nodes_nodeids(long[].class, true, null),
29752             nodes_hitrates_as_tensor(Tensor.class, true, null),
29753             base_values_as_tensor(Tensor.class, true, null),
29754             n_targets(Long.class, true, null),
29755             nodes_missing_value_tracks_true(long[].class, true, null),
29756             base_values(float[].class, true, null),
29757             nodes_values(float[].class, true, null),
29758             nodes_values_as_tensor(Tensor.class, true, null),
29759             ;
29760 
29761                 final Class<?> t;
29762                 final boolean optional;
29763                 final Object defaultValue;
29764 
29765                 Attribute(Class<?> type, boolean optional, Object defaultValue) {
29766                     this.t = type;
29767                     this.optional = optional;
29768                     this.defaultValue = defaultValue;
29769                     assert optional || defaultValue == null;
29770                 }
29771 
29772                 public Class<?> type() {
29773                     return t;
29774                 }
29775 
29776                 public boolean isOptional() {
29777                     return optional;
29778                 }
29779 
29780                 public Object defaultValue() {
29781                     return defaultValue;
29782                 }
29783         }
29784 
29785         public enum TypeConstraint implements OnnxTypeConstraint {
29786             T(new OnnxType.TypeVariable("T", List.of(OnnxType.tensor(OnnxType.float32()), OnnxType.tensor(OnnxType.float64()), OnnxType.tensor(OnnxType.int64()), OnnxType.tensor(OnnxType.int32())))),
29787             ;
29788 
29789             final OnnxType.TypeVariable typeVariable;
29790 
29791             TypeConstraint(OnnxType.TypeVariable typeVariable) {
29792                 assert typeVariable.name().equals(name());
29793                 this.typeVariable = typeVariable;
29794             }
29795 
29796             @Override
29797             public OnnxType.TypeVariable typeVariable() {
29798                 return typeVariable;
29799             }
29800         }
29801 
29802         public enum InputParameter implements OnnxParameter {
29803             X(TypeConstraint.T.typeVariable(), Quantifier.REQUIRED),
29804             ;
29805 
29806             final OnnxType type;
29807             final Quantifier quantifier;
29808 
29809             InputParameter(OnnxType type, Quantifier quantifier) {
29810                 this.type = type;
29811                 this.quantifier = quantifier;
29812             }
29813 
29814             @Override
29815             public OnnxType type() {
29816                 return type;
29817             }
29818 
29819             @Override
29820             public Quantifier quantifier() {
29821                 return quantifier;
29822             }
29823         }
29824 
29825         public enum OutputParameter implements OnnxParameter {
29826             Y(OnnxType.tensor(OnnxType.float32()), Quantifier.REQUIRED),
29827             ;
29828 
29829             final OnnxType type;
29830             final Quantifier quantifier;
29831 
29832             OutputParameter(OnnxType type, Quantifier quantifier) {
29833                 this.type = type;
29834                 this.quantifier = quantifier;
29835             }
29836 
29837             @Override
29838             public OnnxType type() {
29839                 return type;
29840             }
29841 
29842             @Override
29843             public Quantifier quantifier() {
29844                 return quantifier;
29845             }
29846         }
29847 
29848         public static final OnnxSchema SCHEMA = new OnnxSchemaRecord(
29849                 NAME,
29850                 List.of(Attribute.values()),
29851                 List.of(TypeConstraint.values()),
29852                 List.of(InputParameter.values()),
29853                 List.of(OutputParameter.values())
29854         );
29855 
29856         public TreeEnsembleRegressor(ExternalizedOp def) {
29857             super(SCHEMA, def);
29858         }
29859 
29860         TreeEnsembleRegressor(TreeEnsembleRegressor that, CopyContext cc) {
29861             super(that, cc);
29862         }
29863 
29864         @Override
29865         public TreeEnsembleRegressor transform(CopyContext cc, OpTransformer ot) {
29866             return new TreeEnsembleRegressor(this, cc);
29867         }
29868 
29869         TreeEnsembleRegressor(TypeElement resultType, Value X, java.util.Optional<String> aggregate_function, java.util.Optional<float[]> nodes_hitrates, java.util.Optional<Tensor> target_weights_as_tensor, java.util.Optional<long[]> nodes_featureids, java.util.Optional<long[]> target_treeids, java.util.Optional<long[]> nodes_treeids, java.util.Optional<String> post_transform, java.util.Optional<String[]> nodes_modes, java.util.Optional<float[]> target_weights, java.util.Optional<long[]> nodes_falsenodeids, java.util.Optional<long[]> target_ids, java.util.Optional<long[]> nodes_truenodeids, java.util.Optional<long[]> target_nodeids, java.util.Optional<long[]> nodes_nodeids, java.util.Optional<Tensor> nodes_hitrates_as_tensor, java.util.Optional<Tensor> base_values_as_tensor, java.util.Optional<Long> n_targets, java.util.Optional<long[]> nodes_missing_value_tracks_true, java.util.Optional<float[]> base_values, java.util.Optional<float[]> nodes_values, java.util.Optional<Tensor> nodes_values_as_tensor) {
29870             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));
29871         }
29872 
29873         @Override
29874         public SequencedSet<OnnxParameter> onnxOutputs() {
29875             return onnxOutputs(SCHEMA);
29876         }
29877 
29878         @Override
29879         public SequencedMap<OnnxParameter, Object> onnxInputs() {
29880             return onnxInputs(SCHEMA, List.of(X()));
29881         }
29882 
29883         public Value X() {
29884             return operands().get(0);
29885         }
29886 
29887         public java.util.Optional<String> aggregate_function() {
29888             String aggregate_function = Attribute.aggregate_function.access(String.class, onnxAttributes);
29889             return java.util.Optional.ofNullable(aggregate_function);
29890         }
29891 
29892         public java.util.Optional<float[]> nodes_hitrates() {
29893             float[] nodes_hitrates = Attribute.nodes_hitrates.access(float[].class, onnxAttributes);
29894             return java.util.Optional.ofNullable(nodes_hitrates).map(float[]::clone);
29895         }
29896 
29897         public java.util.Optional<Tensor> target_weights_as_tensor() {
29898             Tensor target_weights_as_tensor = Attribute.target_weights_as_tensor.access(Tensor.class, onnxAttributes);
29899             return java.util.Optional.ofNullable(target_weights_as_tensor);
29900         }
29901 
29902         public java.util.Optional<long[]> nodes_featureids() {
29903             long[] nodes_featureids = Attribute.nodes_featureids.access(long[].class, onnxAttributes);
29904             return java.util.Optional.ofNullable(nodes_featureids).map(long[]::clone);
29905         }
29906 
29907         public java.util.Optional<long[]> target_treeids() {
29908             long[] target_treeids = Attribute.target_treeids.access(long[].class, onnxAttributes);
29909             return java.util.Optional.ofNullable(target_treeids).map(long[]::clone);
29910         }
29911 
29912         public java.util.Optional<long[]> nodes_treeids() {
29913             long[] nodes_treeids = Attribute.nodes_treeids.access(long[].class, onnxAttributes);
29914             return java.util.Optional.ofNullable(nodes_treeids).map(long[]::clone);
29915         }
29916 
29917         public java.util.Optional<String> post_transform() {
29918             String post_transform = Attribute.post_transform.access(String.class, onnxAttributes);
29919             return java.util.Optional.ofNullable(post_transform);
29920         }
29921 
29922         public java.util.Optional<String[]> nodes_modes() {
29923             String[] nodes_modes = Attribute.nodes_modes.access(String[].class, onnxAttributes);
29924             return java.util.Optional.ofNullable(nodes_modes).map(String[]::clone);
29925         }
29926 
29927         public java.util.Optional<float[]> target_weights() {
29928             float[] target_weights = Attribute.target_weights.access(float[].class, onnxAttributes);
29929             return java.util.Optional.ofNullable(target_weights).map(float[]::clone);
29930         }
29931 
29932         public java.util.Optional<long[]> nodes_falsenodeids() {
29933             long[] nodes_falsenodeids = Attribute.nodes_falsenodeids.access(long[].class, onnxAttributes);
29934             return java.util.Optional.ofNullable(nodes_falsenodeids).map(long[]::clone);
29935         }
29936 
29937         public java.util.Optional<long[]> target_ids() {
29938             long[] target_ids = Attribute.target_ids.access(long[].class, onnxAttributes);
29939             return java.util.Optional.ofNullable(target_ids).map(long[]::clone);
29940         }
29941 
29942         public java.util.Optional<long[]> nodes_truenodeids() {
29943             long[] nodes_truenodeids = Attribute.nodes_truenodeids.access(long[].class, onnxAttributes);
29944             return java.util.Optional.ofNullable(nodes_truenodeids).map(long[]::clone);
29945         }
29946 
29947         public java.util.Optional<long[]> target_nodeids() {
29948             long[] target_nodeids = Attribute.target_nodeids.access(long[].class, onnxAttributes);
29949             return java.util.Optional.ofNullable(target_nodeids).map(long[]::clone);
29950         }
29951 
29952         public java.util.Optional<long[]> nodes_nodeids() {
29953             long[] nodes_nodeids = Attribute.nodes_nodeids.access(long[].class, onnxAttributes);
29954             return java.util.Optional.ofNullable(nodes_nodeids).map(long[]::clone);
29955         }
29956 
29957         public java.util.Optional<Tensor> nodes_hitrates_as_tensor() {
29958             Tensor nodes_hitrates_as_tensor = Attribute.nodes_hitrates_as_tensor.access(Tensor.class, onnxAttributes);
29959             return java.util.Optional.ofNullable(nodes_hitrates_as_tensor);
29960         }
29961 
29962         public java.util.Optional<Tensor> base_values_as_tensor() {
29963             Tensor base_values_as_tensor = Attribute.base_values_as_tensor.access(Tensor.class, onnxAttributes);
29964             return java.util.Optional.ofNullable(base_values_as_tensor);
29965         }
29966 
29967         public java.util.Optional<Long> n_targets() {
29968             Long n_targets = Attribute.n_targets.access(Long.class, onnxAttributes);
29969             return java.util.Optional.ofNullable(n_targets);
29970         }
29971 
29972         public java.util.Optional<long[]> nodes_missing_value_tracks_true() {
29973             long[] nodes_missing_value_tracks_true = Attribute.nodes_missing_value_tracks_true.access(long[].class, onnxAttributes);
29974             return java.util.Optional.ofNullable(nodes_missing_value_tracks_true).map(long[]::clone);
29975         }
29976 
29977         public java.util.Optional<float[]> base_values() {
29978             float[] base_values = Attribute.base_values.access(float[].class, onnxAttributes);
29979             return java.util.Optional.ofNullable(base_values).map(float[]::clone);
29980         }
29981 
29982         public java.util.Optional<float[]> nodes_values() {
29983             float[] nodes_values = Attribute.nodes_values.access(float[].class, onnxAttributes);
29984             return java.util.Optional.ofNullable(nodes_values).map(float[]::clone);
29985         }
29986 
29987         public java.util.Optional<Tensor> nodes_values_as_tensor() {
29988             Tensor nodes_values_as_tensor = Attribute.nodes_values_as_tensor.access(Tensor.class, onnxAttributes);
29989             return java.util.Optional.ofNullable(nodes_values_as_tensor);
29990         }
29991 
29992     }
29993 
29994     public static TreeEnsembleRegressor TreeEnsembleRegressor(TypeElement resultType, Value X, java.util.Optional<String> aggregate_function, java.util.Optional<float[]> nodes_hitrates, java.util.Optional<Tensor> target_weights_as_tensor, java.util.Optional<long[]> nodes_featureids, java.util.Optional<long[]> target_treeids, java.util.Optional<long[]> nodes_treeids, java.util.Optional<String> post_transform, java.util.Optional<String[]> nodes_modes, java.util.Optional<float[]> target_weights, java.util.Optional<long[]> nodes_falsenodeids, java.util.Optional<long[]> target_ids, java.util.Optional<long[]> nodes_truenodeids, java.util.Optional<long[]> target_nodeids, java.util.Optional<long[]> nodes_nodeids, java.util.Optional<Tensor> nodes_hitrates_as_tensor, java.util.Optional<Tensor> base_values_as_tensor, java.util.Optional<Long> n_targets, java.util.Optional<long[]> nodes_missing_value_tracks_true, java.util.Optional<float[]> base_values, java.util.Optional<float[]> nodes_values, java.util.Optional<Tensor> nodes_values_as_tensor) {
29995         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);
29996     }
29997 
29998     @OpFactoryHelper.OpDeclaration(Trilu.NAME)
29999     public static final class Trilu extends OnnxOp {
30000         public static final String NAME = "Trilu";
30001 
30002         public enum Attribute implements OnnxAttribute {
30003             upper(Long.class, true, 1),
30004             ;
30005 
30006                 final Class<?> t;
30007                 final boolean optional;
30008                 final Object defaultValue;
30009 
30010                 Attribute(Class<?> type, boolean optional, Object defaultValue) {
30011                     this.t = type;
30012                     this.optional = optional;
30013                     this.defaultValue = defaultValue;
30014                     assert optional || defaultValue == null;
30015                 }
30016 
30017                 public Class<?> type() {
30018                     return t;
30019                 }
30020 
30021                 public boolean isOptional() {
30022                     return optional;
30023                 }
30024 
30025                 public Object defaultValue() {
30026                     return defaultValue;
30027                 }
30028         }
30029 
30030         public enum TypeConstraint implements OnnxTypeConstraint {
30031             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())))),
30032             ;
30033 
30034             final OnnxType.TypeVariable typeVariable;
30035 
30036             TypeConstraint(OnnxType.TypeVariable typeVariable) {
30037                 assert typeVariable.name().equals(name());
30038                 this.typeVariable = typeVariable;
30039             }
30040 
30041             @Override
30042             public OnnxType.TypeVariable typeVariable() {
30043                 return typeVariable;
30044             }
30045         }
30046 
30047         public enum InputParameter implements OnnxParameter {
30048             input(TypeConstraint.T.typeVariable(), Quantifier.REQUIRED),
30049             k(OnnxType.tensor(OnnxType.int64()), Quantifier.OPTIONAL),
30050             ;
30051 
30052             final OnnxType type;
30053             final Quantifier quantifier;
30054 
30055             InputParameter(OnnxType type, Quantifier quantifier) {
30056                 this.type = type;
30057                 this.quantifier = quantifier;
30058             }
30059 
30060             @Override
30061             public OnnxType type() {
30062                 return type;
30063             }
30064 
30065             @Override
30066             public Quantifier quantifier() {
30067                 return quantifier;
30068             }
30069         }
30070 
30071         public enum OutputParameter implements OnnxParameter {
30072             output(TypeConstraint.T.typeVariable(), Quantifier.REQUIRED),
30073             ;
30074 
30075             final OnnxType type;
30076             final Quantifier quantifier;
30077 
30078             OutputParameter(OnnxType type, Quantifier quantifier) {
30079                 this.type = type;
30080                 this.quantifier = quantifier;
30081             }
30082 
30083             @Override
30084             public OnnxType type() {
30085                 return type;
30086             }
30087 
30088             @Override
30089             public Quantifier quantifier() {
30090                 return quantifier;
30091             }
30092         }
30093 
30094         public static final OnnxSchema SCHEMA = new OnnxSchemaRecord(
30095                 NAME,
30096                 List.of(Attribute.values()),
30097                 List.of(TypeConstraint.values()),
30098                 List.of(InputParameter.values()),
30099                 List.of(OutputParameter.values())
30100         );
30101 
30102         public Trilu(ExternalizedOp def) {
30103             super(SCHEMA, def);
30104         }
30105 
30106         Trilu(Trilu that, CopyContext cc) {
30107             super(that, cc);
30108         }
30109 
30110         @Override
30111         public Trilu transform(CopyContext cc, OpTransformer ot) {
30112             return new Trilu(this, cc);
30113         }
30114 
30115         Trilu(TypeElement resultType, Value input, java.util.Optional<Value> k, java.util.Optional<Long> upper) {
30116             super(SCHEMA, resultType, Set.of(), List.of(input, k), List.of(upper));
30117         }
30118 
30119         @Override
30120         public SequencedSet<OnnxParameter> onnxOutputs() {
30121             return onnxOutputs(SCHEMA);
30122         }
30123 
30124         @Override
30125         public SequencedMap<OnnxParameter, Object> onnxInputs() {
30126             return onnxInputs(SCHEMA, List.of(input(), k()));
30127         }
30128 
30129         public Value input() {
30130             return operands().get(0);
30131         }
30132 
30133         public java.util.Optional<Value> k() {
30134             int i = optionalInputArguments.indexOf(InputParameter.k);
30135             return i != -1 ? java.util.Optional.of(operands().get(1 + i)) : java.util.Optional.empty();
30136         }
30137 
30138         public java.util.Optional<Long> upper() {
30139             Long upper = Attribute.upper.access(Long.class, onnxAttributes);
30140             return java.util.Optional.ofNullable(upper);
30141         }
30142 
30143     }
30144 
30145     public static Trilu Trilu(TypeElement resultType, Value input, java.util.Optional<Value> k, java.util.Optional<Long> upper) {
30146         return new Trilu(resultType, input, k, upper);
30147     }
30148 
30149     @OpFactoryHelper.OpDeclaration(Unique.NAME)
30150     public static final class Unique extends OnnxOp {
30151         public static final String NAME = "Unique";
30152 
30153         public enum Attribute implements OnnxAttribute {
30154             sorted(Long.class, true, 1),
30155             axis(Long.class, true, null),
30156             ;
30157 
30158                 final Class<?> t;
30159                 final boolean optional;
30160                 final Object defaultValue;
30161 
30162                 Attribute(Class<?> type, boolean optional, Object defaultValue) {
30163                     this.t = type;
30164                     this.optional = optional;
30165                     this.defaultValue = defaultValue;
30166                     assert optional || defaultValue == null;
30167                 }
30168 
30169                 public Class<?> type() {
30170                     return t;
30171                 }
30172 
30173                 public boolean isOptional() {
30174                     return optional;
30175                 }
30176 
30177                 public Object defaultValue() {
30178                     return defaultValue;
30179                 }
30180         }
30181 
30182         public enum TypeConstraint implements OnnxTypeConstraint {
30183             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())))),
30184             ;
30185 
30186             final OnnxType.TypeVariable typeVariable;
30187 
30188             TypeConstraint(OnnxType.TypeVariable typeVariable) {
30189                 assert typeVariable.name().equals(name());
30190                 this.typeVariable = typeVariable;
30191             }
30192 
30193             @Override
30194             public OnnxType.TypeVariable typeVariable() {
30195                 return typeVariable;
30196             }
30197         }
30198 
30199         public enum InputParameter implements OnnxParameter {
30200             X(TypeConstraint.T.typeVariable(), Quantifier.REQUIRED),
30201             ;
30202 
30203             final OnnxType type;
30204             final Quantifier quantifier;
30205 
30206             InputParameter(OnnxType type, Quantifier quantifier) {
30207                 this.type = type;
30208                 this.quantifier = quantifier;
30209             }
30210 
30211             @Override
30212             public OnnxType type() {
30213                 return type;
30214             }
30215 
30216             @Override
30217             public Quantifier quantifier() {
30218                 return quantifier;
30219             }
30220         }
30221 
30222         public enum OutputParameter implements OnnxParameter {
30223             Y(TypeConstraint.T.typeVariable(), Quantifier.REQUIRED),
30224             indices(OnnxType.tensor(OnnxType.int64()), Quantifier.OPTIONAL),
30225             inverse_indices(OnnxType.tensor(OnnxType.int64()), Quantifier.OPTIONAL),
30226             counts(OnnxType.tensor(OnnxType.int64()), Quantifier.OPTIONAL),
30227             ;
30228 
30229             final OnnxType type;
30230             final Quantifier quantifier;
30231 
30232             OutputParameter(OnnxType type, Quantifier quantifier) {
30233                 this.type = type;
30234                 this.quantifier = quantifier;
30235             }
30236 
30237             @Override
30238             public OnnxType type() {
30239                 return type;
30240             }
30241 
30242             @Override
30243             public Quantifier quantifier() {
30244                 return quantifier;
30245             }
30246         }
30247 
30248         public static final OnnxSchema SCHEMA = new OnnxSchemaRecord(
30249                 NAME,
30250                 List.of(Attribute.values()),
30251                 List.of(TypeConstraint.values()),
30252                 List.of(InputParameter.values()),
30253                 List.of(OutputParameter.values())
30254         );
30255 
30256         public Unique(ExternalizedOp def) {
30257             super(SCHEMA, def);
30258         }
30259 
30260         Unique(Unique that, CopyContext cc) {
30261             super(that, cc);
30262         }
30263 
30264         @Override
30265         public Unique transform(CopyContext cc, OpTransformer ot) {
30266             return new Unique(this, cc);
30267         }
30268 
30269         Unique(TypeElement resultType, Set<OutputParameter> optionalOutputs, Value X, java.util.Optional<Long> sorted, java.util.Optional<Long> axis) {
30270             super(SCHEMA, resultType, optionalOutputs, List.of(X), List.of(sorted, axis));
30271         }
30272 
30273         @Override
30274         public SequencedSet<OnnxParameter> onnxOutputs() {
30275             return onnxOutputs(SCHEMA);
30276         }
30277 
30278         @Override
30279         public SequencedMap<OnnxParameter, Object> onnxInputs() {
30280             return onnxInputs(SCHEMA, List.of(X()));
30281         }
30282 
30283         public Value X() {
30284             return operands().get(0);
30285         }
30286 
30287         public java.util.Optional<Long> sorted() {
30288             Long sorted = Attribute.sorted.access(Long.class, onnxAttributes);
30289             return java.util.Optional.ofNullable(sorted);
30290         }
30291 
30292         public java.util.Optional<Long> axis() {
30293             Long axis = Attribute.axis.access(Long.class, onnxAttributes);
30294             return java.util.Optional.ofNullable(axis);
30295         }
30296 
30297     }
30298 
30299     public static Unique Unique(TypeElement resultType, Set<Unique.OutputParameter> optionalOutputs, Value X, java.util.Optional<Long> sorted, java.util.Optional<Long> axis) {
30300         return new Unique(resultType, optionalOutputs, X, sorted, axis);
30301     }
30302 
30303     @OpFactoryHelper.OpDeclaration(Unsqueeze.NAME)
30304     public static final class Unsqueeze extends OnnxOp {
30305         public static final String NAME = "Unsqueeze";
30306 
30307         public enum Attribute implements OnnxAttribute.None { }
30308 
30309         public enum TypeConstraint implements OnnxTypeConstraint {
30310             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())))),
30311             ;
30312 
30313             final OnnxType.TypeVariable typeVariable;
30314 
30315             TypeConstraint(OnnxType.TypeVariable typeVariable) {
30316                 assert typeVariable.name().equals(name());
30317                 this.typeVariable = typeVariable;
30318             }
30319 
30320             @Override
30321             public OnnxType.TypeVariable typeVariable() {
30322                 return typeVariable;
30323             }
30324         }
30325 
30326         public enum InputParameter implements OnnxParameter {
30327             data(TypeConstraint.T.typeVariable(), Quantifier.REQUIRED),
30328             axes(OnnxType.tensor(OnnxType.int64()), Quantifier.REQUIRED),
30329             ;
30330 
30331             final OnnxType type;
30332             final Quantifier quantifier;
30333 
30334             InputParameter(OnnxType type, Quantifier quantifier) {
30335                 this.type = type;
30336                 this.quantifier = quantifier;
30337             }
30338 
30339             @Override
30340             public OnnxType type() {
30341                 return type;
30342             }
30343 
30344             @Override
30345             public Quantifier quantifier() {
30346                 return quantifier;
30347             }
30348         }
30349 
30350         public enum OutputParameter implements OnnxParameter {
30351             expanded(TypeConstraint.T.typeVariable(), Quantifier.REQUIRED),
30352             ;
30353 
30354             final OnnxType type;
30355             final Quantifier quantifier;
30356 
30357             OutputParameter(OnnxType type, Quantifier quantifier) {
30358                 this.type = type;
30359                 this.quantifier = quantifier;
30360             }
30361 
30362             @Override
30363             public OnnxType type() {
30364                 return type;
30365             }
30366 
30367             @Override
30368             public Quantifier quantifier() {
30369                 return quantifier;
30370             }
30371         }
30372 
30373         public static final OnnxSchema SCHEMA = new OnnxSchemaRecord(
30374                 NAME,
30375                 List.of(Attribute.values()),
30376                 List.of(TypeConstraint.values()),
30377                 List.of(InputParameter.values()),
30378                 List.of(OutputParameter.values())
30379         );
30380 
30381         public Unsqueeze(ExternalizedOp def) {
30382             super(SCHEMA, def);
30383         }
30384 
30385         Unsqueeze(Unsqueeze that, CopyContext cc) {
30386             super(that, cc);
30387         }
30388 
30389         @Override
30390         public Unsqueeze transform(CopyContext cc, OpTransformer ot) {
30391             return new Unsqueeze(this, cc);
30392         }
30393 
30394         Unsqueeze(TypeElement resultType, Value data, Value axes) {
30395             super(SCHEMA, resultType, Set.of(), List.of(data, axes), List.of());
30396         }
30397 
30398         @Override
30399         public SequencedSet<OnnxParameter> onnxOutputs() {
30400             return onnxOutputs(SCHEMA);
30401         }
30402 
30403         @Override
30404         public SequencedMap<OnnxParameter, Object> onnxInputs() {
30405             return onnxInputs(SCHEMA, List.of(data(), axes()));
30406         }
30407 
30408         public Value data() {
30409             return operands().get(0);
30410         }
30411 
30412         public Value axes() {
30413             return operands().get(1);
30414         }
30415 
30416     }
30417 
30418     public static Unsqueeze Unsqueeze(TypeElement resultType, Value data, Value axes) {
30419         return new Unsqueeze(resultType, data, axes);
30420     }
30421 
30422     @OpFactoryHelper.OpDeclaration(Upsample.NAME)
30423     public static final class Upsample extends OnnxOp {
30424         public static final String NAME = "Upsample";
30425 
30426         public enum Attribute implements OnnxAttribute {
30427             mode(String.class, true, "nearest"),
30428             ;
30429 
30430                 final Class<?> t;
30431                 final boolean optional;
30432                 final Object defaultValue;
30433 
30434                 Attribute(Class<?> type, boolean optional, Object defaultValue) {
30435                     this.t = type;
30436                     this.optional = optional;
30437                     this.defaultValue = defaultValue;
30438                     assert optional || defaultValue == null;
30439                 }
30440 
30441                 public Class<?> type() {
30442                     return t;
30443                 }
30444 
30445                 public boolean isOptional() {
30446                     return optional;
30447                 }
30448 
30449                 public Object defaultValue() {
30450                     return defaultValue;
30451                 }
30452         }
30453 
30454         public enum TypeConstraint implements OnnxTypeConstraint {
30455             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())))),
30456             ;
30457 
30458             final OnnxType.TypeVariable typeVariable;
30459 
30460             TypeConstraint(OnnxType.TypeVariable typeVariable) {
30461                 assert typeVariable.name().equals(name());
30462                 this.typeVariable = typeVariable;
30463             }
30464 
30465             @Override
30466             public OnnxType.TypeVariable typeVariable() {
30467                 return typeVariable;
30468             }
30469         }
30470 
30471         public enum InputParameter implements OnnxParameter {
30472             X(TypeConstraint.T.typeVariable(), Quantifier.REQUIRED),
30473             scales(OnnxType.tensor(OnnxType.float32()), Quantifier.REQUIRED),
30474             ;
30475 
30476             final OnnxType type;
30477             final Quantifier quantifier;
30478 
30479             InputParameter(OnnxType type, Quantifier quantifier) {
30480                 this.type = type;
30481                 this.quantifier = quantifier;
30482             }
30483 
30484             @Override
30485             public OnnxType type() {
30486                 return type;
30487             }
30488 
30489             @Override
30490             public Quantifier quantifier() {
30491                 return quantifier;
30492             }
30493         }
30494 
30495         public enum OutputParameter implements OnnxParameter {
30496             Y(TypeConstraint.T.typeVariable(), Quantifier.REQUIRED),
30497             ;
30498 
30499             final OnnxType type;
30500             final Quantifier quantifier;
30501 
30502             OutputParameter(OnnxType type, Quantifier quantifier) {
30503                 this.type = type;
30504                 this.quantifier = quantifier;
30505             }
30506 
30507             @Override
30508             public OnnxType type() {
30509                 return type;
30510             }
30511 
30512             @Override
30513             public Quantifier quantifier() {
30514                 return quantifier;
30515             }
30516         }
30517 
30518         public static final OnnxSchema SCHEMA = new OnnxSchemaRecord(
30519                 NAME,
30520                 List.of(Attribute.values()),
30521                 List.of(TypeConstraint.values()),
30522                 List.of(InputParameter.values()),
30523                 List.of(OutputParameter.values())
30524         );
30525 
30526         public Upsample(ExternalizedOp def) {
30527             super(SCHEMA, def);
30528         }
30529 
30530         Upsample(Upsample that, CopyContext cc) {
30531             super(that, cc);
30532         }
30533 
30534         @Override
30535         public Upsample transform(CopyContext cc, OpTransformer ot) {
30536             return new Upsample(this, cc);
30537         }
30538 
30539         Upsample(TypeElement resultType, Value X, Value scales, java.util.Optional<String> mode) {
30540             super(SCHEMA, resultType, Set.of(), List.of(X, scales), List.of(mode));
30541         }
30542 
30543         @Override
30544         public SequencedSet<OnnxParameter> onnxOutputs() {
30545             return onnxOutputs(SCHEMA);
30546         }
30547 
30548         @Override
30549         public SequencedMap<OnnxParameter, Object> onnxInputs() {
30550             return onnxInputs(SCHEMA, List.of(X(), scales()));
30551         }
30552 
30553         public Value X() {
30554             return operands().get(0);
30555         }
30556 
30557         public Value scales() {
30558             return operands().get(1);
30559         }
30560 
30561         public java.util.Optional<String> mode() {
30562             String mode = Attribute.mode.access(String.class, onnxAttributes);
30563             return java.util.Optional.ofNullable(mode);
30564         }
30565 
30566     }
30567 
30568     public static Upsample Upsample(TypeElement resultType, Value X, Value scales, java.util.Optional<String> mode) {
30569         return new Upsample(resultType, X, scales, mode);
30570     }
30571 
30572     @OpFactoryHelper.OpDeclaration(Where.NAME)
30573     public static final class Where extends OnnxOp {
30574         public static final String NAME = "Where";
30575 
30576         public enum Attribute implements OnnxAttribute.None { }
30577 
30578         public enum TypeConstraint implements OnnxTypeConstraint {
30579             B(new OnnxType.TypeVariable("B", List.of(OnnxType.tensor(OnnxType.bool())))),
30580             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())))),
30581             ;
30582 
30583             final OnnxType.TypeVariable typeVariable;
30584 
30585             TypeConstraint(OnnxType.TypeVariable typeVariable) {
30586                 assert typeVariable.name().equals(name());
30587                 this.typeVariable = typeVariable;
30588             }
30589 
30590             @Override
30591             public OnnxType.TypeVariable typeVariable() {
30592                 return typeVariable;
30593             }
30594         }
30595 
30596         public enum InputParameter implements OnnxParameter {
30597             condition(TypeConstraint.B.typeVariable(), Quantifier.REQUIRED),
30598             X(TypeConstraint.T.typeVariable(), Quantifier.REQUIRED),
30599             Y(TypeConstraint.T.typeVariable(), Quantifier.REQUIRED),
30600             ;
30601 
30602             final OnnxType type;
30603             final Quantifier quantifier;
30604 
30605             InputParameter(OnnxType type, Quantifier quantifier) {
30606                 this.type = type;
30607                 this.quantifier = quantifier;
30608             }
30609 
30610             @Override
30611             public OnnxType type() {
30612                 return type;
30613             }
30614 
30615             @Override
30616             public Quantifier quantifier() {
30617                 return quantifier;
30618             }
30619         }
30620 
30621         public enum OutputParameter implements OnnxParameter {
30622             output(TypeConstraint.T.typeVariable(), Quantifier.REQUIRED),
30623             ;
30624 
30625             final OnnxType type;
30626             final Quantifier quantifier;
30627 
30628             OutputParameter(OnnxType type, Quantifier quantifier) {
30629                 this.type = type;
30630                 this.quantifier = quantifier;
30631             }
30632 
30633             @Override
30634             public OnnxType type() {
30635                 return type;
30636             }
30637 
30638             @Override
30639             public Quantifier quantifier() {
30640                 return quantifier;
30641             }
30642         }
30643 
30644         public static final OnnxSchema SCHEMA = new OnnxSchemaRecord(
30645                 NAME,
30646                 List.of(Attribute.values()),
30647                 List.of(TypeConstraint.values()),
30648                 List.of(InputParameter.values()),
30649                 List.of(OutputParameter.values())
30650         );
30651 
30652         public Where(ExternalizedOp def) {
30653             super(SCHEMA, def);
30654         }
30655 
30656         Where(Where that, CopyContext cc) {
30657             super(that, cc);
30658         }
30659 
30660         @Override
30661         public Where transform(CopyContext cc, OpTransformer ot) {
30662             return new Where(this, cc);
30663         }
30664 
30665         Where(TypeElement resultType, Value condition, Value X, Value Y) {
30666             super(SCHEMA, resultType, Set.of(), List.of(condition, X, Y), List.of());
30667         }
30668 
30669         @Override
30670         public SequencedSet<OnnxParameter> onnxOutputs() {
30671             return onnxOutputs(SCHEMA);
30672         }
30673 
30674         @Override
30675         public SequencedMap<OnnxParameter, Object> onnxInputs() {
30676             return onnxInputs(SCHEMA, List.of(condition(), X(), Y()));
30677         }
30678 
30679         public Value condition() {
30680             return operands().get(0);
30681         }
30682 
30683         public Value X() {
30684             return operands().get(1);
30685         }
30686 
30687         public Value Y() {
30688             return operands().get(2);
30689         }
30690 
30691     }
30692 
30693     public static Where Where(TypeElement resultType, Value condition, Value X, Value Y) {
30694         return new Where(resultType, condition, X, Y);
30695     }
30696 
30697     @OpFactoryHelper.OpDeclaration(Xor.NAME)
30698     public static final class Xor extends OnnxOp {
30699         public static final String NAME = "Xor";
30700 
30701         public enum Attribute implements OnnxAttribute.None { }
30702 
30703         public enum TypeConstraint implements OnnxTypeConstraint {
30704             T(new OnnxType.TypeVariable("T", List.of(OnnxType.tensor(OnnxType.bool())))),
30705             T1(new OnnxType.TypeVariable("T1", List.of(OnnxType.tensor(OnnxType.bool())))),
30706             ;
30707 
30708             final OnnxType.TypeVariable typeVariable;
30709 
30710             TypeConstraint(OnnxType.TypeVariable typeVariable) {
30711                 assert typeVariable.name().equals(name());
30712                 this.typeVariable = typeVariable;
30713             }
30714 
30715             @Override
30716             public OnnxType.TypeVariable typeVariable() {
30717                 return typeVariable;
30718             }
30719         }
30720 
30721         public enum InputParameter implements OnnxParameter {
30722             A(TypeConstraint.T.typeVariable(), Quantifier.REQUIRED),
30723             B(TypeConstraint.T.typeVariable(), Quantifier.REQUIRED),
30724             ;
30725 
30726             final OnnxType type;
30727             final Quantifier quantifier;
30728 
30729             InputParameter(OnnxType type, Quantifier quantifier) {
30730                 this.type = type;
30731                 this.quantifier = quantifier;
30732             }
30733 
30734             @Override
30735             public OnnxType type() {
30736                 return type;
30737             }
30738 
30739             @Override
30740             public Quantifier quantifier() {
30741                 return quantifier;
30742             }
30743         }
30744 
30745         public enum OutputParameter implements OnnxParameter {
30746             C(TypeConstraint.T1.typeVariable(), Quantifier.REQUIRED),
30747             ;
30748 
30749             final OnnxType type;
30750             final Quantifier quantifier;
30751 
30752             OutputParameter(OnnxType type, Quantifier quantifier) {
30753                 this.type = type;
30754                 this.quantifier = quantifier;
30755             }
30756 
30757             @Override
30758             public OnnxType type() {
30759                 return type;
30760             }
30761 
30762             @Override
30763             public Quantifier quantifier() {
30764                 return quantifier;
30765             }
30766         }
30767 
30768         public static final OnnxSchema SCHEMA = new OnnxSchemaRecord(
30769                 NAME,
30770                 List.of(Attribute.values()),
30771                 List.of(TypeConstraint.values()),
30772                 List.of(InputParameter.values()),
30773                 List.of(OutputParameter.values())
30774         );
30775 
30776         public Xor(ExternalizedOp def) {
30777             super(SCHEMA, def);
30778         }
30779 
30780         Xor(Xor that, CopyContext cc) {
30781             super(that, cc);
30782         }
30783 
30784         @Override
30785         public Xor transform(CopyContext cc, OpTransformer ot) {
30786             return new Xor(this, cc);
30787         }
30788 
30789         Xor(TypeElement resultType, Value A, Value B) {
30790             super(SCHEMA, resultType, Set.of(), List.of(A, B), List.of());
30791         }
30792 
30793         @Override
30794         public SequencedSet<OnnxParameter> onnxOutputs() {
30795             return onnxOutputs(SCHEMA);
30796         }
30797 
30798         @Override
30799         public SequencedMap<OnnxParameter, Object> onnxInputs() {
30800             return onnxInputs(SCHEMA, List.of(A(), B()));
30801         }
30802 
30803         public Value A() {
30804             return operands().get(0);
30805         }
30806 
30807         public Value B() {
30808             return operands().get(1);
30809         }
30810 
30811     }
30812 
30813     public static Xor Xor(TypeElement resultType, Value A, Value B) {
30814         return new Xor(resultType, A, B);
30815     }
30816 
30817     @OpFactoryHelper.OpDeclaration(ZipMap.NAME)
30818     public static final class ZipMap extends OnnxOp {
30819         public static final String NAME = "ZipMap";
30820 
30821         public enum Attribute implements OnnxAttribute {
30822             classlabels_int64s(long[].class, true, null),
30823             classlabels_strings(String[].class, true, null),
30824             ;
30825 
30826                 final Class<?> t;
30827                 final boolean optional;
30828                 final Object defaultValue;
30829 
30830                 Attribute(Class<?> type, boolean optional, Object defaultValue) {
30831                     this.t = type;
30832                     this.optional = optional;
30833                     this.defaultValue = defaultValue;
30834                     assert optional || defaultValue == null;
30835                 }
30836 
30837                 public Class<?> type() {
30838                     return t;
30839                 }
30840 
30841                 public boolean isOptional() {
30842                     return optional;
30843                 }
30844 
30845                 public Object defaultValue() {
30846                     return defaultValue;
30847                 }
30848         }
30849 
30850         public enum TypeConstraint implements OnnxTypeConstraint {
30851             T(new OnnxType.TypeVariable("T", List.of(OnnxType.seq(OnnxType.map(OnnxType.string(), OnnxType.float32())), OnnxType.seq(OnnxType.map(OnnxType.int64(), OnnxType.float32()))))),
30852             ;
30853 
30854             final OnnxType.TypeVariable typeVariable;
30855 
30856             TypeConstraint(OnnxType.TypeVariable typeVariable) {
30857                 assert typeVariable.name().equals(name());
30858                 this.typeVariable = typeVariable;
30859             }
30860 
30861             @Override
30862             public OnnxType.TypeVariable typeVariable() {
30863                 return typeVariable;
30864             }
30865         }
30866 
30867         public enum InputParameter implements OnnxParameter {
30868             X(OnnxType.tensor(OnnxType.float32()), Quantifier.REQUIRED),
30869             ;
30870 
30871             final OnnxType type;
30872             final Quantifier quantifier;
30873 
30874             InputParameter(OnnxType type, Quantifier quantifier) {
30875                 this.type = type;
30876                 this.quantifier = quantifier;
30877             }
30878 
30879             @Override
30880             public OnnxType type() {
30881                 return type;
30882             }
30883 
30884             @Override
30885             public Quantifier quantifier() {
30886                 return quantifier;
30887             }
30888         }
30889 
30890         public enum OutputParameter implements OnnxParameter {
30891             Z(TypeConstraint.T.typeVariable(), Quantifier.REQUIRED),
30892             ;
30893 
30894             final OnnxType type;
30895             final Quantifier quantifier;
30896 
30897             OutputParameter(OnnxType type, Quantifier quantifier) {
30898                 this.type = type;
30899                 this.quantifier = quantifier;
30900             }
30901 
30902             @Override
30903             public OnnxType type() {
30904                 return type;
30905             }
30906 
30907             @Override
30908             public Quantifier quantifier() {
30909                 return quantifier;
30910             }
30911         }
30912 
30913         public static final OnnxSchema SCHEMA = new OnnxSchemaRecord(
30914                 NAME,
30915                 List.of(Attribute.values()),
30916                 List.of(TypeConstraint.values()),
30917                 List.of(InputParameter.values()),
30918                 List.of(OutputParameter.values())
30919         );
30920 
30921         public ZipMap(ExternalizedOp def) {
30922             super(SCHEMA, def);
30923         }
30924 
30925         ZipMap(ZipMap that, CopyContext cc) {
30926             super(that, cc);
30927         }
30928 
30929         @Override
30930         public ZipMap transform(CopyContext cc, OpTransformer ot) {
30931             return new ZipMap(this, cc);
30932         }
30933 
30934         ZipMap(TypeElement resultType, Value X, java.util.Optional<long[]> classlabels_int64s, java.util.Optional<String[]> classlabels_strings) {
30935             super(SCHEMA, resultType, Set.of(), List.of(X), List.of(classlabels_int64s, classlabels_strings));
30936         }
30937 
30938         @Override
30939         public SequencedSet<OnnxParameter> onnxOutputs() {
30940             return onnxOutputs(SCHEMA);
30941         }
30942 
30943         @Override
30944         public SequencedMap<OnnxParameter, Object> onnxInputs() {
30945             return onnxInputs(SCHEMA, List.of(X()));
30946         }
30947 
30948         public Value X() {
30949             return operands().get(0);
30950         }
30951 
30952         public java.util.Optional<long[]> classlabels_int64s() {
30953             long[] classlabels_int64s = Attribute.classlabels_int64s.access(long[].class, onnxAttributes);
30954             return java.util.Optional.ofNullable(classlabels_int64s).map(long[]::clone);
30955         }
30956 
30957         public java.util.Optional<String[]> classlabels_strings() {
30958             String[] classlabels_strings = Attribute.classlabels_strings.access(String[].class, onnxAttributes);
30959             return java.util.Optional.ofNullable(classlabels_strings).map(String[]::clone);
30960         }
30961 
30962     }
30963 
30964     public static ZipMap ZipMap(TypeElement resultType, Value X, java.util.Optional<long[]> classlabels_int64s, java.util.Optional<String[]> classlabels_strings) {
30965         return new ZipMap(resultType, X, classlabels_int64s, classlabels_strings);
30966     }
30967 
30968 }