Caffe2 - C++ API
A deep learning, cross platform ML framework
order_switch_ops.h
1 #ifndef CAFFE2_OPERATORS_ORDER_SWITCH_OPS_H_
2 #define CAFFE2_OPERATORS_ORDER_SWITCH_OPS_H_
3 
4 #include "caffe2/core/operator.h"
5 
6 namespace caffe2 {
7 
8 // Note(Yangqing): I think it is possible to do a more general swapaxes operator
9 // but I am a little afraid of going down that general path. Only implementing
10 // the two actually needed ones here.
11 
12 template <typename T, class Context>
13 class NHWC2NCHWOp final : public Operator<Context> {
14  public:
15  USE_SIMPLE_CTOR_DTOR(NHWC2NCHWOp);
16  USE_OPERATOR_CONTEXT_FUNCTIONS;
17  bool RunOnDevice() override;
18 
19  protected:
20 };
21 
22 template <typename T, class Context>
23 class NCHW2NHWCOp final : public Operator<Context> {
24  public:
25  USE_SIMPLE_CTOR_DTOR(NCHW2NHWCOp);
26  USE_OPERATOR_CONTEXT_FUNCTIONS;
27  bool RunOnDevice() override;
28 
29  protected:
30 };
31 
32 } // namespace caffe2
33 
34 #endif // CAFFE2_OPERATORS_ORDER_SWITCH_OPS_H_
A global dictionary that holds information about what Caffe2 modules have been loaded in the current ...