Caffe2 - C++ API
A deep learning, cross platform ML framework
erf_op.h
1 #ifndef CAFFE2_OPERATORS_ERF_OP_H_
2 #define CAFFE2_OPERATORS_ERF_OP_H_
3 
4 #include <vector>
5 
6 #include "caffe2/operators/elementwise_ops.h"
7 #include "caffe2/utils/math.h"
8 
9 constexpr float PI = 3.14159265358979323846;
10 
11 namespace caffe2 {
12 
13 template <class Context>
14 struct ErfFunctor {
15  template <typename T>
16  bool operator()(const int N, const T* X, T* Y, Context* context) const {
17  math::Erf(N, X, Y, context);
18  return true;
19  }
20 };
21 
22 template <class Context>
24  template <typename T>
25  bool Forward(
26  const std::vector<int>& X_dims,
27  const std::vector<int>& dY_dims,
28  const T* X,
29  const T* dY,
30  T* dX,
31  Context* context) const;
32 };
33 
34 } // namespace caffe2
35 
36 #endif // CAFFE2_OPERATORS_ERF_OP_H_
A global dictionary that holds information about what Caffe2 modules have been loaded in the current ...
Definition: blob.h:13