class_docstr: Non-tensorflow API for infering policy (and value function).
  
  Example:
    >>> ppo = PPOPolicyInferencer(...)
    >>> ppo.reset_frame_stack()
    >>> ob = env.reset()
    >>> while not done:
    >>>   logits, value = ppo.infer(ob)
    >>>   ob, _, done, _ = env.step(action)
class_docstr_tok: ["Non-tensorflow","API","for","infering","policy","(","and","value","function",")",".","Example",":",">",">",">","ppo","=","PPOPolicyInferencer","(","...",")",">",">",">","ppo.reset_frame_stack","(",")",">",">",">","ob","=","env.reset","(",")",">",">",">","while","not","done",":",">",">",">","logits",",","value","=","ppo.infer","(","ob",")",">",">",">","ob",",","_",",","done",",","_","=","env.step","(","action",")"]
docstr: Add new observation to frame stack and infer policy.
  
  Args:
    ob: array of shape (height, width, channels)
  
  Returns:
    logits and vf.
docstr_tok: ["Add","new","observation","to","frame","stack","and","infer","policy",".","Args",":","ob",":","array","of","shape","(","height",",","width",",","channels",")","Returns",":","logits","and","vf","."]
code: def infer(self, ob):
      """Add new observation to frame stack and infer policy.
  
      Args:
        ob: array of shape (height, width, channels)
  
      Returns:
        logits and vf.
      """
      self._add_to_stack(ob)
      logits, vf = self.infer_from_frame_stack(self._frame_stack)
      return logits, vf
  
imports: from __future__ import absolute_import
  from __future__ import division
  from __future__ import print_function
  import copy
  import os
  import re
  import gym
  import numpy
  import six
  from tensor2tensor.models.research.rl import get_policy
  from tensor2tensor.models.research.rl import make_simulated_env_fn_from_hparams
  from tensor2tensor.rl import rl_utils
  from tensor2tensor.rl.envs.simulated_batch_gym_env import FlatBatchEnv
  from tensor2tensor.utils import hparam
  from tensor2tensor.utils import trainer_lib
  from tensor2tensor.utils.misc_utils import camelcase_to_snakecase
  import tensorflow.compat.v1
label_desc: Use image node_id 5 for calling the PPOPolicyInferencer obj's underlying member method code with example usage: obj.infer(ob) and returns: logits,  vf