#ifndef CAFFE2_OPERATORS_ELEMENTWISE_LINEAR_OP_H_ #define CAFFE2_OPERATORS_ELEMENTWISE_LINEAR_OP_H_ #include "caffe2/core/context.h" #include "caffe2/core/operator.h" #include "caffe2/utils/math.h" namespace caffe2 { template class ElementwiseLinearOp final : public Operator { public: template explicit ElementwiseLinearOp(Args&&... args) : Operator(std::forward(args)...), axis_(this->template GetSingleArgument("axis", 1)) {} USE_OPERATOR_CONTEXT_FUNCTIONS; bool RunOnDevice() override; protected: int axis_; }; template class ElementwiseLinearGradientOp final : public Operator { public: template explicit ElementwiseLinearGradientOp(Args&&... args) : Operator(std::forward(args)...), axis_(this->template GetSingleArgument("axis", 1)) {} USE_OPERATOR_CONTEXT_FUNCTIONS; bool RunOnDevice() override; protected: int axis_; }; } // namespace caffe2 #endif // CAFFE2_OPERATORS_ELEMENTWISE_LINEAR_OP_H_