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 __init__(
      self,
      input_dims: int = 128,
      targets_length: int = 256,
      max_decoder_noise_time: float = 2000.0,
      d_model: int = 768,
      num_layers: int = 12,
      num_heads: int = 12,
      d_kv: int = 64,
      d_ff: int = 2048,
      dropout_rate: float = 0.1,
  ):
      super().__init__()
  
      self.conditioning_emb = nn.Sequential(
          nn.Linear(d_model, d_model * 4, bias=False),
          nn.SiLU(),
          nn.Linear(d_model * 4, d_model * 4, bias=False),
          nn.SiLU(),
      )
  
      self.position_encoding = nn.Embedding(targets_length, d_model)
      self.position_encoding.weight.requires_grad = False
  
      self.continuous_inputs_projection = nn.Linear(
          input_dims, d_model, bias=False
      )
  
      self.dropout = nn.Dropout(p=dropout_rate)
  
      self.decoders = nn.ModuleList()
      for lyr_num in range(num_layers):
          # FiLM conditional T5 decoder
          lyr = DecoderLayer(
              d_model=d_model,
              d_kv=d_kv,
              num_heads=num_heads,
              d_ff=d_ff,
              dropout_rate=dropout_rate,
          )
          self.decoders.append(lyr)
  
      self.decoder_norm = T5LayerNorm(d_model)
  
      self.post_dropout = nn.Dropout(p=dropout_rate)
      self.spec_out = nn.Linear(d_model, input_dims, bias=False)
  
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 1 to create a new T5FilmDecoder object from inherited base classes: ModelMixin, ConfigMixin with example: obj = T5FilmDecoder(input_dims, targets_length, max_decoder_noise_time, d_model, num_layers, num_heads, d_kv, d_ff, dropout_rate)