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

本站现有博文333篇,共被浏览913643

本站已经建立2616天!

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