---
description: Get in-depth insights about Ultralytics Tiny Encoder Modules such as Conv2d_BN, MBConv, ConvLayer, Attention, BasicLayer, and TinyViT. Improve your understanding of machine learning model components.
keywords: Ultralytics, Tiny Encoder, Conv2d_BN, MBConv, ConvLayer, Attention, BasicLayer, TinyViT, Machine learning modules, Ultralytics models
---
# Reference for `ultralytics/models/sam/modules/tiny_encoder.py`
!!! note
Full source code for this file is available at [https://github.com/ultralytics/ultralytics/blob/main/ultralytics/models/sam/modules/tiny_encoder.py](https://github.com/ultralytics/ultralytics/blob/main/ultralytics/models/sam/modules/tiny_encoder.py). Help us fix any issues you see by submitting a [Pull Request](/help/contributing/) 🛠️. Thank you 🙏!
---
## ::: ultralytics.models.sam.modules.tiny_encoder.Conv2d_BN
---
## ::: ultralytics.models.sam.modules.tiny_encoder.PatchEmbed
---
## ::: ultralytics.models.sam.modules.tiny_encoder.MBConv
---
## ::: ultralytics.models.sam.modules.tiny_encoder.PatchMerging
---
## ::: ultralytics.models.sam.modules.tiny_encoder.ConvLayer
---
## ::: ultralytics.models.sam.modules.tiny_encoder.Mlp
---
## ::: ultralytics.models.sam.modules.tiny_encoder.Attention
---
## ::: ultralytics.models.sam.modules.tiny_encoder.TinyViTBlock
---
## ::: ultralytics.models.sam.modules.tiny_encoder.BasicLayer
---
## ::: ultralytics.models.sam.modules.tiny_encoder.LayerNorm2d
---
## ::: ultralytics.models.sam.modules.tiny_encoder.TinyViT