class_docstr: A wrapper for pytorch RNNLM.
class_docstr_tok: ["A","wrapper","for","pytorch","RNNLM","."]
docstr: Predict log probabilities for given state and input x using the predictor.
  
  :param torch.Tensor state : The current state
  :param torch.Tensor x : The input
  :return a tuple (new state, log prob vector)
  :rtype (torch.Tensor, torch.Tensor)
docstr_tok: ["Predict","log","probabilities","for","given","state","and","input","x","using","the","predictor",".",":","param","torch.Tensor","state",":","The","current","state",":","param","torch.Tensor","x",":","The","input",":","return","a","tuple","(","new","state",",","log","prob","vector",")",":","rtype","(","torch.Tensor",",","torch.Tensor",")"]
code: def predict(self, state, x):
      """Predict log probabilities for given state and input x using the predictor.
  
      :param torch.Tensor state : The current state
      :param torch.Tensor x : The input
      :return a tuple (new state, log prob vector)
      :rtype (torch.Tensor, torch.Tensor)
      """
      if (
          hasattr(self.predictor, "normalized")
          and self.predictor.normalized
      ):
          return self.predictor(state, x)
      else:
          state, z = self.predictor(state, x)
          return state, F.log_softmax(z, dim=1)
  
imports: import logging
  from typing import Any, List, Tuple
  import torch
  import torch.nn
  import torch.nn.functional
  from espnet.nets.lm_interface import LMInterface
  from espnet.nets.pytorch_backend.e2e_asr import to_device
  from espnet.nets.scorer_interface import BatchScorerInterface
  from espnet.utils.cli_utils import strtobool
label_desc: Use image node_id 3 for calling the ClassifierWithState obj's underlying member method code with example usage: obj.predict(state, x) and returns: self, state,  F