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

本站现有博文321篇,共被浏览773679

本站已经建立2463天!

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