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  template <class... Args>
15  explicit ChannelBackpropStatsOp(Args&&... args)
16  : Operator<Context>(std::forward<Args>(args)...) {}
17  ~ChannelBackpropStatsOp() {}
18 
19  bool RunOnDevice() override {
20  return true;
21  }
22 
23  protected:
24  INPUT_TAGS(INPUT, SAVED_MEAN, SAVED_INV_STDDEV, OUTPUT_GRAD);
25  OUTPUT_TAGS(SCALE_GRAD, BIAS_GRAD);
26 
27  Tensor dBiasScratch_;
28  Tensor dScaleScratch_;
29 };
30 
31 } // namespace caffe2
32 
33 #endif
A global dictionary that holds information about what Caffe2 modules have been loaded in the current ...
Definition: blob.h:13