'Apply the backward pass transformation to the input data.
Arguments:
error (Tensor): deltas back propagated from the adjacent higher layer
alpha (float, optional): scale to apply to input for activation
gradient bprop.  Defaults to 1.0
beta (float, optional): scale to apply to output activation
gradient bprop.  Defaults to 0.0
Returns:
Tensor: deltas to propagate to the adjacent lower layer'

def bprop(self, error, alpha=1.0, beta=0.0):

    for l in reversed(self._layers):
        altered_tensor = l.be.distribute_data(error, l.parallelism)
        l.be.convert_data(error, l.get_is_mklop())
        if (l.deltas is not None):
            l.be.clean_data(l.deltas, l.get_is_mklop())
        if altered_tensor:
            l.revert_list.append(altered_tensor)
        if ((type(l.prev_layer) is BranchNode) or (l is self._layers[0])):
            error = l.bprop(error, alpha, beta)
        else:
            error = l.bprop(error)
        for tensor in l.revert_list:
            self.be.revert_tensor(tensor)
    return self._layers[0].deltas
