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
reciprocal_op.h
1
#ifndef CAFFE2_OPERATORS_RECIPROCAL_OP_H_
2
#define CAFFE2_OPERATORS_RECIPROCAL_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
ReciprocalFunctor
{
11
template
<
typename
T>
12
bool
operator()(
const
int
N,
const
T
* X,
T
* Y, Context* context)
const
{
13
math::Inv(N, X, Y, context);
14
return
true
;
15
}
16
};
17
18
template
<
class
Context>
19
struct
ReciprocalGradientFunctor
{
20
template
<
typename
T>
21
bool
Forward(
22
const
std::vector<int>& Y_dims,
23
const
std::vector<int>& dY_dims,
24
const
T
* Y,
25
const
T
* dY,
26
T
* dX,
27
Context* context)
const
;
28
};
29
30
}
// namespace caffe2
31
32
#endif // CAFFE2_OPERATORS_RECIPROCAL_OP_H_
caffe2::ReciprocalFunctor
Definition:
reciprocal_op.h:10
caffe2::ReciprocalGradientFunctor
Definition:
reciprocal_op.h:19
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
Generated on Thu Mar 21 2019 13:06:19 for Caffe2 - C++ API by
1.8.11