dy = dy.reshape(self.output_size, -1) dh_next = np.zeros((self.hidden_size, 1))