深度学习·VPT

VPT

  • 核心思想:冻结backbone,在encoder的输入中
    引入额外可学习的token,微调这些token和decoder部分,避免直接调整backbone。
  • 两种方法:Deep和Shallow
    只有第一层的prompt token是可以学习的参数

    每一层 transformer layer的prompt token都是可以学习的参数

VPT的应用

  • VIT模型
  • SWIN transformer,这个有点不同,没有[cls] token

VPT on hierarchical Transformers. We extend VPT to Swin [52], which employs MSA within local shifted windows and merges patch embeddings at deeper layers. For simplicity and without loss of generality, we implement VPT in the most straightforward manner: the prompts are attended within the local windows, but are ignored during patch merging stages. The experiments are conducted on the ImageNet-21k supervised pre-trained Swin-Base. VPT continues to outperform other parameter-efficient fine-tuning methods (b, c) for all three subgroups of VTAB Tab. 2, though in this case Full yields the highest accuracy scores overall (at a heavy cost in total parameters).

VPT的探究

prompt的位置

  • 结论:就是作为独立的输入最好
  • 1:直接单独作为输入的一部分,与patch embedding分开
  • 2:与patch embedding进行累加
  • 3:在embedding,前加入prompt
  • 4:在embeddingprompt作为一个通道加入

prompt length

  • 可以看到10~100这个区间 最合适。
相关推荐
weixin_456904277 分钟前
深度学习模型边缘部署与B/S架构
人工智能·深度学习·架构
MichaelIp30 分钟前
利用ms-swift微调和百炼平台微调大模型
人工智能·gpt·自然语言处理·prompt·aigc·swift·agi
SHIPKING39336 分钟前
【机器学习&深度学习】向量模型与重排序模型:RAG 的双引擎解析
人工智能·深度学习·机器学习·向量模型·重排序模型
飞哥数智坊1 小时前
元宝AI:微信中帮我看阅兵的“朋友”
人工智能
lypzcgf1 小时前
Coze源码分析-工作空间-资源查询-后端源码
人工智能·后端·系统架构·开源·go
zl291 小时前
论文学习30:LViT: Language Meets Vision Transformerin Medical Image Segmentation
深度学习·学习·计算机视觉·transformer
海天一色y1 小时前
动手学深度学习
人工智能·深度学习
恒点虚拟仿真1 小时前
AI+虚拟仿真实践教学,照亮智慧能源教育之路
人工智能·ai·能源·虚拟仿真实验·人工智能+虚拟仿真·ai教学
fzy00851 小时前
教育项目管理工具新趋势:可视化与自动化如何提升效率?
大数据·人工智能·自动化
AI Echoes1 小时前
LangGraph 重要注意事项和常见问题
人工智能·python·langchain·agent