These were replaced by more general binary elementwise operations.
Signed-off-by: Sergei Barannikov <s.barannikov@samsung.com>
{
public:
void visit(ops::BatchNormOp &op) override;
- void visit(ops::BiasAddOp &op) override;
void visit(ops::CappedReluOp &op) override;
void visit(ops::ConcatOp &op) override;
void visit(ops::ConstantOp &op) override;
void visit(ops::ReluOp &op) override;
void visit(ops::ReshapeOp &op) override;
void visit(ops::ResizeOp &op) override;
- void visit(ops::ScaleOp &op) override;
void visit(ops::SigmoidOp &op) override;
void visit(ops::SliceOp &op) override;
void visit(ops::SoftmaxOp &op) override;
#include "mir/ops/AddOp.h"
#include "mir/ops/BatchNormOp.h"
-#include "mir/ops/BiasAddOp.h"
#include "mir/ops/CappedReluOp.h"
#include "mir/ops/CommonProps.h"
#include "mir/ops/ConcatOp.h"
#include "mir/ops/ReluOp.h"
#include "mir/ops/ReshapeOp.h"
#include "mir/ops/ResizeOp.h"
-#include "mir/ops/ScaleOp.h"
#include "mir/ops/SigmoidOp.h"
#include "mir/ops/SliceOp.h"
#include "mir/ops/SoftmaxOp.h"
HANDLE_OP(add, AddOp)
HANDLE_OP(batchNorm, BatchNormOp)
-HANDLE_OP(biasAdd, BiasAddOp)
HANDLE_OP(cappedReLU, CappedReluOp)
HANDLE_OP(concat, ConcatOp)
HANDLE_OP(constant, ConstantOp)
HANDLE_OP(ReLU, ReluOp)
HANDLE_OP(reshape, ReshapeOp)
HANDLE_OP(resizeIm, ResizeOp)
-HANDLE_OP(scale, ScaleOp)
HANDLE_OP(sigmoid, SigmoidOp)
HANDLE_OP(slice, SliceOp)
HANDLE_OP(softmax, SoftmaxOp)
+++ /dev/null
-/*
- * Copyright (c) 2018 Samsung Electronics Co., Ltd. All Rights Reserved
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-#ifndef _MIR_OPS_BIAS_ADD_H_
-#define _MIR_OPS_BIAS_ADD_H_
-
-#include "mir/Operation.h"
-#include "mir/TensorVariant.h"
-
-namespace mir
-{
-namespace ops
-{
-
-class BiasAddOp : public Operation
-{
-public:
- BiasAddOp(Output *arg1, Output *arg2) : Operation(Type::biasAdd, {arg1, arg2})
- {
- // Infer output shape.
- setOutputShape(0, getInputShape(0));
- }
-
- Operation *copyWithInputs(const std::vector<Output *> &inputs) override
- {
- return new BiasAddOp(inputs[0], inputs[1]);
- }
-};
-
-} // namespace ops
-} // namespace mir
-
-#endif //_MIR_OPS_BIAS_ADD_H_
+++ /dev/null
-/*
- * Copyright (c) 2018 Samsung Electronics Co., Ltd. All Rights Reserved
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-#ifndef _MIR_OPS_SCALE_OP_H_
-#define _MIR_OPS_SCALE_OP_H_
-
-#include "mir/Operation.h"
-
-namespace mir
-{
-namespace ops
-{
-
-class ScaleOp : public Operation
-{
-public:
- ScaleOp(Output *arg1, Output *arg2) : Operation(Type::scale, {arg1, arg2})
- {
- // Infer output shape.
- setOutputShape(0, getInputShape(0));
- }
-
- Operation *copyWithInputs(const std::vector<Output *> &inputs) override
- {
- return new ScaleOp(inputs[0], inputs[1]);
- }
-};
-
-} // namespace ops
-} // namespace mir
-
-#endif //_MIR_OPS_SCALE_OP_H_
#include "mir/IrDotDumper.h"
-#include "mir/ops/BatchNormOp.h"
-#include "mir/ops/BiasAddOp.h"
-#include "mir/ops/CappedReluOp.h"
-#include "mir/ops/ConcatOp.h"
-#include "mir/ops/ConstantOp.h"
-#include "mir/ops/Conv2DOp.h"
-#include "mir/ops/Deconv2DOp.h"
-#include "mir/ops/DepthwiseConv2DOp.h"
-#include "mir/ops/DropoutOp.h"
-#include "mir/ops/ElementwiseOp.h"
-#include "mir/ops/EluOp.h"
-#include "mir/ops/FullyConnectedOp.h"
-#include "mir/ops/GatherOp.h"
-#include "mir/ops/GemmOp.h"
-#include "mir/ops/InputOp.h"
-#include "mir/ops/LeakyReluOp.h"
-#include "mir/ops/OutputOp.h"
-#include "mir/ops/PadOp.h"
-#include "mir/ops/PoolOp.h"
-#include "mir/ops/ReduceOp.h"
-#include "mir/ops/ReluOp.h"
-#include "mir/ops/ReshapeOp.h"
-#include "mir/ops/ResizeOp.h"
-#include "mir/ops/ScaleOp.h"
-#include "mir/ops/SigmoidOp.h"
-#include "mir/ops/SliceOp.h"
-#include "mir/ops/SoftmaxOp.h"
-#include "mir/ops/SqrtOp.h"
-#include "mir/ops/SqueezeOp.h"
-#include "mir/ops/TanhOp.h"
-#include "mir/ops/TransposeOp.h"
-
-#include <iostream>
+#include "mir/OpDefs.h"
+
#include <map>
namespace mir
return shapes;
}
-void IrDotDumper::visit(ops::BiasAddOp &op)
-{
- auto nodeInfo = DotIrNodeInfo()
- .withType("BiasAdd", op.getName())
- .withInShapes(getInputShapes(op))
- .withOutShapes(getOutputShapes(op));
-
- _dot_builder.updateWithOp(&op, nodeInfo);
-}
-
void IrDotDumper::visit(ops::CappedReluOp &op)
{
auto nodeInfo = DotIrNodeInfo()
_dot_builder.updateWithOp(&op, nodeInfo);
}
-void IrDotDumper::visit(ops::ScaleOp &op)
-{
- auto nodeInfo = DotIrNodeInfo()
- .withType("ScaleOp", op.getName())
- .withInShapes(getInputShapes(op))
- .withOutShapes(getOutputShapes(op));
- _dot_builder.updateWithOp(&op, nodeInfo);
-}
-
void IrDotDumper::visit(ops::SliceOp &op)
{
auto node_info = DotIrNodeInfo()
*/
#include "mir/Operation.h"
-#include "mir/ops/AddOp.h"
-#include "mir/ops/BatchNormOp.h"
-#include "mir/ops/BiasAddOp.h"
-#include "mir/ops/CappedReluOp.h"
-#include "mir/ops/ConcatOp.h"
-#include "mir/ops/ConstantOp.h"
-#include "mir/ops/Conv2DOp.h"
-#include "mir/ops/Deconv2DOp.h"
-#include "mir/ops/DepthwiseConv2DOp.h"
-#include "mir/ops/DivOp.h"
-#include "mir/ops/DropoutOp.h"
-#include "mir/ops/ElementwiseOp.h"
-#include "mir/ops/EluOp.h"
-#include "mir/ops/FullyConnectedOp.h"
-#include "mir/ops/GatherOp.h"
-#include "mir/ops/GemmOp.h"
-#include "mir/ops/InputOp.h"
-#include "mir/ops/LeakyReluOp.h"
-#include "mir/ops/MaxOp.h"
-#include "mir/ops/MulOp.h"
-#include "mir/ops/OutputOp.h"
-#include "mir/ops/PadOp.h"
-#include "mir/ops/PoolOp.h"
-#include "mir/ops/ReduceOp.h"
-#include "mir/ops/ReluOp.h"
-#include "mir/ops/ReshapeOp.h"
-#include "mir/ops/ResizeOp.h"
-#include "mir/ops/ScaleOp.h"
-#include "mir/ops/SigmoidOp.h"
-#include "mir/ops/SliceOp.h"
-#include "mir/ops/SoftmaxOp.h"
-#include "mir/ops/SqueezeOp.h"
-#include "mir/ops/SqrtOp.h"
-#include "mir/ops/SubOp.h"
-#include "mir/ops/TanhOp.h"
-#include "mir/ops/TransposeOp.h"
+#include "mir/OpDefs.h"
namespace mir
{