Caffe2 - C++ API
A deep learning, cross platform ML framework
Related Pages
Modules
Data Structures
Files
C++ API
Python API
GitHub
File List
Globals
caffe2
operators
tanh_op.h
1
#ifndef CAFFE2_OPERATORS_TANH_OP_H_
2
#define CAFFE2_OPERATORS_TANH_OP_H_
3
4
#include <vector>
5
6
#include "caffe2/operators/elementwise_ops.h"
7
#include "caffe2/utils/math.h"
8
9
namespace
caffe2
{
10
11
template
<
class
Context>
12
struct
TanhFunctor
{
13
template
<
typename
T>
14
bool
operator()(
const
int
N,
const
T
* X,
T
* Y, Context* context)
const
{
15
math::Tanh<T, Context>(N, X, Y, context);
16
return
true
;
17
}
18
};
19
20
template
<
class
Context>
21
struct
TanhGradientFunctor
{
22
template
<
typename
T>
23
bool
Forward(
24
const
std::vector<int>& Y_dims,
25
const
std::vector<int>& dY_dims,
26
const
T
* Y,
27
const
T
* dY,
28
T
* dX,
29
Context* context)
const
;
30
};
31
32
}
// namespace caffe2
33
34
#endif // CAFFE2_OPERATORS_TANH_OP_H_
caffe2::TanhGradientFunctor
Definition:
tanh_op.h:21
T
Definition:
dataloader.cpp:482
caffe2::TanhFunctor
Definition:
tanh_op.h:12
caffe2
A global dictionary that holds information about what Caffe2 modules have been loaded in the current ...
Definition:
blob.h:13
Generated on Thu Mar 21 2019 13:06:19 for Caffe2 - C++ API by
1.8.11