Caffe2 - C++ API
A deep learning, cross platform ML framework
elementwise_ops_utils.h
1 #ifndef CAFFE2_OPERATORS_ELEMENTWISE_OPS_UTILS_H_
2 #define CAFFE2_OPERATORS_ELEMENTWISE_OPS_UTILS_H_
3 
4 #include <tuple>
5 #include <vector>
6 
7 #include "caffe2/core/context.h"
8 #include "caffe2/core/tensor.h"
9 
10 namespace caffe2 {
11 namespace elementwise_ops_utils {
12 
13 CAFFE2_API std::tuple<size_t, size_t, size_t>
14 ComputeLegacyBroadcastSizes(const Tensor& A, const Tensor& B, int axis);
15 
16 CAFFE2_API std::vector<int> ComputeBinaryBroadcastForwardDims(
17  const std::vector<int>& A_dims,
18  const std::vector<int>& B_dims);
19 
20 CAFFE2_API void ComputeBinaryBroadcastBackwardAxes(
21  const std::vector<int>& A_dims,
22  const std::vector<int>& B_dims,
23  std::vector<int>* A_axes,
24  std::vector<int>* B_axes);
25 
26 CAFFE2_API void ComputeBinaryBroadcastBackwardDims(
27  const std::vector<int>& A_dims,
28  const std::vector<int>& B_dims,
29  std::vector<int>* A_back_dims,
30  std::vector<int>* B_back_dims);
31 
32 } // namespace elementwise_ops_utils
33 } // namespace caffe2
34 
35 #endif // CAFFE2_OPERATORS_ELEMENTWISE_OPS_UTILS_H_
Definition: static.cpp:52
A global dictionary that holds information about what Caffe2 modules have been loaded in the current ...
Definition: blob.h:13
Definition: static.cpp:58