def backward(self, dout, next_weights, flat, z):
    dz = next_weights.T.dot(dout)
    if (self._activation == 'relu'):
        dz[(z <= 0)] = 0
    dw = dz.dot(flat.T)
    db = np.sum(dz, axis=1).reshape(self._bias.shape)
    return (dw, db, dz)
def backward(self, dout, next_weights, flat, z):
    dz = next_weights.T.dot(dout)
    if (self._activation == 'relu'):
        dz[(z <= 0)] = 0
    dw = dz.dot(flat.T)
    db = np.sum(dz, axis=1).reshape(self._bias.shape)
    return (dw, db, dz)