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
quantization
server
spatial_batch_norm_dnnlowp_op.h
1
#pragma once
2
3
#include "caffe2/operators/spatial_batch_norm_op.h"
4
#include "caffe2/quantization/server/dnnlowp_op.h"
5
6
namespace
caffe2
{
7
12
template
<
typename
T>
13
class
SpatialBNDNNLowPOp
final :
public
DNNLowPOp
<T, SpatialBNOp<CPUContext>> {
14
public
:
15
USE_OPERATOR_FUNCTIONS(
CPUContext
);
16
USE_DNNLOWP_OPERATOR_BASE_FUNCTIONS(
T
,
SpatialBNOp<CPUContext>
);
17
SpatialBNDNNLowPOp
(
const
OperatorDef& operator_def,
Workspace
* ws);
18
19
virtual
~
SpatialBNDNNLowPOp
()
override
=
default
;
20
21
bool
RunOnDevice()
override
;
22
23
private
:
24
void
ComputeFusedParam_(
25
const
int
C
,
26
const
float
* scale,
27
const
float
* bias,
28
const
float
* mean,
29
const
float
* var,
30
float
* alpha,
31
float
* beta);
32
33
double
epsilon_;
34
const
StorageOrder order_;
35
36
Tensor
alpha_;
37
Tensor
beta_;
38
39
INPUT_TAGS(INPUT, SCALE, BIAS, EST_MEAN, EST_VAR);
40
OUTPUT_TAGS(OUTPUT);
41
};
42
43
}
// namespace caffe2
T
Definition:
dataloader.cpp:482
caffe2::CPUContext
The CPU Context, representing the bare minimum of what a Context class in Caffe2 should implement...
Definition:
context.h:40
nom::repr::Tensor
Definition:
NeuralNet.h:158
caffe2::SpatialBNDNNLowPOp
Note this implementation assumes SCALE, BIAS, EST_MEAN, and EST_VAR inputs are still in fp32...
Definition:
spatial_batch_norm_dnnlowp_op.h:13
caffe2::Workspace
Workspace is a class that holds all the related objects created during runtime: (1) all blobs...
Definition:
workspace.h:47
caffe2
A global dictionary that holds information about what Caffe2 modules have been loaded in the current ...
Definition:
blob.h:13
C
Definition:
static.cpp:64
caffe2::DNNLowPOp
A convenient base class for C2 operators with DNNLOWP engine.
Definition:
dnnlowp_op.h:77
caffe2::SpatialBNOp
Definition:
spatial_batch_norm_op.h:18
Generated on Thu Mar 21 2019 13:06:21 for Caffe2 - C++ API by
1.8.11