Caffe2 - C++ API
A deep learning, cross platform ML framework
channel_backprop_stats_op.h
1 #ifndef CHANNEL_BACKPROP_STATS_OP_H
2 #define CHANNEL_BACKPROP_STATS_OP_H
3 
4 #include "caffe2/core/context.h"
5 #include "caffe2/core/operator.h"
6 #include "caffe2/utils/math.h"
7 
8 namespace caffe2 {
9 
10 template <class Context>
11 class ChannelBackpropStatsOp : public Operator<Context> {
12  public:
13  USE_OPERATOR_CONTEXT_FUNCTIONS;
14  ChannelBackpropStatsOp(const OperatorDef& operator_def, Workspace* ws)
15  : Operator<Context>(operator_def, ws) {}
17 
18  bool RunOnDevice() override {
19  return true;
20  }
21 
22  protected:
23  INPUT_TAGS(INPUT, SAVED_MEAN, SAVED_INV_STDDEV, OUTPUT_GRAD);
24  OUTPUT_TAGS(SCALE_GRAD, BIAS_GRAD);
25 
26  Tensor<Context> dBiasScratch_;
27  Tensor<Context> dScaleScratch_;
28 };
29 
30 } // namespace caffe2
31 
32 #endif
Tensor is the basic class in Caffe2 that stores a contiguous memory with its shape information...
Definition: tensor.h:93
Workspace is a class that holds all the related objects created during runtime: (1) all blobs...
Definition: workspace.h:47
A global dictionary that holds information about what Caffe2 modules have been loaded in the current ...