onnxruntime - 在 Onnxruntime 中替换 TorchScript Struct IValue
问题描述
将我的 pytorch 模型转换为 onnx 后,我需要使用 onnxruntime 实现模型。在 torch::jit 源代码中有一个初始化为 IValue 的变量,我想用在 onnxruntime 中具有相同功能的结构替换它。有人熟悉 torchscript 和 onnxruntime 吗?代码如下:
torch::jit::IValue subsampling_cache_;
subsampling_cache_ = std::move(torch::jit::IValue());
解决方案
推荐阅读
- java - 如何在不删除重复项的情况下对列表进行排序?
- wix - WiX 安装程序:如何在 WixUI_InstallDir 模式下隐藏/删除欢迎对话框
- c++ - 在异常处理程序中抛出异常仅在释放模式下失败
- firebase - 使用 Glide 加载 Firebase 存储映像会产生计费费用吗?
- java - 在 Spring AOP 中使用 @AfterReturning 修改类中的值
- google-cloud-platform - GKE 错误:版本“cloud.google.com/v1”中类型“BackendConfig”没有匹配项
- javascript - 对所有操作系统的网站仅使用一种字体 - 需要哪些文件?
- django - django-elasticsearch-dsl-drf 建议 url 给出 404 错误
- f# - F# Canopy:不拾取某些页面元素
- image-processing - 将 2D 图像变形到另一个图像上