EADST

Update the Weights in the ONNX Model

Update the Weights in the ONNX Model

import onnx

onnx_path = "test.onnx"
onnx_model = onnx.load(onnx_path)
graph = onnx_model.graph
node  = graph.node
for i in range(len(node)):
    # get the node and check the node type
    if node[i].op_type == 'Constant':
        att = node[i].attribute[0]
        # based on the node structure and data type to find the target
        # It is better to print the structure, and then load it step by step.
        if att and att.t and att.t.float_data:
            temp = att.t.float_data[0]
            node[i].attribute[0].t.float_data[0] = temp + 0.5
onnx.save(onnx_model, 'new_onnx.onnx')
相关标签
About Me
XD
Goals determine what you are going to be.
Category
标签云
Proxy XGBoost Conda API网关 Hotel Algorithm GPTQ CEIR mmap tqdm Cloudreve FP32 Web icon BTC Magnet YOLO DeepStream 论文速读 LoRA 继承 Llama OpenCV Miniforge Plate Quantization Streamlit Google COCO NameSilo PIP 第一性原理 CTC 报税 LLM 多线程 OpenAI Jev Linux Clash 版权 财报 Tiktoken Mixtral scipy Transformers WAN UNIX VSCode transformers BF16 Vim NLTK 飞书 CV llama.cpp Ptyhon AI Diagram Bitcoin Agent Translation Disk Python Sklearn Numpy 腾讯云 UI LLAMA 净利润 FP64 Paper Claude HuggingFace SQLite GoogLeNet Card CC PyCharm Input Knowledge printf CUDA Firewall uWSGI BeautifulSoup Dataset Excel MD5 Bert git PDF Use JSON 证件照 HaggingFace FlashAttention Permission TTS 签证 Hilton Website C++ Image2Text Crawler Heatmap OCR PyTorch Distillation Datetime 域名 torchinfo 搞笑 API Github EXCEL CAM Anaconda diffusers 图形思考法 ms-swift Pickle Interview Land 算法题 Harness Docker SPIE Safetensors Baidu DeepSeek 个人博客 v2ray Hungarian Markdown ResNet-50 Color CSV Video Pandas git-lfs Qwen2.5 Pillow Review SAM Augmentation TensorFlow Math LaTeX IndexTTS2 关于博主 uwsgi Rebuttal Zip hf FP16 VGG-16 音频 RAR Bin Tensor Food ModelScope 公式 强化学习 Base64 XML Bipartite InvalidArgumentError NLP LeetCode RGB Data TSV Pytorch Nginx RL Password FP8 WebCrawler Qwen2 QWEN 顶会 SQL Template v0.dev Attention Paddle ONNX Random Search SVR Shortcut News Tracking Ubuntu Vmess 递归学习法 Git Gemma Windows CLAP 多进程 GPT4 tar 阿里云 ChatGPT 论文 Logo TensorRT Domain logger Quantize Statistics GIT 长期记忆 Django VPN FastAPI Plotly Jetson PDB GGML 云服务器 Jupyter Michelin 图标 Animate Qwen 自我改进 Breakpoint Freesound
站点统计

本站现有博文340篇,共被浏览1017857次

本站已经建立2718天!

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