Caffe2 - C++ API
A deep learning, cross platform ML framework
transpose.h
1 #ifndef CAFFE2_UTILS_MATH_TRANSPOSE_H_
2 #define CAFFE2_UTILS_MATH_TRANSPOSE_H_
3 
4 #include "caffe2/core/common.h"
5 #include "caffe2/core/types.h"
6 
7 namespace caffe2 {
8 namespace math {
9 
10 // Transpose tensor X with dims by axes and write the result to tensor Y.
11 template <typename TIndex, typename TData, class Context>
12 CAFFE2_API void Transpose(
13  int ndim,
14  const TIndex* dims,
15  const int* axes,
16  const TData* X,
17  TData* Y,
18  Context* context);
19 
20 template <typename T, class Context>
21 CAFFE2_API void
22 NCHW2NHWC(int N, int C, int HxW, const T* X, T* Y, Context* context);
23 
24 template <typename T, class Context>
25 CAFFE2_API void
26 NHWC2NCHW(int N, int C, int HxW, const T* X, T* Y, Context* context);
27 
28 } // namespace math
29 } // namespace caffe2
30 
31 #endif // CAFFE2_UTILS_MATH_TRANSPOSE_H_
A global dictionary that holds information about what Caffe2 modules have been loaded in the current ...
Definition: blob.h:13
Definition: static.cpp:64