@@ -81,9 +81,6 @@ will throw errors.
8181 " T" ,
8282 {" tensor(float16)" , " tensor(float)" , " tensor(double)" },
8383 " Constrain input and output types to float tensors." );
84- schema.AddOpAnnotation (OpAnnotationFlag::ElementwiseDependent);
85- schema.AddOpAnnotation (
86- OpAnnotationFlag::ElementwiseStrictMonotonicIncreasing);
8784 schema.TypeAndShapeInferenceFunction (propagateShapeAndTypeFromFirstInput);
8885 };
8986}
@@ -226,10 +223,7 @@ ONNX_OPERATOR_SET_SCHEMA(
226223 " T" ,
227224 {" tensor(float16)" , " tensor(float)" , " tensor(double)" },
228225 " Constrain input and output types to float tensors." )
229- .TypeAndShapeInferenceFunction(propagateShapeAndTypeFromFirstInput)
230- .AddOpAnnotation(OpAnnotationFlag::ElementwiseIndependent)
231- .AddOpAnnotation(
232- OpAnnotationFlag::ElementwiseStrictMonotonicIncreasing));
226+ .TypeAndShapeInferenceFunction(propagateShapeAndTypeFromFirstInput));
233227
234228static const char * Relu_ver6_doc = R"DOC(
235229Relu takes one input data (Tensor<T>) and produces one output data
@@ -248,9 +242,7 @@ ONNX_OPERATOR_SET_SCHEMA(
248242 " T" ,
249243 {" tensor(float16)" , " tensor(float)" , " tensor(double)" },
250244 " Constrain input and output types to float tensors." )
251- .TypeAndShapeInferenceFunction(propagateShapeAndTypeFromFirstInput)
252- .AddOpAnnotation(OpAnnotationFlag::ElementwiseIndependent)
253- .AddOpAnnotation(OpAnnotationFlag::ElementwiseWeakMonotonicIncreasing));
245+ .TypeAndShapeInferenceFunction(propagateShapeAndTypeFromFirstInput));
254246
255247static const char * LeakyRelu_ver6_doc = R"DOC(
256248LeakyRelu takes input data (Tensor<T>) and an argument alpha, and produces one
@@ -270,9 +262,7 @@ ONNX_OPERATOR_SET_SCHEMA(
270262 " T" ,
271263 {" tensor(float16)" , " tensor(float)" , " tensor(double)" },
272264 " Constrain input and output types to float tensors." )
273- .TypeAndShapeInferenceFunction(propagateShapeAndTypeFromFirstInput)
274- .AddOpAnnotation(OpAnnotationFlag::ElementwiseIndependent)
275- .AddOpAnnotation(OpAnnotationFlag::ElementwiseWeakMonotonicIncreasing));
265+ .TypeAndShapeInferenceFunction(propagateShapeAndTypeFromFirstInput));
276266
277267static const char * Selu_ver6_doc = R"DOC(
278268Selu takes one input data (Tensor<T>) and produces one output data
@@ -304,10 +294,7 @@ ONNX_OPERATOR_SET_SCHEMA(
304294 " T" ,
305295 {" tensor(float16)" , " tensor(float)" , " tensor(double)" },
306296 " Constrain input and output types to float tensors." )
307- .TypeAndShapeInferenceFunction(propagateShapeAndTypeFromFirstInput)
308- .AddOpAnnotation(OpAnnotationFlag::ElementwiseIndependent)
309- .AddOpAnnotation(
310- OpAnnotationFlag::ElementwiseStrictMonotonicIncreasing));
297+ .TypeAndShapeInferenceFunction(propagateShapeAndTypeFromFirstInput));
311298
312299static const char * Elu_ver6_doc = R"DOC(
313300Elu takes one input data (Tensor<T>) and produces one output data
@@ -328,10 +315,7 @@ ONNX_OPERATOR_SET_SCHEMA(
328315 " T" ,
329316 {" tensor(float16)" , " tensor(float)" , " tensor(double)" },
330317 " Constrain input and output types to float tensors." )
331- .TypeAndShapeInferenceFunction(propagateShapeAndTypeFromFirstInput)
332- .AddOpAnnotation(OpAnnotationFlag::ElementwiseIndependent)
333- .AddOpAnnotation(
334- OpAnnotationFlag::ElementwiseStrictMonotonicIncreasing));
318+ .TypeAndShapeInferenceFunction(propagateShapeAndTypeFromFirstInput));
335319
336320static const char * Exp_ver6_doc = R"DOC(
337321Calculates the exponential of the given input tensor, element-wise.
@@ -353,10 +337,7 @@ ONNX_OPERATOR_SET_SCHEMA(
353337 " T" ,
354338 {" tensor(float16)" , " tensor(float)" , " tensor(double)" },
355339 " Constrain input and output types to float tensors." )
356- .TypeAndShapeInferenceFunction(propagateShapeAndTypeFromFirstInput)
357- .AddOpAnnotation(OpAnnotationFlag::ElementwiseIndependent)
358- .AddOpAnnotation(
359- OpAnnotationFlag::ElementwiseStrictMonotonicIncreasing));
340+ .TypeAndShapeInferenceFunction(propagateShapeAndTypeFromFirstInput));
360341
361342static const char * Log_ver6_doc = R"DOC(
362343Calculates the natural log of the given input tensor, element-wise.
@@ -378,10 +359,7 @@ ONNX_OPERATOR_SET_SCHEMA(
378359 " T" ,
379360 {" tensor(float16)" , " tensor(float)" , " tensor(double)" },
380361 " Constrain input and output types to float tensors." )
381- .TypeAndShapeInferenceFunction(propagateShapeAndTypeFromFirstInput)
382- .AddOpAnnotation(OpAnnotationFlag::ElementwiseIndependent)
383- .AddOpAnnotation(
384- OpAnnotationFlag::ElementwiseStrictMonotonicIncreasing));
362+ .TypeAndShapeInferenceFunction(propagateShapeAndTypeFromFirstInput));
385363
386364static const char * Tanh_ver6_doc = R"DOC(
387365Calculates the hyperbolic tangent of the given input tensor element-wise.
@@ -403,10 +381,7 @@ ONNX_OPERATOR_SET_SCHEMA(
403381 " T" ,
404382 {" tensor(float16)" , " tensor(float)" , " tensor(double)" },
405383 " Constrain input and output types to float tensors." )
406- .TypeAndShapeInferenceFunction(propagateShapeAndTypeFromFirstInput)
407- .AddOpAnnotation(OpAnnotationFlag::ElementwiseIndependent)
408- .AddOpAnnotation(
409- OpAnnotationFlag::ElementwiseStrictMonotonicIncreasing));
384+ .TypeAndShapeInferenceFunction(propagateShapeAndTypeFromFirstInput));
410385
411386static const char * Pow_ver7_doc = R"DOC(
412387Pow takes input data (Tensor<T>) and exponent Tensor, and
@@ -485,10 +460,7 @@ ONNX_OPERATOR_SET_SCHEMA(
485460 " T" ,
486461 {" tensor(float16)" , " tensor(float)" , " tensor(double)" },
487462 " Constrain input and output types to float tensors." )
488- .TypeAndShapeInferenceFunction(propagateShapeAndTypeFromFirstInput)
489- .AddOpAnnotation(OpAnnotationFlag::ElementwiseIndependent)
490- .AddOpAnnotation(
491- OpAnnotationFlag::ElementwiseStrictMonotonicIncreasing));
463+ .TypeAndShapeInferenceFunction(propagateShapeAndTypeFromFirstInput));
492464
493465static const char * HardSigmoid_ver6_doc = R"DOC(
494466HardSigmoid takes one input data (Tensor<T>) and produces one output data
@@ -509,9 +481,7 @@ ONNX_OPERATOR_SET_SCHEMA(
509481 " T" ,
510482 {" tensor(float16)" , " tensor(float)" , " tensor(double)" },
511483 " Constrain input and output types to float tensors." )
512- .TypeAndShapeInferenceFunction(propagateShapeAndTypeFromFirstInput)
513- .AddOpAnnotation(OpAnnotationFlag::ElementwiseIndependent)
514- .AddOpAnnotation(OpAnnotationFlag::ElementwiseWeakMonotonicIncreasing));
484+ .TypeAndShapeInferenceFunction(propagateShapeAndTypeFromFirstInput));
515485
516486std::function<void (OpSchema&)> ElementwiseMultiOpDocGenerator(
517487 const char * name) {
0 commit comments