def fit(self, X, y, report_interval=1000):
        if X is None or y is None:
            raise ValueError('X and/or y is None.')

        xp = np if 0 < self.gpu else cuda.cupy

        data_size = len(X)
        jump = data_size // self.batch_size
        cur_log_perp = xp.zeros(())
        start_at = time.time()
        cur_at = start_at
        accum_loss = 0
        batch_idxs = list(range(self.batch_size))
        self.model.predictor.reset_state()
        self.model.zerograds()
        for i in six.moves.range(jump * self.n_epoch):
            x = Variable(xp.asarray([X[(jump * j + i) % data_size] for j in batch_idxs]))
            t = Variable(xp.asarray([y[(jump * j + i) % data_size] for j in batch_idxs]))

            loss_i = self.model(x, t)
            accum_loss += loss_i
            cur_log_perp += loss_i.data

            if (i + 1) % self.bprop_len == 0:
                #logger.info('Updating parameters')
                accum_loss.backward()
                accum_loss.unchain_backward()
                accum_loss = 0
                self.optimizer.update()
                self.model.predictor.reset_state()
                self.model.zerograds()

            if (i + 1) % report_interval == 0:
                now = time.time()
                throuput = float(report_interval) / (now - cur_at)
                perp = math.exp(float(cur_log_perp) / report_interval)
                logger.info('iter {}/{} training perplexity: {:.2f} ({:.2f} iters/sec)'.format(i + 1, jump * self.n_epoch, perp, throuput))
                cur_at = now
                cur_log_perp.fill(0)
dataset/ETHPy150Open bizreach/common-ml/commonml/sklearn/rnn_estimator.py/RnnEstimator.fit/swapped operands of `<`