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

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

本站已经建立2721天!

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