def dfa(self, E: np.ndarray) -> tuple:
    (n_f, c_f, h_f, w_f) = self.W.shape
    E = np.dot(E, self.B).reshape(((- 1), n_f, self.h_out, self.w_out))
    if (self.dropout_rate > 0):
        E *= self.dropout_mask
    if (self.activation is None):
        E *= self.a_out
    else:
        E *= self.activation.gradient(self.a_out)
    dW = E.transpose((1, 2, 3, 0)).reshape(n_f, (- 1)).dot(self.x_cols.T).reshape(self.W.shape)
    db = np.sum(E, axis=(0, 2, 3))
    return (dW, db)
def dfa(self, E: np.ndarray) -> tuple:
    (n_f, c_f, h_f, w_f) = self.W.shape
    E = np.dot(E, self.B).reshape(((- 1), n_f, self.h_out, self.w_out))
    if (self.dropout_rate > 0):
        E *= self.dropout_mask
    if (self.activation is None):
        E *= self.a_out
    else:
        E *= self.activation.gradient(self.a_out)
    dW = E.transpose((1, 2, 3, 0)).reshape(n_f, (- 1)).dot(self.x_cols.T).reshape(self.W.shape)
    db = np.sum(E, axis=(0, 2, 3))
    return (dW, db)