EADST

ONNX Inference with ONNX Runtime

ONNX Inference with ONNX Runtime

import torch
import onnxruntime
import numpy as np

# tensor input to numpy
# input_data=tensor.numpy()
# numpy input
input_data = np.load("test_data.npy")
session = onnxruntime.InferenceSession("model_name.onnx")
ort_inputs = {session.get_inputs()[0].name: input_data}
ort_outs = session.run(None, ort_inputs)
# tensor output
# out = torch.Tensor(ort_outs).cpu()
np.save("output.npy", ort_outs)
print("save output.npy done")
相关标签
About Me
XD
Goals determine what you are going to be.
Category
标签云
VSCode Shortcut hf Excel Paper Color Python Vim Datetime Hungarian TTS Bin 阿里云 Michelin 多线程 Diagram YOLO MD5 顶会 NameSilo Domain 版权 Image2Text LeetCode Input FP16 Plotly Food Bitcoin Attention Safetensors TensorFlow BeautifulSoup CUDA 腾讯云 Conda diffusers OpenAI ChatGPT QWEN TensorRT Proxy LaTeX scipy DeepStream Logo Quantize Heatmap Miniforge LLAMA git InvalidArgumentError 图形思考法 BF16 Disk Tiktoken Baidu Firewall Github OpenCV Quantization Cloudreve CTC VGG-16 RGB Web SQLite uWSGI PIP 签证 OCR Ubuntu Bert 搞笑 Translation PDF Git Password Hotel Windows 报税 VPN CC Django BTC Website LLM Crawler FP32 ONNX Linux Video SPIE Random GGML 关于博主 tqdm API 递归学习法 Pytorch RAR 音频 Base64 Vmess PyTorch 强化学习 EXCEL SQL Knowledge UI Gemma GIT NLTK Ptyhon Nginx Interview Card Bipartite v0.dev CLAP GPT4 PDB Magnet GPTQ printf XML FP8 Statistics Dataset SVR CSV COCO logger 图标 v2ray Permission Sklearn Land FP64 mmap CV LoRA Markdown Qwen2.5 ResNet-50 ModelScope 第一性原理 TSV Freesound HaggingFace Breakpoint Pandas Claude tar NLP Google Augmentation Review icon Qwen2 SAM Data llama.cpp UNIX git-lfs Paddle News 财报 HuggingFace 算法题 XGBoost Llama 继承 GoogLeNet Tracking Streamlit IndexTTS2 Algorithm uwsgi 多进程 CEIR Plate Animate Pickle JSON Docker Numpy FlashAttention Zip Anaconda Math DeepSeek Clash WAN FastAPI C++ 证件照 Search 域名 Qwen CAM Jupyter AI PyCharm Agent Use 公式 飞书 Distillation WebCrawler Template Tensor 云服务器 Hilton Jetson torchinfo 净利润 Mixtral transformers Pillow Transformers
站点统计

本站现有博文322篇,共被浏览785572

本站已经建立2479天!

热门文章
文章归档
回到顶部