1 #ifndef CAFFE2_OPERATORS_ELEMENTWISE_OPS_UTILS_H_ 2 #define CAFFE2_OPERATORS_ELEMENTWISE_OPS_UTILS_H_ 7 #include "caffe2/core/context.h" 8 #include "caffe2/core/tensor.h" 11 namespace elementwise_ops_utils {
13 CAFFE2_API std::tuple<size_t, size_t, size_t>
14 ComputeLegacyBroadcastSizes(
const Tensor&
A,
const Tensor&
B,
int axis);
16 CAFFE2_API std::vector<int> ComputeBinaryBroadcastForwardDims(
17 const std::vector<int>& A_dims,
18 const std::vector<int>& B_dims);
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);
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);
35 #endif // CAFFE2_OPERATORS_ELEMENTWISE_OPS_UTILS_H_
A global dictionary that holds information about what Caffe2 modules have been loaded in the current ...