当前位置: 首页 > news >正文

3. t2t_vit inference

前言

对vit 进行fp16推理

参考链接:

https://github.com/open-mmlab/mmpretrain/tree/master/configs/t2t_vit

run code :

https://mmclassification.readthedocs.io/en/latest/getting_started.html#inference-and-test-a-dataset

https://mmclassification.readthedocs.io/en/latest/tools/pytorch2onnx.html?highlight=onnx

run code and convert onnx

# run acc 
python3 tools/test.py configs/t2t_vit/t2t-vit-t-14_8xb64_in1k.py  ./t2t-vit-t-14_8xb64_in1k_20211220-f7378dd5.pth --metrics accuracy  --out result.pkl 2>&1 | tee test_run.log# convert onnx , bs=1
pip install onnx  onnxsim
python3 tools/deployment/pytorch2onnx.py \configs/t2t_vit/t2t-vit-t-14_8xb64_in1k.py \--checkpoint ./t2t-vit-t-14_8xb64_in1k_20211220-f7378dd5.pth  \--output-file ./t2t-vit-t-14.onnx  2>&1 | tee test_onnx.log# simplify
onnxsim t2t-vit-t-14.onnx  t2t-vit-t-14-
http://www.lryc.cn/news/210510.html

相关文章:

  • SpringMVC Day 05 : Spring 中的 Model
  • redis6.0源码分析:字典扩容与渐进式rehash
  • 【C++迭代器iterator】
  • 基于群居蜘蛛算法的无人机航迹规划
  • 火爆全网,Python+Requests+Pytest+YAML+Allure实现接口自动化测试(附源码)
  • 【深度学习】【NLP】如何得到一个分词器,如何训练自定义分词器:从基础到实践
  • 线程池的线程回收
  • 【2023.10.25练习】数据库-函数1
  • 基于水循环算法的无人机航迹规划-附代码
  • JVM调优(10)JVM的运行时数据区
  • Python网络爬虫介绍
  • iOS QR界面亮度调整
  • Linux shell编程学习笔记17:for循环语句
  • Go语言用Resty库编写的音频爬虫代码
  • AWTK 液体流动效果控件发布
  • 对mysql的联合索引的深刻理解
  • C的自定义类型
  • 我的创作纪念日 - 2048
  • 拿捏面试官,高频接口自动化测试面试题总结(附答案)狂收offer...
  • 大数据-Storm流式框架(六)---Kafka介绍
  • 自动驾驶的未来展望和挑战
  • 2.11、自定义图融合过程与量化管线
  • Linux——文件权限属性和权限管理
  • 数组与链表算法-单向链表算法
  • Oracle(6) Control File
  • 吴恩达《机器学习》2-5->2-7:梯度下降算法与理解
  • Pytorch detach()方法
  • CTF-php特性绕过
  • 人脸识别测试数据分析
  • MySQL 5.7限制general_log日志大小