--- description: Learn about TwoWayTransformer and Attention modules in Ultralytics. Leverage these tools to enhance your AI models. keywords: Ultralytics, TwoWayTransformer, Attention, AI models, transformers --- ## TwoWayTransformer --- ### ::: ultralytics.models.sam.modules.transformer.TwoWayTransformer <br><br> ## TwoWayAttentionBlock --- ### ::: ultralytics.models.sam.modules.transformer.TwoWayAttentionBlock <br><br> ## Attention --- ### ::: ultralytics.models.sam.modules.transformer.Attention <br><br>