(self, error)
return error
Use Autodiff.back_prop_grad to back propagate gradients for the
        corresponding tensors.

        Arguments:
            error (Tensor): deltas back propagated from the adjacent higher layer

        Returns:
            Tensor: deltas to propagate to the adjacent lower layer
Use Autodiff.back_prop_grad to back propagate gradients for the
        corresponding tensors.
Use Autodiff . back_prop_grad to back propagate gradients for the corresponding tensors .
def bprop(self, error):
        """
        Use Autodiff.back_prop_grad to back propagate gradients for the
        corresponding tensors.

        Arguments:
            error (Tensor): deltas back propagated from the adjacent higher layer

        Returns:
            Tensor: deltas to propagate to the adjacent lower layer
        """
        if not self.deltas:
            self.deltas = error.reshape((self.nfm, -1))

        # autodiff will automatically cache and reuse the object
        # if we know the `error` buffer at init, we can also create the autodiff
        # object at layer's init
        ad = Autodiff(self.fprop_op_tree, self.be, next_error=self.deltas)

        # back propagate
        ad.back_prop_grad([self.x, self.gamma, self.beta],
                          [self.deltas, self.grad_gamma, self.grad_beta])

        return error
def bprop ( self , error ) : if not self . deltas : self . deltas = error . reshape ( ( self . nfm , - 1 ) ) # autodiff will automatically cache and reuse the object # if we know the `error` buffer at init, we can also create the autodiff # object at layer's init ad = Autodiff ( self . fprop_op_tree , self . be , next_error = self . deltas ) # back propagate ad . back_prop_grad ( [ self . x , self . gamma , self . beta ] , [ self . deltas , self . grad_gamma , self . grad_beta ] ) return error