1818
1919def convolve2GradientNN (incoming_gradient , original_signal , original_kernel , convolved_output , stride = (1 , 1 ), padding = (0 , 0 ), dilation = (1 , 1 ), gradType = CONV_GRADIENT .DEFAULT ):
2020 """
21- This version of convolution is consistent with the machine learning
22- formulation that will spatially convolve a filter on 2-dimensions against a
23- signal. Multiple signals and filters can be batched against each other.
24- Furthermore, the signals and filters can be multi-dimensional however their
25- dimensions must match.
21+ Function for calculating backward pass gradient of 2D convolution.
22+
23+ This function calculates the gradient with respect to the output of the
24+ \r ef convolve2NN() function that uses the machine learning formulation
25+ for the dimensions of the signals and filters
26+
27+ Multiple signals and filters can be batched against each other, however
28+ their dimensions must match.
2629
2730 Example:
2831 Signals with dimensions: d0 x d1 x d2 x Ns
@@ -33,12 +36,18 @@ def convolve2GradientNN(incoming_gradient, original_signal, original_kernel, con
3336 Parameters
3437 -----------
3538
36- signal: af.Array
39+ incoming_gradient: af.Array
40+ - Gradients to be distributed in backwards pass
41+
42+ original_signal: af.Array
3743 - A 2 dimensional signal or batch of 2 dimensional signals.
3844
39- kernel : af.Array
45+ original_kernel : af.Array
4046 - A 2 dimensional kernel or batch of 2 dimensional kernels.
4147
48+ convolved_output: af.Array
49+ - output of forward pass of convolution
50+
4251 stride: tuple of ints. default: (1, 1).
4352 - Specifies how much to stride along each dimension
4453
0 commit comments