This is a no-op in inference mode.
Signed-off-by: Sergei Barannikov <s.barannikov@samsung.com>
void visit(ops::Conv2DOp &op) override;
void visit(ops::DeConv2DOp &op) override;
void visit(ops::DepthwiseConv2DOp &op) override;
- void visit(ops::DropoutOp &op) override;
void visit(ops::EluOp &op) override;
void visit(ops::FullyConnectedOp &op) override;
void visit(ops::GatherOp &op) override;
#include "mir/ops/Deconv2DOp.h"
#include "mir/ops/DepthwiseConv2DOp.h"
#include "mir/ops/DivOp.h"
-#include "mir/ops/DropoutOp.h"
#include "mir/ops/EluOp.h"
#include "mir/ops/FullyConnectedOp.h"
#include "mir/ops/GatherOp.h"
HANDLE_OP(deConv2D, DeConv2DOp)
HANDLE_OP(depthwiseConv, DepthwiseConv2DOp)
HANDLE_OP(div, DivOp)
-HANDLE_OP(dropout, DropoutOp)
HANDLE_OP(ELU, EluOp)
HANDLE_OP(fullyConnected, FullyConnectedOp)
HANDLE_OP(gather, GatherOp)
+++ /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_DROPOUT_OP_H_
-#define _MIR_OPS_DROPOUT_OP_H_
-
-#include "mir/Operation.h"
-
-namespace mir
-{
-namespace ops
-{
-
-class DropoutOp : public Operation
-{
-public:
- DropoutOp(Output *arg, float rate) : Operation(Type::dropout, {arg}), _rate(rate)
- {
- // Infer output shape.
- setOutputShape(0, getInputShape(0));
- }
-
- Operation *copyWithInputs(const std::vector<Output *> &inputs) override
- {
- return new DropoutOp(inputs[0], _rate);
- }
-
- /**
- * @return The ratio of random dropout
- */
- float getRate() const { return _rate; }
-
-private:
- float _rate;
-};
-
-} // namespace ops
-} // namespace mir
-
-#endif //_MIR_OPS_DROPOUT_OP_H_
_dot_builder.updateWithOp(&op, node_info);
}
-void IrDotDumper::visit(ops::DropoutOp &op)
-{
- auto nodeInfo = DotIrNodeInfo()
- .withType("DropoutOp", op.getName())
- .withInShapes(getInputShapes(op))
- .withOutShapes(getOutputShapes(op))
- .withMisc("DropRate", op.getRate());
- _dot_builder.updateWithOp(&op, nodeInfo);
-}
-
void IrDotDumper::visit(ops::DeConv2DOp &op)
{
auto node_info = DotIrNodeInfo()