class_docstr: Stochastic Variational Video Prediction From Basic Model!
class_docstr_tok: ["Stochastic","Variational","Video","Prediction","From","Basic","Model","!"]
code: def next_frame(
      self,
      frames,
      actions,
      rewards,
      target_frame,
      internal_states,
      video_features,
  ):
      del target_frame
  
      if self.has_policies or self.has_values:
          raise NotImplementedError(
              "Parameter sharing with policy not supported."
          )
  
      latent, latent_mean, latent_std = video_features
      frames, actions, rewards = frames[0], actions[0], rewards[0]
  
      extra_loss = 0.0
      if internal_states is None:
          internal_states = [None] * (
              5 if self.hparams.small_mode else 7
          )
          if latent_mean is not None:
              extra_loss = self.get_extra_loss(
                  [latent_mean], [latent_std]
              )
  
      (
          pred_image,
          internal_states,
          mid_outputs,
      ) = self.construct_predictive_tower(
          frames, None, actions, internal_states, latent
      )
  
      if not self.has_rewards:
          return (
              pred_image,
              None,
              None,
              None,
              extra_loss,
              internal_states,
          )
  
      pred_reward = self.reward_prediction(
          pred_image, actions, rewards, latent, mid_outputs
      )
      return (
          pred_image,
          pred_reward,
          None,
          None,
          extra_loss,
          internal_states,
      )
  
imports: from __future__ import absolute_import
  from __future__ import division
  from __future__ import print_function
  from tensor2tensor.layers import common_layers
  from tensor2tensor.layers import common_video
  from tensor2tensor.layers import discretization
  from tensor2tensor.models.video import base
  from tensor2tensor.models.video import base_vae
  from tensor2tensor.utils import contrib
  from tensor2tensor.utils import registry
  import tensorflow.compat.v1
label_desc: Use image node_id 11 for calling the NextFrameSv2p obj's underlying member method code with example usage: obj.next_frame(frames, actions, rewards, target_frame, internal_states, video_features) and returns: pred_image,  pred_reward,  None,  None,  extra_loss,  internal_states, pred_image,  None,  None,  None,  extra_loss,  internal_states