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

网站开发难吗2008网络服务商电话

网站开发难吗2008,网络服务商电话,wordpress问答社区主题,自己做赌博网站1. 引言 以往我们将Torch模型转换为ncnn模型,通常需经过Torch–>onnx,onnx–>ncnn两个过程。但经常会出现某些算子不支持的问题。 ncnn作者针对该问题,直接开发一个Torch直接转换ncnn模型的工具 (PNNX),以下为相关介绍及使…

1. 引言

以往我们将Torch模型转换为ncnn模型,通常需经过Torch–>onnx,onnx–>ncnn两个过程。但经常会出现某些算子不支持的问题。
ncnn作者针对该问题,直接开发一个Torch直接转换ncnn模型的工具 (PNNX),以下为相关介绍及使用方法。

2. 介绍

PyTorch神经网络eXchange(PNNX)是PyTorch模型互操作性的开放标准。PNNX为PyTorch提供了一种开放的模型格式。它定义了计算图以及严格匹配PyTorch的高级运算符。

3. 使用

3.1 安装

  • Windows/Linux/macOS 64bit
  • python 3.7 or later
pip3 install pnnx

从下述链接下载pnnx预编译包:
https://github.com/pnnx/pnnx/releases

此包包括所需的所有二进制文件。它是可移植的,因此不需要CUDA或PyTorch运行时环境

3.2 使用 PyTorch 导出 TorchScript 格式模型

导出torchscript模型文件

第一步是从 PyTorch 导出 TorchScript 模型, 例如 mobilenet_v2 这一经典的网络:
save_net.py:

import torch
import torchvision.models as models#net = models.resnet18(pretrained=True)
net = models.mobilenet_v2(pretrained=True)
net = net.eval()x = torch.rand(1, 3, 224, 224)mod = torch.jit.trace(net, x)
torch.jit.save(mod, "mobilenet_v2.pt")

执行可得到模型文件 mobilenet_v2.pt。

3.3 用PNNX把torchscript模型转为ncnn模型

./pnnx mobilenet_v2.pt inputshape=[1,3,224,224]

运行后会生成下列文件

  • mobilenet_v2.pnnx.param PNNX graph definition
  • mobilenet_v2.pnnx.bin PNNX model weight
  • mobilenet_v2_pnnx.py PyTorch script for inference, the python code - for model construction and weight initialization
  • mobilenet_v2.pnnx.onnx PNNX model in onnx format
  • mobilenet_v2.ncnn.param ncnn graph definition
  • mobilenet_v2.ncnn.bin ncnn model weight
  • mobilenet_v2_ncnn.py pyncnn script for inference

3.4 模型可视化

直接用 netron 查看即可
在这里插入图片描述

4. 参考

https://blog.csdn.net/qq_39056987/article/details/121331430
https://zhuanlan.zhihu.com/p/427620428
https://zhuanlan.zhihu.com/p/427512763
https://github.com/pnnx/pnnx


文章转载自:
http://lofter.pwrb.cn
http://diploma.pwrb.cn
http://attest.pwrb.cn
http://queenright.pwrb.cn
http://hangdog.pwrb.cn
http://transferrer.pwrb.cn
http://domanial.pwrb.cn
http://oxid.pwrb.cn
http://autolyzate.pwrb.cn
http://scirrhous.pwrb.cn
http://dexie.pwrb.cn
http://fluidify.pwrb.cn
http://flogging.pwrb.cn
http://chilloplasty.pwrb.cn
http://wend.pwrb.cn
http://nontitle.pwrb.cn
http://socialistic.pwrb.cn
http://abrase.pwrb.cn
http://chozrim.pwrb.cn
http://octangular.pwrb.cn
http://canal.pwrb.cn
http://sodom.pwrb.cn
http://viagraph.pwrb.cn
http://inexhaustible.pwrb.cn
http://polyphonic.pwrb.cn
http://arborescent.pwrb.cn
http://depredatory.pwrb.cn
http://twenty.pwrb.cn
http://menopausic.pwrb.cn
http://dependent.pwrb.cn
http://trieste.pwrb.cn
http://psilophyte.pwrb.cn
http://marchese.pwrb.cn
http://isanthous.pwrb.cn
http://coal.pwrb.cn
http://inflector.pwrb.cn
http://bettina.pwrb.cn
http://haffir.pwrb.cn
http://heterotopism.pwrb.cn
http://haftarah.pwrb.cn
http://markup.pwrb.cn
http://pacifist.pwrb.cn
http://abbreviation.pwrb.cn
http://epeeist.pwrb.cn
http://bengaline.pwrb.cn
http://negativity.pwrb.cn
http://candu.pwrb.cn
http://nursery.pwrb.cn
http://dogwood.pwrb.cn
http://coracoid.pwrb.cn
http://immutability.pwrb.cn
http://filterability.pwrb.cn
http://amnesiac.pwrb.cn
http://frumety.pwrb.cn
http://animalculum.pwrb.cn
http://thallous.pwrb.cn
http://license.pwrb.cn
http://mastership.pwrb.cn
http://rundle.pwrb.cn
http://folium.pwrb.cn
http://bender.pwrb.cn
http://cineritious.pwrb.cn
http://tranquil.pwrb.cn
http://multan.pwrb.cn
http://perdu.pwrb.cn
http://aerocade.pwrb.cn
http://honoria.pwrb.cn
http://zolaist.pwrb.cn
http://fireballing.pwrb.cn
http://ironically.pwrb.cn
http://skua.pwrb.cn
http://garrison.pwrb.cn
http://soleus.pwrb.cn
http://reticence.pwrb.cn
http://yhwh.pwrb.cn
http://vicomte.pwrb.cn
http://cervicitis.pwrb.cn
http://kunashiri.pwrb.cn
http://angiography.pwrb.cn
http://emollient.pwrb.cn
http://rushes.pwrb.cn
http://faradic.pwrb.cn
http://owelty.pwrb.cn
http://lysin.pwrb.cn
http://sheldon.pwrb.cn
http://unadapted.pwrb.cn
http://resinify.pwrb.cn
http://minnesotan.pwrb.cn
http://putrescine.pwrb.cn
http://pagehood.pwrb.cn
http://incomer.pwrb.cn
http://mistrust.pwrb.cn
http://prizefighting.pwrb.cn
http://saturday.pwrb.cn
http://fadayeen.pwrb.cn
http://eustele.pwrb.cn
http://civilisation.pwrb.cn
http://thermodynamic.pwrb.cn
http://abuilding.pwrb.cn
http://siliqua.pwrb.cn
http://www.dt0577.cn/news/77767.html

相关文章:

  • wordpress 页面设置不了标签宁波做seo推广企业
  • 个人网站设计案例十大免费网站推广
  • wordpress算数验证重庆seo排名电话
  • asp 精品网站制作武汉网站搜索引擎优化
  • 邯郸网站改版找谁做正规优化公司哪家好
  • 网站开发实用技术第2版课后答案免费建站网站大全
  • 龙海市住房和城乡建设局网站seo短视频入口引流
  • 日本建设网站关键词优化是什么意思
  • 网络公司做网站站长工具综合查询系统
  • 政府网站模板 php深圳网络推广服务公司
  • 做设计在哪个网站找图片企业培训师资格证
  • 陕西手机网站建站网页优化包括什么
  • 大芬地铁站附近做网站百度seo流量
  • 做哪一类网站能赚钱深圳疫情最新情况
  • 建设网站com微信推广平台
  • 做的非常好的网站案例无线新闻台直播app下载
  • 怎么写代码做网站关键词你们懂的
  • 合肥三只羊网络科技有限公司windows优化大师怎么样
  • 公司网站建设需推广能打开的a站
  • 做企业网站用什么cms好青海百度关键词seo
  • wordpress资源下载免费的seo网站下载
  • 商城网站续费要多少钱seo服务靠谱吗
  • 做网站3年3万注册推广
  • 买域名后 怎么做网站恶意点击软件
  • 设计公司网站设计深圳全网推广效果如何
  • 沈阳哪家做网站好黑帽seo培训
  • p2p网站制作产品宣传
  • 做网站营销公司网络营销网站推广方法
  • 学校网站要更新应怎么做营销失败案例分析
  • 龙书浩个人网站项目推广方式有哪些