class_docstr: T5 style decoder with FiLM conditioning.
  
  Args:
      input_dims (`int`, *optional*, defaults to `128`):
          The number of input dimensions.
      targets_length (`int`, *optional*, defaults to `256`):
          The length of the targets.
      d_model (`int`, *optional*, defaults to `768`):
          Size of the input hidden states.
      num_layers (`int`, *optional*, defaults to `12`):
          The number of `DecoderLayer`'s to use.
      num_heads (`int`, *optional*, defaults to `12`):
          The number of attention heads to use.
      d_kv (`int`, *optional*, defaults to `64`):
          Size of the key-value projection vectors.
      d_ff (`int`, *optional*, defaults to `2048`):
          The number of dimensions in the intermediate feed-forward layer of `DecoderLayer`'s.
      dropout_rate (`float`, *optional*, defaults to `0.1`):
          Dropout probability.
class_docstr_tok: ["T5","style","decoder","with","FiLM","conditioning",".","Args",":","input_dims","(","`","int","`",",","*","optional","*",",","defaults","to","`","128","`",")",":","The","number","of","input","dimensions",".","targets_length","(","`","int","`",",","*","optional","*",",","defaults","to","`","256","`",")",":","The","length","of","the","targets",".","d_model","(","`","int","`",",","*","optional","*",",","defaults","to","`","768","`",")",":","Size","of","the","input","hidden","states",".","num_layers","(","`","int","`",",","*","optional","*",",","defaults","to","`","12","`",")",":","The","number","of","`","DecoderLayer","`","'s","to","use",".","num_heads","(","`","int","`",",","*","optional","*",",","defaults","to","`","12","`",")",":","The","number","of","attention","heads","to","use",".","d_kv","(","`","int","`",",","*","optional","*",",","defaults","to","`","64","`",")",":","Size","of","the","key-value","projection","vectors",".","d_ff","(","`","int","`",",","*","optional","*",",","defaults","to","`","2048","`",")",":","The","number","of","dimensions","in","the","intermediate","feed-forward","layer","of","`","DecoderLayer","`","'s",".","dropout_rate","(","`","float","`",",","*","optional","*",",","defaults","to","`","0.1","`",")",":","Dropout","probability","."]
code: def forward(
      self,
      encodings_and_masks,
      decoder_input_tokens,
      decoder_noise_time,
  ):
      batch, _, _ = decoder_input_tokens.shape
      assert decoder_noise_time.shape == (batch,)
  
      # decoder_noise_time is in [0, 1), so rescale to expected timing range.
      time_steps = get_timestep_embedding(
          decoder_noise_time * self.config.max_decoder_noise_time,
          embedding_dim=self.config.d_model,
          max_period=self.config.max_decoder_noise_time,
      ).to(dtype=self.dtype)
  
      conditioning_emb = self.conditioning_emb(time_steps).unsqueeze(1)
  
      assert conditioning_emb.shape == (
          batch,
          1,
          self.config.d_model * 4,
      )
  
      seq_length = decoder_input_tokens.shape[1]
  
      # If we want to use relative positions for audio context, we can just offset
      # this sequence by the length of encodings_and_masks.
      decoder_positions = torch.broadcast_to(
          torch.arange(seq_length, device=decoder_input_tokens.device),
          (batch, seq_length),
      )
  
      position_encodings = self.position_encoding(decoder_positions)
  
      inputs = self.continuous_inputs_projection(decoder_input_tokens)
      inputs += position_encodings
      y = self.dropout(inputs)
  
      # decoder: No padding present.
      decoder_mask = torch.ones(
          decoder_input_tokens.shape[:2],
          device=decoder_input_tokens.device,
          dtype=inputs.dtype,
      )
  
      # Translate encoding masks to encoder-decoder masks.
      encodings_and_encdec_masks = [
          (x, self.encoder_decoder_mask(decoder_mask, y))
          for x, y in encodings_and_masks
      ]
  
      # cross attend style: concat encodings
      encoded = torch.cat(
          [x[0] for x in encodings_and_encdec_masks], dim=1
      )
      encoder_decoder_mask = torch.cat(
          [x[1] for x in encodings_and_encdec_masks], dim=-1
      )
  
      for lyr in self.decoders:
          y = lyr(
              y,
              conditioning_emb=conditioning_emb,
              encoder_hidden_states=encoded,
              encoder_attention_mask=encoder_decoder_mask,
          )[0]
  
      y = self.decoder_norm(y)
      y = self.post_dropout(y)
  
      spec_out = self.spec_out(y)
      return spec_out
  
imports: import math
  from typing import Optional, Tuple
  import torch
  from torch import nn
  from ..configuration_utils import ConfigMixin, register_to_config
  from .attention_processor import Attention
  from .embeddings import get_timestep_embedding
  from .modeling_utils import ModelMixin
label_desc: Use image node_id 3 for calling the T5FilmDecoder obj's underlying member method code with example usage: obj.forward(encodings_and_masks, decoder_input_tokens, decoder_noise_time) and returns: spec_out