'Backward propagate the error through a convolutional network layer.
Arguments:
layer: the conv layer as a parameter object
F (CPUTensor): the weights (filters)
E (CPUTensor): errors
grad_I (CPUTensor): gradient to inputs (output delta)
Compounding Options:
X: tensor to use in bprop_relu or beta
can be same as grad_I for beta accumulate (this is default when None)
should be same shape as grad_I
bias: (K,1) tensor to use for adding bias to output
grad_I += bias
bsum: (K,1) tensor to accumulate batch sum over (used in batchnorm or bprop_bias)
bsum = sum(grad_I.reshape(K,-1), axis=1)
the sum operation is fully deterministic
alpha, beta:
grad_I = alpha*grad_I + beta*X
grad_I = alpha*grad_I + beta*grad_I   (if X==grad_I)
relu, slope: boolean flag to apply:
grad_I = max(grad_I, 0) + slope*min(grad_I, 0)
can be combined with bias (where bias is added first)
brelu, slope: boolean flag to apply:
grad_I *= (X > 0) + slope*(X < 0)
can be combined with bsum tensor to output bprop_bias'

def bprop_conv(self, layer, F, E, grad_I, X=None, bias=None, bsum=None, alpha=1.0, beta=0.0, relu=False, brelu=False, slope=0.0, layer_op=None):

    layer.xprop_conv(E, F, grad_I, X, bias, bsum, alpha, beta, relu, brelu, slope, backward=True, layer_op=layer)
