---
title: models.sam.sam3.decoder API Reference
description: Explore the ultralytics.models.sam.sam3.decoder module, including transformer decoder layers used in SAM3 model heads.
keywords: Ultralytics, SAM3, SAM, transformer decoder, attention, segmentation, deep learning, Python
---

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

!!! success "Improvements"

    This page is sourced from [https://github.com/ultralytics/ultralytics/blob/main/ultralytics/models/sam/sam3/decoder.py](https://github.com/ultralytics/ultralytics/blob/main/ultralytics/models/sam/sam3/decoder.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.decoder.TransformerDecoderLayer

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

## ::: ultralytics.models.sam.sam3.decoder.TransformerDecoder

<br><br>
