class_docstr: A wrapper for a chainer RNNLM
  
  :param link.Chain predictor : The RNNLM
  :param function lossfun: The loss function to use
  :param int/str label_key:
class_docstr_tok: ["A","wrapper","for","a","chainer","RNNLM",":","param","link.Chain","predictor",":","The","RNNLM",":","param","function","lossfun",":","The","loss","function","to","use",":","param","int\/str","label_key",":"]
docstr: Predict final log probabilities for given state using the predictor
  
  :param state : the state
  :return log probability vector
  :rtype cupy/numpy array
docstr_tok: ["Predict","final","log","probabilities","for","given","state","using","the","predictor",":","param","state",":","the","state",":","return","log","probability","vector",":","rtype","cupy\/numpy","array"]
code: def final(self, state):
      """Predict final log probabilities for given state using the predictor
  
      :param state : the state
      :return log probability vector
      :rtype cupy/numpy array
  
      """
      if hasattr(self.predictor, "final"):
          return self.predictor.final(state)
      else:
          return 0.0
  
imports: import copy
  import json
  import logging
  import chainer
  import chainer.functions
  import chainer.links
  import numpy
  from chainer import link, reporter, training
  from chainer.dataset import convert
  from chainer.functions.loss import softmax_cross_entropy
  from chainer.training import extensions
  import espnet.nets.chainer_backend.deterministic_embed_id
  from espnet.lm.lm_utils import MakeSymlinkToBestModel, ParallelSentenceIterator, compute_perplexity, count_tokens, read_tokens
  from espnet.nets.lm_interface import LMInterface
  from espnet.optimizer.factory import dynamic_import_optimizer
  from espnet.scheduler.chainer import ChainerScheduler
  from espnet.scheduler.scheduler import dynamic_import_scheduler
  from espnet.utils.deterministic_utils import set_deterministic_chainer
  from espnet.utils.training.evaluator import BaseEvaluator
  from espnet.utils.training.iterators import ShufflingEnabler
  from espnet.utils.training.tensorboard_logger import TensorboardLogger
  from espnet.utils.training.train_utils import check_early_stop, set_early_stop
label_desc: Use image node_id 4 for calling the ClassifierWithState obj's underlying member method code with example usage: obj.final(state) and returns: self, int