33 const T *incoming_data,
const Shape &filter_shape,
const T *filter_data,
34 T *padded_filter_data,
const Shape &grad_shape, T *grad_data,
bool pad_filter,
35 T *filter_buffers_data, T *filter_dim_buffers_data)
38 throw std::runtime_error(
"Not support different length strides");
41 throw std::runtime_error{
"Not support dilation other than 1."};
43 const int batch =
MatchingDim(incoming_shape, 0, grad_shape, 0);
44 const int input_depth = grad_shape.
Dims(3);
45 const int output_depth = incoming_shape.
Dims(3);
46 const int incoming_height = incoming_shape.
Dims(1);
47 const int incoming_width = incoming_shape.
Dims(2);
48 const int grad_height = grad_shape.
Dims(1);
49 const int grad_width = grad_shape.
Dims(2);
52 const int filter_height = filter_shape.
Dims(1);
53 const int filter_width = filter_shape.
Dims(2);
58 batch, grad_height, grad_width, input_depth, filter_height, filter_width, depth_multiplier,
59 stride, pad_height, pad_width, incoming_height, incoming_width, output_depth, incoming_data,
60 filter_data, padded_filter_data, grad_data, pad_filter, filter_buffers_data,
61 filter_dim_buffers_data);
66 const T *incoming_data,
const Shape &input_shape,
const T *input_data,
67 const Shape &filter_grad_shape, T *filter_grad_data, T *padded_filter_data,
68 T *filter_buffers_data)
71 throw std::runtime_error(
"Not support different length strides");
74 throw std::runtime_error{
"Not support dilation other than 1."};
76 const int batch =
MatchingDim(incoming_shape, 0, input_shape, 0);
77 const int input_depth = input_shape.
Dims(3);
78 const int output_depth = incoming_shape.
Dims(3);
79 const int incoming_height = incoming_shape.
Dims(1);
80 const int incoming_width = incoming_shape.
Dims(2);
81 const int input_height = input_shape.
Dims(1);
82 const int input_width = input_shape.
Dims(2);
85 const int filter_height = filter_grad_shape.
Dims(1);
86 const int filter_width = filter_grad_shape.
Dims(2);
91 batch, input_height, input_width, input_depth, filter_height, filter_width, depth_multiplier,
92 stride, pad_height, pad_width, incoming_height, incoming_width, output_depth, incoming_data,
93 input_data, filter_grad_data, padded_filter_data, filter_buffers_data);
void backpropFilter(const DepthwiseConvParams ¶ms, const Shape &incoming_shape, const T *incoming_data, const Shape &input_shape, const T *input_data, const Shape &filter_grad_shape, T *filter_grad_data, T *padded_filter_data, T *filter_buffers_data)
void backpropInput(const DepthwiseConvParams ¶ms, const Shape &incoming_shape, const T *incoming_data, const Shape &filter_shape, const T *filter_data, T *padded_filter_data, const Shape &grad_shape, T *grad_data, bool pad_filter, T *filter_buffers_data, T *filter_dim_buffers_data)