From 3f4e62a49cdd416ac1725e30be46f81c916ce7b8 Mon Sep 17 00:00:00 2001 From: Du Li Date: Fri, 14 Dec 2018 14:44:42 -0800 Subject: [PATCH] Adding missing attribute *alpha* to FusedConv schema. --- .../core/graph/contrib_ops/contrib_defs.cc | 62 +++++++++++++++++++ 1 file changed, 62 insertions(+) diff --git a/onnxruntime/core/graph/contrib_ops/contrib_defs.cc b/onnxruntime/core/graph/contrib_ops/contrib_defs.cc index 0d5b89b1f3..58d585e3c1 100644 --- a/onnxruntime/core/graph/contrib_ops/contrib_defs.cc +++ b/onnxruntime/core/graph/contrib_ops/contrib_defs.cc @@ -32,6 +32,63 @@ void RegisterContribSchemas() { Sample echo operator.)DOC"); // register schemas for more operators here + ONNX_CONTRIB_OPERATOR_SCHEMA(ConvMaxPool) + .SetDomain(kMSDomain) + .SinceVersion(1) + .SetDoc(R"DOC( + Port Conv1D::ComputeConvMaxPoolWithActivationAndMask() method in TP3L1 c++ model.)DOC") + .Attr( + "auto_pad", + "", + AttributeProto::STRING, + std::string("NOTSET")) + .Attr( + "kernel_shape", + "", + AttributeProto::INTS, + OPTIONAL) + .Attr( + "dilations", + "", + AttributeProto::INTS, + OPTIONAL) + .Attr( + "strides", "", AttributeProto::INTS, OPTIONAL) + .Attr("pads", + "", + AttributeProto::INTS, OPTIONAL) + .Attr( + "group", + "", + AttributeProto::INT, + static_cast(1)) + .Attr( + "activation", + "", + AttributeProto::STRING, + OPTIONAL) + .Input( + 0, + "X", + "", + "T") + .Input( + 1, + "W", + "", + "T") + .Input(2, "B", "", "T", OpSchema::Optional) + .Input(3, "M", "mask", "T", OpSchema::Optional) + .Output( + 0, + "Y", + "", + "T") + .TypeConstraint("T", {"tensor(float16)", "tensor(float)", "tensor(double)"}, "Constrain input and output types to float tensors") + .TypeAndShapeInferenceFunction([](ONNX_NAMESPACE::InferenceContext& ctx) { + ONNX_NAMESPACE::convPoolTypeAndShapeInference(ctx, false, true); + }); + ONNX_CONTRIB_OPERATOR_SCHEMA(FusedConv) .SetDomain(kMSDomain) .SinceVersion(1) @@ -68,6 +125,11 @@ activation.)DOC") "", AttributeProto::STRING, OPTIONAL) + .Attr( + "alpha", + "", + AttributeProto::FLOAT, + OPTIONAL) .Input( 0, "X",