class_docstr: A vanilla Transformer Decoder block
  
  ... note: this implementation is not (yet ?) reversible
class_docstr_tok: ["A","vanilla","Transformer","Decoder","block","...","note",":","this","implementation","is","not","(","yet","?",")","reversible"]
code: def from_config(cls, config: xFormerDecoderConfig):
      return cls(config)
  
imports: import logging
  from dataclasses import asdict
  from typing import Optional, Tuple, Union
  import torch
  import torch.nn
  from xformers._deprecation_warning import deprecated_function
  from xformers.components import PatchEmbeddingConfig, PostNorm, PreNorm, Residual, ResidualNormStyle, build_multi_head_attention, build_patch_embedding
  from xformers.components.attention import AttentionMask
  from xformers.components.feedforward import build_feedforward
  from xformers.components.positional_embedding import build_positional_embedding
  from xformers.components.residual import get_deepnorm_coefficients
  from xformers.components.simplicial_embedding import SimplicialEmbedding
  from xformers.factory.block_configs import NormalizationType, xFormerDecoderConfig, xFormerEncoderConfig
label_desc: Use image node_id 2 for calling the xFormerDecoderBlock obj's underlying member method code with example usage: obj.from_config(cls, config) and returns: cls