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
swish_op.h
1
#ifndef CAFFE2_OPERATORS_SWISH_OP_H_
2
#define CAFFE2_OPERATORS_SWISH_OP_H_
3
4
#include "caffe2/operators/elementwise_ops.h"
5
#include "caffe2/utils/math.h"
6
7
namespace
caffe2
{
8
9
template
<
class
Context>
10
struct
SwishFunctor
{
11
template
<
typename
T>
12
bool
operator()(
const
int
N,
const
T
* X,
T
* Y, Context* context)
const
;
13
};
14
15
template
<
class
Context>
16
class
SwishGradientOp
final :
public
Operator
<Context> {
17
public
:
18
USE_SIMPLE_CTOR_DTOR(
SwishGradientOp
)
19
USE_OPERATOR_CONTEXT_FUNCTIONS;
20
21
template
<
typename
T>
22
bool
DoRunWithType();
23
24
bool
RunOnDevice()
override
{
25
return
DispatchHelper<TensorTypes<float, double>
>::call(
this
, Input(X));
26
}
27
28
protected
:
29
INPUT_TAGS(X, Y, DY);
30
OUTPUT_TAGS(DX);
31
};
32
33
}
// namespace caffe2
34
35
#endif // CAFFE2_OPERATORS_SWISH_OP_H_
caffe2::SwishGradientOp
Definition:
swish_op.h:16
T
Definition:
dataloader.cpp:482
caffe2
A global dictionary that holds information about what Caffe2 modules have been loaded in the current ...
Definition:
blob.h:13
caffe2::DispatchHelper
Definition:
operator.h:1052
caffe2::Operator
Definition:
operator.h:677
caffe2::SwishFunctor
Definition:
swish_op.h:10
Generated on Thu Mar 21 2019 13:06:19 for Caffe2 - C++ API by
1.8.11