code: def __init__(
      self,
      dim_model: Optional[int] = None,
      dropout: Optional[float] = None,
      activation: Optional[Activation] = None,
      *args,
      **kwargs,
  ):
      super().__init__()
  
      # This feedforward requires a CUDA accelerator
      self.requires_cuda = False
  
      # This feedforward requires a context length which is squared, often due to 2D pooling
      self.requires_squared_context = False
  
file_path: xformers/xformers/components/feedforward/base.py
imports: from abc import ABCMeta, abstractmethod
  from dataclasses import asdict, dataclass
  from typing import Optional, Type, TypeVar
  import torch.nn
  from xformers.components import Activation
label_desc: Use image node_id 1 to create a new Feedforward object from inherited base classes: nn with example: obj = Feedforward(dim_model, dropout, activation)