[mir] Refine operations constructors. (#8283)
authorGusev Dmitry/Engineer/AI Tools Lab /SRR/Samsung Electronics <d.gusev@partner.samsung.com>
Fri, 18 Oct 2019 20:34:43 +0000 (23:34 +0300)
committerAlexander Efimov/./AI Tools Lab/Samsung Electronics <a.efimov@samsung.com>
Fri, 18 Oct 2019 20:34:43 +0000 (23:34 +0300)
Removed obsolete operations constructors in [mir].

Signed-off-by: Dmitry Gusev <d.gusev@partner.samsung.com>
compiler/mir/include/mir/ops/AvgPool2DOp.h
compiler/mir/include/mir/ops/Conv2DOp.h
compiler/mir/include/mir/ops/Deconv2DOp.h
compiler/mir/include/mir/ops/DepthwiseConv2DOp.h
compiler/mir/include/mir/ops/MaxPool2DOp.h
compiler/mir/include/mir/ops/PadOp.h

index d8b637a..da72256 100644 (file)
@@ -31,23 +31,6 @@ namespace ops
 class AvgPool2DOp : public Operation
 {
 public:
-  AvgPool2DOp(Output *arg, const std::vector<std::int32_t> &window_size,
-              const std::vector<std::int32_t> &strides,
-              const std::vector<std::int32_t> &padding_before,
-              const std::vector<std::int32_t> &padding_after, bool include_pad,
-              DataFormat data_format)
-      : Operation(Type::avgPool2D, {arg})
-  {
-    _attributes.window = window_size;
-    _attributes.strides = strides;
-    _attributes.padding_before = padding_before;
-    _attributes.padding_after = padding_after;
-    _attributes.include_pad = include_pad;
-    _attributes.data_format = data_format;
-
-    inferOutputShapes();
-  }
-
   AvgPool2DOp(Output *arg, const AvgPool2DOpAttributes &attributes)
       : Operation(Type::avgPool2D, {arg}), _attributes(attributes)
   {
index 5731d58..251d841 100644 (file)
@@ -29,19 +29,6 @@ namespace ops
 class Conv2DOp : public Operation
 {
 public:
-  Conv2DOp(Output *input, Output *kernel, const std::vector<std::int32_t> &strides,
-           const std::vector<std::int32_t> &padding_before,
-           const std::vector<std::int32_t> &padding_after, DataFormat data_format)
-      : Operation(Type::conv2D, {input, kernel})
-  {
-    _attributes.strides = strides;
-    _attributes.padding_before = padding_before;
-    _attributes.padding_after = padding_after;
-    _attributes.data_format = data_format;
-
-    inferOutputShapes();
-  }
-
   Conv2DOp(Output *input, Output *kernel, const Conv2DOpAttributes &attributes)
       : Operation(Type::conv2D, {input, kernel}), _attributes(attributes)
   {
index 0748740..39d1041 100644 (file)
@@ -32,32 +32,6 @@ namespace ops
 class DeConv2DOp : public Operation
 {
 public:
-  DeConv2DOp(Output *input, Output *kernel, const std::vector<std::int32_t> &strides,
-             const std::vector<std::int32_t> &padding_before,
-             const std::vector<std::int32_t> &padding_after, DataFormat data_format)
-      : Operation(Type::deConv2D, {input, kernel})
-  {
-    _attributes.strides = strides;
-    _attributes.padding_type = PaddingType::Explicit;
-    _attributes.padding_before = padding_before;
-    _attributes.padding_after = padding_after;
-    _attributes.data_format = data_format;
-
-    inferOutputShapes();
-  }
-
-  DeConv2DOp(Output *input, Output *kernel, const std::vector<std::int32_t> &strides,
-             PaddingType padding_type, const Shape &output_shape, DataFormat data_format)
-      : Operation(Type::deConv2D, {input, kernel})
-  {
-    _attributes.strides = strides;
-    _attributes.padding_type = padding_type;
-    _attributes.data_format = data_format;
-
-    setOutputShape(0, output_shape);
-    inferPaddings();
-  }
-
   DeConv2DOp(Output *input, Output *kernel, const Deconv2DOpAttributes &attributes)
       : Operation(Type::deConv2D, {input, kernel}), _attributes(attributes)
   {
index f5853cd..22f57e7 100644 (file)
@@ -29,19 +29,6 @@ namespace ops
 class DepthwiseConv2DOp : public Operation
 {
 public:
-  DepthwiseConv2DOp(Output *input, Output *kernel, const std::vector<std::int32_t> &strides,
-                    const std::vector<std::int32_t> &padding_before,
-                    const std::vector<std::int32_t> &padding_after, DataFormat data_format)
-      : Operation(Type::depthwiseConv, {input, kernel})
-  {
-    _attributes.strides = strides;
-    _attributes.padding_before = padding_before;
-    _attributes.padding_after = padding_after;
-    _attributes.data_format = data_format;
-
-    inferOutputShapes();
-  }
-
   DepthwiseConv2DOp(Output *input, Output *kernel, const Conv2DOpAttributes &attributes)
       : Operation(Type::depthwiseConv, {input, kernel}), _attributes(attributes)
   {
index c774f34..b98df0c 100644 (file)
@@ -31,21 +31,6 @@ namespace ops
 class MaxPool2DOp : public Operation
 {
 public:
-  MaxPool2DOp(Output *arg, const std::vector<std::int32_t> &window_size,
-              const std::vector<std::int32_t> &strides,
-              const std::vector<std::int32_t> &padding_before,
-              const std::vector<std::int32_t> &padding_after, DataFormat data_format)
-      : Operation(Type::maxPool2D, {arg})
-  {
-    _attributes.window = window_size;
-    _attributes.strides = strides;
-    _attributes.padding_before = padding_before;
-    _attributes.padding_after = padding_after;
-    _attributes.data_format = data_format;
-
-    inferOutputShapes();
-  }
-
   MaxPool2DOp(Output *arg, const MaxPool2DOpAttributes &attributes)
       : Operation(Type::maxPool2D, {arg}), _attributes(attributes)
   {
index ca21574..3a399d7 100644 (file)
@@ -28,22 +28,6 @@ namespace ops
 class PadOp : public Operation
 {
 public:
-  /// @param arg The tensor to be padded.
-  /// @param padding_before The padding to be added before the tensor.
-  /// @param padding_after The padding to be added after the tensor.
-  /// @param padding_value The value to be used for padding.
-  PadOp(Output *arg, const std::vector<std::int32_t> &padding_before,
-        const std::vector<std::int32_t> &padding_after, float padding_value)
-      : Operation(Type::pad, {arg})
-  {
-    _attributes.padding_before = padding_before;
-    _attributes.padding_after = padding_after;
-    _attributes.padding_value = padding_value;
-
-    assert(_attributes.padding_before.size() == _attributes.padding_after.size());
-    inferOutputShapes();
-  }
-
   PadOp(Output *arg, const PadOpAttributes &attributes)
       : Operation(Type::pad, {arg}), _attributes(attributes)
   {