visionTransformer
语法
说明
[ 返回一个基数大小的 ViT 神经网络(8680 万个参数),其补丁大小为 16。该网络使用分辨率为 384×384 的 ImageNet 2012 数据集进行了微调。net,classNames] = visionTransformer
此特征需要 Deep Learning Toolbox™ 许可证以及 Computer Vision Toolbox™ 视觉变换器网络模型支持包。您可以从附加功能资源管理器下载此支持包。有关详细信息,请参阅获取和管理附加功能。
[ 返回具有指定模型名称的 ViT 神经网络。net,classNames] = visionTransformer(modelName)
[ 使用一个或多个名称-值参量指定其他选项。net,classNames] = visionTransformer(___,Name=Value)
示例
输入参数
名称-值参数
输出参量
参考
[1] Dosovitskiy, Alexey, Lucas Beyer, Alexander Kolesnikov, Dirk Weissenborn, Xiaohua Zhai, Thomas Unterthiner, Mostafa Dehghani et al. "An Image is Worth 16x16 words: Transformers for Image Recognition at Scale." Preprint, submitted June 3, 2021. https://doi.org/10.48550/arXiv.2010.11929.
[2] Srivastava, Nitish, Geoffrey Hinton, Alex Krizhevsky, Ilya Sutskever, and Ruslan Salakhutdinov. "Dropout: A Simple Way to Prevent Neural Networks from Overfitting." The Journal of Machine Learning Research 15, no. 1 (January 1, 2014): 1929–58
[3] Krizhevsky, Alex, Ilya Sutskever, and Geoffrey E. Hinton. "ImageNet Classification with Deep Convolutional Neural Networks." Communications of the ACM 60, no. 6 (May 24, 2017): 84–90. https://doi.org/10.1145/3065386.
扩展功能
版本历史记录
在 R2023b 中推出
另请参阅
patchEmbeddingLayer | trainnet (Deep Learning Toolbox) | trainingOptions (Deep Learning Toolbox) | dlnetwork (Deep Learning Toolbox)
主题
- 训练视觉变换器网络用于图像分类
- 在 MATLAB 中进行深度学习 (Deep Learning Toolbox)
- 深度学习层列表 (Deep Learning Toolbox)
- Deep Learning Tips and Tricks (Deep Learning Toolbox)
- Data Sets for Deep Learning (Deep Learning Toolbox)