def METHOD_NAME(self, input, is_infer=False):
    self.user_sparse_inputs = input[:4]
    self.mov_sparse_inputs = input[4:7]
    self.label_input = input[-1]
    if is_infer:
        self.batch_size = self.config.get("runner.infer_batch_size")
    else:
        self.batch_size = self.config.get("runner.train_batch_size")
    rank_model = DNNLayer(self.sparse_feature_number,
                          self.sparse_feature_dim, self.hidden_layers)
    predict = rank_model.forward(self.batch_size, self.user_sparse_inputs,
                                 self.mov_sparse_inputs, self.label_input)
    self.inference_target_var = predict
    if is_infer:
        uid = self.user_sparse_inputs[0]
        movieid = self.mov_sparse_inputs[0]
        label = self.label_input
        predict = predict
        fetch_dict = {
            'userid': uid,
            'movieid': movieid,
            'label': label,
            'predict': predict
        }
        return fetch_dict
    cost = F.square_error_cost(
        predict, paddle.cast(
            x=self.label_input, dtype='float32'))
    avg_cost = paddle.mean(cost)
    self._cost = avg_cost
    fetch_dict = {'Loss': avg_cost}
    return fetch_dict