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

本站现有博文328篇,共被浏览837454

本站已经建立2541天!

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