1 #ifndef _OPERATORS_RELU_OP_H_
2 #define _OPERATORS_RELU_OP_H_
6 #include "smaug/core/backend.h"
7 #include "smaug/operators/unary_op.h"
17 template <
typename Backend>
18 class ReluOp :
public UnaryOp<Backend> {
20 ReluOp(
const std::string& name, Workspace* workspace,
float _slope = 0)
21 : UnaryOp<Backend>(name, OpType::ReLU, workspace), slope(_slope) {}
23 void run()
override {}
24 void setSlope(
float _slope) { slope = _slope; }
25 float getSlope ()
const {
return slope; }
32 REGISTER_SPECIAL_OP(ReluOp, ReferenceBackend);