combined_r = np.vstack((r * h_prev, x_t)) h_ = np.tanh(np.dot(self.wh, combined_r) + self.bh)