|
|
|
@ -264,10 +264,10 @@ class CosOpMaker : public framework::OpProtoAndCheckerMaker {
|
|
|
|
|
public:
|
|
|
|
|
CosOpMaker(OpProto *proto, OpAttrChecker *op_checker)
|
|
|
|
|
: framework::OpProtoAndCheckerMaker(proto, op_checker) {
|
|
|
|
|
AddInput("X", "Input of Floor operator");
|
|
|
|
|
AddOutput("Out", "Output of Floor operator");
|
|
|
|
|
AddInput("X", "Input of Cosine operator");
|
|
|
|
|
AddOutput("Out", "Output of Cosine operator");
|
|
|
|
|
AddComment(R"DOC(
|
|
|
|
|
Floor Activation Operator.
|
|
|
|
|
Cosine Activation Operator.
|
|
|
|
|
|
|
|
|
|
$out = cos(x)$
|
|
|
|
|
|
|
|
|
@ -275,6 +275,21 @@ $out = cos(x)$
|
|
|
|
|
}
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
class SinOpMaker : public framework::OpProtoAndCheckerMaker {
|
|
|
|
|
public:
|
|
|
|
|
SinOpMaker(OpProto *proto, OpAttrChecker *op_checker)
|
|
|
|
|
: framework::OpProtoAndCheckerMaker(proto, op_checker) {
|
|
|
|
|
AddInput("X", "Input of Sine operator");
|
|
|
|
|
AddOutput("Out", "Output of Sine operator");
|
|
|
|
|
AddComment(R"DOC(
|
|
|
|
|
Sine Activation Operator.
|
|
|
|
|
|
|
|
|
|
$out = sin(x)$
|
|
|
|
|
|
|
|
|
|
)DOC");
|
|
|
|
|
}
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
class RoundOpMaker : public framework::OpProtoAndCheckerMaker {
|
|
|
|
|
public:
|
|
|
|
|
RoundOpMaker(OpProto *proto, OpAttrChecker *op_checker)
|
|
|
|
@ -579,6 +594,9 @@ REGISTER_OP(floor, ops::ActivationOp, ops::FloorOpMaker, floor_grad,
|
|
|
|
|
REGISTER_OP(cos, ops::ActivationOp, ops::CosOpMaker, cos_grad,
|
|
|
|
|
ops::ActivationOpGrad);
|
|
|
|
|
|
|
|
|
|
REGISTER_OP(sin, ops::ActivationOp, ops::SinOpMaker, sin_grad,
|
|
|
|
|
ops::ActivationOpGrad);
|
|
|
|
|
|
|
|
|
|
REGISTER_OP(round, ops::ActivationOp, ops::RoundOpMaker, round_grad,
|
|
|
|
|
ops::ActivationOpGrad);
|
|
|
|
|
|
|
|
|
|