#include "mir/ops/EluOp.h"
#include "mir/ops/FullyConnectedOp.h"
#include "mir/ops/GatherOp.h"
+#include "mir/ops/HardSwishOp.h"
#include "mir/ops/InputOp.h"
#include "mir/ops/LeakyReluOp.h"
#include "mir/ops/MaxOp.h"
HANDLE_OP(ELU, EluOp)
HANDLE_OP(fullyConnected, FullyConnectedOp)
HANDLE_OP(gather, GatherOp)
+HANDLE_OP(hardswish, HardSwishOp)
HANDLE_OP(input, InputOp)
HANDLE_OP(leakyReLU, LeakyReluOp)
HANDLE_OP(max, MaxOp)
--- /dev/null
+/*
+ * Copyright (c) 2019 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_HARD_SWISH_H_
+#define _MIR_OPS_HARD_SWISH_H_
+
+#include "mir/Operation.h"
+
+namespace mir
+{
+namespace ops
+{
+
+class HardSwishOp : public Operation
+{
+public:
+ HardSwishOp(Output *arg) : Operation(Type::hardswish, {arg})
+ {
+ setOutputShape(0, getInputShape(0));
+ }
+
+ Operation *copyWithInputs(const std::vector<Output *> &inputs) override
+ {
+ return new HardSwishOp(inputs[0]);
+ }
+};
+
+} // namespace ops
+} // namespace mir
+
+#endif //_MIR_OPS_HARD_SWISH_H_