2
2
# ⚠️ WARNING - AUTO-GENERATED CODE - DO NOT EDIT ⚠️
3
3
# ⚙️ Generated by 'python -m opgen'
4
4
# --------------------------------------------------------------------------
5
- # Copyright (c) Microsoft Corporation. All rights reserved.
5
+ # Copyright (c) Microsoft Corporation.
6
6
# Licensed under the MIT License.
7
7
# --------------------------------------------------------------------------
8
8
# pylint: disable=W0221,W0222,R0901,W0237
9
9
# mypy: disable-error-code=override
10
- # ruff: noqa: N801,E741
11
- # ruff: noqa: D214,D402,D405,D411,D412,D416,D417
10
+ # ruff: noqa: D214, D402, D405, D411, D416, D417
12
11
# --------------------------------------------------------------------------
13
12
14
13
from __future__ import annotations
@@ -398,7 +397,18 @@ def BatchNormalization(
398
397
)
399
398
400
399
T2_Cast : TypeAlias = Union [
401
- BOOL , DOUBLE , FLOAT , FLOAT16 , INT16 , INT32 , INT64 , INT8 , UINT16 , UINT32 , UINT64 , UINT8
400
+ BOOL ,
401
+ DOUBLE ,
402
+ FLOAT ,
403
+ FLOAT16 ,
404
+ INT16 ,
405
+ INT32 ,
406
+ INT64 ,
407
+ INT8 ,
408
+ UINT16 ,
409
+ UINT32 ,
410
+ UINT64 ,
411
+ UINT8 ,
402
412
]
403
413
404
414
def Cast (self , input : T1_Cast , * , to : str ) -> T2_Cast :
@@ -837,7 +847,11 @@ def Dropout(
837
847
T_Elu = TypeVar ("T_Elu" , DOUBLE , FLOAT , FLOAT16 )
838
848
839
849
def Elu (
840
- self , X : T_Elu , * , alpha : float = 1.0 , consumed_inputs : Optional [Sequence [int ]] = None
850
+ self ,
851
+ X : T_Elu ,
852
+ * ,
853
+ alpha : float = 1.0 ,
854
+ consumed_inputs : Optional [Sequence [int ]] = None ,
841
855
) -> T_Elu :
842
856
r"""[🌐 Elu(1)](https://onnx.ai/onnx/operators/onnx__Elu.html#elu-1 "Online Documentation")
843
857
@@ -849,7 +863,7 @@ def Elu(
849
863
850
864
851
865
Args:
852
- X: 1D input tensor
866
+ X: Input tensor
853
867
854
868
alpha: Coefficient of ELU default to 1.0.
855
869
@@ -859,7 +873,9 @@ def Elu(
859
873
schema = get_schema ("Elu" , 1 , "" )
860
874
op = Op (self , "Elu" , schema )
861
875
return op (
862
- * self ._prepare_inputs (schema , X ), alpha = alpha , consumed_inputs = consumed_inputs
876
+ * self ._prepare_inputs (schema , X ),
877
+ alpha = alpha ,
878
+ consumed_inputs = consumed_inputs ,
863
879
)
864
880
865
881
T_Equal = TypeVar ("T_Equal" , BOOL , INT32 , INT64 )
@@ -1338,7 +1354,12 @@ def GlobalMaxPool(self, X: T_GlobalMaxPool) -> T_GlobalMaxPool:
1338
1354
T1_Greater : TypeAlias = BOOL
1339
1355
1340
1356
def Greater (
1341
- self , A : T_Greater , B : T_Greater , * , axis : Optional [int ] = None , broadcast : int = 0
1357
+ self ,
1358
+ A : T_Greater ,
1359
+ B : T_Greater ,
1360
+ * ,
1361
+ axis : Optional [int ] = None ,
1362
+ broadcast : int = 0 ,
1342
1363
) -> T1_Greater :
1343
1364
r"""[🌐 Greater(1)](https://onnx.ai/onnx/operators/onnx__Greater.html#greater-1 "Online Documentation")
1344
1365
@@ -1603,7 +1624,11 @@ def LRN(
1603
1624
schema = get_schema ("LRN" , 1 , "" )
1604
1625
op = Op (self , "LRN" , schema )
1605
1626
return op (
1606
- * self ._prepare_inputs (schema , X ), alpha = alpha , beta = beta , bias = bias , size = size
1627
+ * self ._prepare_inputs (schema , X ),
1628
+ alpha = alpha ,
1629
+ beta = beta ,
1630
+ bias = bias ,
1631
+ size = size ,
1607
1632
)
1608
1633
1609
1634
T_LSTM = TypeVar ("T_LSTM" , DOUBLE , FLOAT , FLOAT16 )
@@ -1822,7 +1847,9 @@ def LeakyRelu(
1822
1847
schema = get_schema ("LeakyRelu" , 1 , "" )
1823
1848
op = Op (self , "LeakyRelu" , schema )
1824
1849
return op (
1825
- * self ._prepare_inputs (schema , X ), alpha = alpha , consumed_inputs = consumed_inputs
1850
+ * self ._prepare_inputs (schema , X ),
1851
+ alpha = alpha ,
1852
+ consumed_inputs = consumed_inputs ,
1826
1853
)
1827
1854
1828
1855
T_Less = TypeVar ("T_Less" , DOUBLE , FLOAT , FLOAT16 )
@@ -1935,7 +1962,11 @@ def LogSoftmax(self, input: T_LogSoftmax, *, axis: int = 1) -> T_LogSoftmax:
1935
1962
)
1936
1963
1937
1964
def Loop (
1938
- self , M : Optional [I_Loop ], cond : Optional [B_Loop ], * v_initial : V_Loop , body : GraphProto
1965
+ self ,
1966
+ M : Optional [I_Loop ],
1967
+ cond : Optional [B_Loop ],
1968
+ * v_initial : V_Loop ,
1969
+ body : GraphProto ,
1939
1970
) -> V_Loop :
1940
1971
r"""[🌐 Loop(1)](https://onnx.ai/onnx/operators/onnx__Loop.html#loop-1 "Online Documentation")
1941
1972
@@ -1954,7 +1985,7 @@ def Loop(
1954
1985
This table summarizes the operating modes of this operator with equivalent
1955
1986
C-style code:
1956
1987
1957
- Operator inputs defined as (max_trip_count, condition_var).
1988
+ Operator inputs defined as (max_trip_count, condition_var).
1958
1989
1959
1990
input ("", ""):
1960
1991
for (int i=0; ; ++i) {
@@ -2493,7 +2524,11 @@ def Or(self, A: T_Or, B: T_Or, *, axis: Optional[int] = None, broadcast: int = 0
2493
2524
T_PRelu = TypeVar ("T_PRelu" , DOUBLE , FLOAT , FLOAT16 )
2494
2525
2495
2526
def PRelu (
2496
- self , X : T_PRelu , slope : T_PRelu , * , consumed_inputs : Optional [Sequence [int ]] = None
2527
+ self ,
2528
+ X : T_PRelu ,
2529
+ slope : T_PRelu ,
2530
+ * ,
2531
+ consumed_inputs : Optional [Sequence [int ]] = None ,
2497
2532
) -> T_PRelu :
2498
2533
r"""[🌐 PRelu(1)](https://onnx.ai/onnx/operators/onnx__PRelu.html#prelu-1 "Online Documentation")
2499
2534
@@ -2567,7 +2602,10 @@ def Pad(
2567
2602
schema = get_schema ("Pad" , 1 , "" )
2568
2603
op = Op (self , "Pad" , schema )
2569
2604
return op (
2570
- * self ._prepare_inputs (schema , data ), mode = mode , paddings = paddings , value = value
2605
+ * self ._prepare_inputs (schema , data ),
2606
+ mode = mode ,
2607
+ paddings = paddings ,
2608
+ value = value ,
2571
2609
)
2572
2610
2573
2611
T_Pow = TypeVar ("T_Pow" , DOUBLE , FLOAT , FLOAT16 )
@@ -2975,7 +3013,11 @@ def RandomUniformLike(
2975
3013
schema = get_schema ("RandomUniformLike" , 1 , "" )
2976
3014
op = Op (self , "RandomUniformLike" , schema )
2977
3015
return op (
2978
- * self ._prepare_inputs (schema , input ), dtype = dtype , high = high , low = low , seed = seed
3016
+ * self ._prepare_inputs (schema , input ),
3017
+ dtype = dtype ,
3018
+ high = high ,
3019
+ low = low ,
3020
+ seed = seed ,
2979
3021
)
2980
3022
2981
3023
T_Reciprocal = TypeVar ("T_Reciprocal" , DOUBLE , FLOAT , FLOAT16 )
@@ -3004,7 +3046,11 @@ def Reciprocal(
3004
3046
T_ReduceL1 = TypeVar ("T_ReduceL1" , DOUBLE , FLOAT , FLOAT16 , INT32 , INT64 , UINT32 , UINT64 )
3005
3047
3006
3048
def ReduceL1 (
3007
- self , data : T_ReduceL1 , * , axes : Optional [Sequence [int ]] = None , keepdims : int = 1
3049
+ self ,
3050
+ data : T_ReduceL1 ,
3051
+ * ,
3052
+ axes : Optional [Sequence [int ]] = None ,
3053
+ keepdims : int = 1 ,
3008
3054
) -> T_ReduceL1 :
3009
3055
r"""[🌐 ReduceL1(1)](https://onnx.ai/onnx/operators/onnx__ReduceL1.html#reducel1-1 "Online Documentation")
3010
3056
@@ -3034,7 +3080,11 @@ def ReduceL1(
3034
3080
T_ReduceL2 = TypeVar ("T_ReduceL2" , DOUBLE , FLOAT , FLOAT16 , INT32 , INT64 , UINT32 , UINT64 )
3035
3081
3036
3082
def ReduceL2 (
3037
- self , data : T_ReduceL2 , * , axes : Optional [Sequence [int ]] = None , keepdims : int = 1
3083
+ self ,
3084
+ data : T_ReduceL2 ,
3085
+ * ,
3086
+ axes : Optional [Sequence [int ]] = None ,
3087
+ keepdims : int = 1 ,
3038
3088
) -> T_ReduceL2 :
3039
3089
r"""[🌐 ReduceL2(1)](https://onnx.ai/onnx/operators/onnx__ReduceL2.html#reducel2-1 "Online Documentation")
3040
3090
@@ -3066,7 +3116,11 @@ def ReduceL2(
3066
3116
)
3067
3117
3068
3118
def ReduceLogSum (
3069
- self , data : T_ReduceLogSum , * , axes : Optional [Sequence [int ]] = None , keepdims : int = 1
3119
+ self ,
3120
+ data : T_ReduceLogSum ,
3121
+ * ,
3122
+ axes : Optional [Sequence [int ]] = None ,
3123
+ keepdims : int = 1 ,
3070
3124
) -> T_ReduceLogSum :
3071
3125
r"""[🌐 ReduceLogSum(1)](https://onnx.ai/onnx/operators/onnx__ReduceLogSum.html#reducelogsum-1 "Online Documentation")
3072
3126
@@ -3132,7 +3186,11 @@ def ReduceLogSumExp(
3132
3186
T_ReduceMax = TypeVar ("T_ReduceMax" , DOUBLE , FLOAT , FLOAT16 , INT32 , INT64 , UINT32 , UINT64 )
3133
3187
3134
3188
def ReduceMax (
3135
- self , data : T_ReduceMax , * , axes : Optional [Sequence [int ]] = None , keepdims : int = 1
3189
+ self ,
3190
+ data : T_ReduceMax ,
3191
+ * ,
3192
+ axes : Optional [Sequence [int ]] = None ,
3193
+ keepdims : int = 1 ,
3136
3194
) -> T_ReduceMax :
3137
3195
r"""[🌐 ReduceMax(1)](https://onnx.ai/onnx/operators/onnx__ReduceMax.html#reducemax-1 "Online Documentation")
3138
3196
@@ -3164,7 +3222,11 @@ def ReduceMax(
3164
3222
)
3165
3223
3166
3224
def ReduceMean (
3167
- self , data : T_ReduceMean , * , axes : Optional [Sequence [int ]] = None , keepdims : int = 1
3225
+ self ,
3226
+ data : T_ReduceMean ,
3227
+ * ,
3228
+ axes : Optional [Sequence [int ]] = None ,
3229
+ keepdims : int = 1 ,
3168
3230
) -> T_ReduceMean :
3169
3231
r"""[🌐 ReduceMean(1)](https://onnx.ai/onnx/operators/onnx__ReduceMean.html#reducemean-1 "Online Documentation")
3170
3232
@@ -3194,7 +3256,11 @@ def ReduceMean(
3194
3256
T_ReduceMin = TypeVar ("T_ReduceMin" , DOUBLE , FLOAT , FLOAT16 , INT32 , INT64 , UINT32 , UINT64 )
3195
3257
3196
3258
def ReduceMin (
3197
- self , data : T_ReduceMin , * , axes : Optional [Sequence [int ]] = None , keepdims : int = 1
3259
+ self ,
3260
+ data : T_ReduceMin ,
3261
+ * ,
3262
+ axes : Optional [Sequence [int ]] = None ,
3263
+ keepdims : int = 1 ,
3198
3264
) -> T_ReduceMin :
3199
3265
r"""[🌐 ReduceMin(1)](https://onnx.ai/onnx/operators/onnx__ReduceMin.html#reducemin-1 "Online Documentation")
3200
3266
@@ -3226,7 +3292,11 @@ def ReduceMin(
3226
3292
)
3227
3293
3228
3294
def ReduceProd (
3229
- self , data : T_ReduceProd , * , axes : Optional [Sequence [int ]] = None , keepdims : int = 1
3295
+ self ,
3296
+ data : T_ReduceProd ,
3297
+ * ,
3298
+ axes : Optional [Sequence [int ]] = None ,
3299
+ keepdims : int = 1 ,
3230
3300
) -> T_ReduceProd :
3231
3301
r"""[🌐 ReduceProd(1)](https://onnx.ai/onnx/operators/onnx__ReduceProd.html#reduceprod-1 "Online Documentation")
3232
3302
@@ -3256,7 +3326,11 @@ def ReduceProd(
3256
3326
T_ReduceSum = TypeVar ("T_ReduceSum" , DOUBLE , FLOAT , FLOAT16 , INT32 , INT64 , UINT32 , UINT64 )
3257
3327
3258
3328
def ReduceSum (
3259
- self , data : T_ReduceSum , * , axes : Optional [Sequence [int ]] = None , keepdims : int = 1
3329
+ self ,
3330
+ data : T_ReduceSum ,
3331
+ * ,
3332
+ axes : Optional [Sequence [int ]] = None ,
3333
+ keepdims : int = 1 ,
3260
3334
) -> T_ReduceSum :
3261
3335
r"""[🌐 ReduceSum(1)](https://onnx.ai/onnx/operators/onnx__ReduceSum.html#reducesum-1 "Online Documentation")
3262
3336
@@ -3371,7 +3445,9 @@ def Reshape(
3371
3445
schema = get_schema ("Reshape" , 1 , "" )
3372
3446
op = Op (self , "Reshape" , schema )
3373
3447
return op (
3374
- * self ._prepare_inputs (schema , data ), consumed_inputs = consumed_inputs , shape = shape
3448
+ * self ._prepare_inputs (schema , data ),
3449
+ consumed_inputs = consumed_inputs ,
3450
+ shape = shape ,
3375
3451
)
3376
3452
3377
3453
T_Selu = TypeVar ("T_Selu" , DOUBLE , FLOAT , FLOAT16 )
@@ -3632,7 +3708,7 @@ def Softplus(self, X: T_Softplus) -> T_Softplus:
3632
3708
3633
3709
3634
3710
Args:
3635
- X: (differentiable) 1D input tensor
3711
+ X: (differentiable) Input tensor
3636
3712
"""
3637
3713
3638
3714
schema = get_schema ("Softplus" , 1 , "" )
@@ -4019,7 +4095,12 @@ def Unsqueeze(self, data: T_Unsqueeze, *, axes: Sequence[int]) -> T_Unsqueeze:
4019
4095
T_Upsample = TypeVar ("T_Upsample" , BOOL , DOUBLE , FLOAT , FLOAT16 , INT32 , INT64 )
4020
4096
4021
4097
def Upsample (
4022
- self , X : T_Upsample , * , height_scale : float , mode : str = "nearest" , width_scale : float
4098
+ self ,
4099
+ X : T_Upsample ,
4100
+ * ,
4101
+ height_scale : float ,
4102
+ mode : str = "nearest" ,
4103
+ width_scale : float ,
4023
4104
) -> T_Upsample :
4024
4105
r"""[🌐 Upsample(1)](https://onnx.ai/onnx/operators/onnx__Upsample.html#upsample-1 "Online Documentation")
4025
4106
0 commit comments