1 #ifndef CAFFE2_OPERATORS_ELEMENTWISE_ADD_OP_H_ 2 #define CAFFE2_OPERATORS_ELEMENTWISE_ADD_OP_H_ 8 #include "caffe2/operators/elementwise_ops.h" 9 #include "caffe2/operators/elementwise_ops_utils.h" 10 #include "caffe2/utils/math.h" 14 template <
class Context>
16 template <
typename TIn,
typename TOut>
18 const std::vector<int>& A_dims,
19 const std::vector<int>& B_dims,
23 Context* context)
const {
36 template <
typename TGrad,
typename TIn,
typename TOut>
38 const std::vector<int>& A_dims,
39 const std::vector<int>& B_dims,
46 Context* context)
const {
47 const std::vector<int> C_dims =
48 elementwise_ops_utils::ComputeBinaryBroadcastForwardDims(
50 std::vector<int> A_back_dims;
51 std::vector<int> B_back_dims;
52 elementwise_ops_utils::ComputeBinaryBroadcastBackwardDims(
53 A_dims, B_dims, &A_back_dims, &B_back_dims);
76 #endif // CAFFE2_OPERATORS_ELEMENTWISE_ADD_OP_H_
A global dictionary that holds information about what Caffe2 modules have been loaded in the current ...