class_docstr: Glue together encoder transform, entropy model and decoder transform
docstr: Encodes first scene/latent by creating a fake previous scene/latent
  
  Args:
      scene: single scene/latent tensor, expected shape [B, C, H, W], where C is
          equal to `compression_channels` that will be used by the `etropy_model`
      cache: Cache object
  
  Returns:
      tuple of two elements:
          - State object
          - Bottleneck object
docstr_tok: ["Encodes","first","scene\/latent","by","creating","a","fake","previous","scene\/latent","Args",":","scene",":","single","scene\/latent","tensor",",","expected","shape","[","B",",","C",",","H",",","W","]",",","where","C","is","equal","to","`","compression_channels","`","that","will","be","used","by","the","`","etropy_model","`","cache",":","Cache","object","Returns",":","tuple","of","two","elements",":","-","State","object","-","Bottleneck","object"]
code: def encode_Iscene(
      self, scene: Tensor, cache: memoize.Cache
  ) -> Tuple[State, Bottleneck]:
      """Encodes first scene/latent by creating a fake previous scene/latent
  
      Args:
          scene: single scene/latent tensor, expected shape [B, C, H, W], where C is
              equal to `compression_channels` that will be used by the `etropy_model`
          cache: Cache object
  
      Returns:
          tuple of two elements:
              - State object
              - Bottleneck object
      """
      # Create a fake previous latent and pass it through entropy model fwd pass
      fake_previous_latent = self._temporal_pad_token_maker(scene.shape)
      assert fake_previous_latent.shape == scene.shape
      processed = self.entropy_model.process_previous_latent_q(
          fake_previous_latent
      )  # PreviousLatent(quantized: Tensor, processed: Tensor)
      output = self.entropy_model(
          latent_unquantized=scene, previous_latents=(processed,)
      )  # TemporalEntropyModelOut object
  
      bottleneck = Bottleneck(
          output.perturbed_latent,  # [B, C, H, W]
          output.bits,  # [B', seq_len, C]
          output.features,  # [B, d_model, H, W]
      )
      decode_Iscene = memoize.bind(self.decode_Iscene, cache)
      _, state = decode_Iscene(bottleneck)
      return state, bottleneck
  
imports: import itertools
  import math
  from typing import Generator, List, NamedTuple, Optional, Sequence, Tuple, Union
  import torch
  import torch.nn
  import utils.memoize
  from datamodules.video_data_api import Scenes, VideoData
  from neural.entropy_model import PreviousLatent, VCTEntropyModel
  from torch import Tensor
label_desc: Use image node_id 2 for calling the VCTPipeline obj's underlying member method code with example usage: obj.encode_Iscene(scene, cache) and returns: state,  bottleneck