---
title: models.sam.sam3.encoder API Reference
description: Explore the ultralytics.models.sam.sam3.encoder module, including transformer encoder layers and fusion blocks for SAM3.
keywords: Ultralytics, SAM3, SAM, transformer encoder, fusion, attention, deep learning, Python
---

# Reference for `ultralytics/models/sam/sam3/encoder.py`

!!! success "Improvements"

    This page is sourced from [https://github.com/ultralytics/ultralytics/blob/main/ultralytics/models/sam/sam3/encoder.py](https://github.com/ultralytics/ultralytics/blob/main/ultralytics/models/sam/sam3/encoder.py). Have an improvement or example to add? Open a [Pull Request](https://docs.ultralytics.com/help/contributing) — thank you! 🙏

<br>

## ::: ultralytics.models.sam.sam3.encoder.TransformerEncoderLayer

<br><br><hr><br>

## ::: ultralytics.models.sam.sam3.encoder.TransformerEncoder

<br><br><hr><br>

## ::: ultralytics.models.sam.sam3.encoder.TransformerEncoderFusion

<br><br><hr><br>

## ::: ultralytics.models.sam.sam3.encoder.pool_text_feat

<br><br>
