Caffe2 - C++ API
A deep learning, cross platform ML framework
softplus_op.h
1 
17 #ifndef CAFFE2_OPERATORS_SOFTPLUS_OP_H_
18 #define CAFFE2_OPERATORS_SOFTPLUS_OP_H_
19 
20 #include "caffe2/core/common_omp.h"
21 #include "caffe2/core/context.h"
22 #include "caffe2/core/logging.h"
23 #include "caffe2/core/operator.h"
24 
25 namespace caffe2 {
26 
27 template <typename T, class Context>
28 class SoftplusOp final : public Operator<Context> {
29  public:
30  USE_SIMPLE_CTOR_DTOR(SoftplusOp)
31  USE_OPERATOR_CONTEXT_FUNCTIONS;
32 
33  bool RunOnDevice() override;
34 
35  protected:
36 };
37 
38 template <typename T, class Context>
39 class SoftplusGradientOp final : public Operator<Context> {
40  public:
41  USE_SIMPLE_CTOR_DTOR(SoftplusGradientOp)
42  USE_OPERATOR_CONTEXT_FUNCTIONS;
43 
44  bool RunOnDevice() override;
45 
46  protected:
47  // Input: Y, dY; Output: dX
48 };
49 
50 } // namespace caffe2
51 
52 #endif // CAFFE2_OPERATORS_SOFTPLUS_OP_H_
Copyright (c) 2016-present, Facebook, Inc.