From da03961aa6bb126fbb38ed6931a41e7413103f9c Mon Sep 17 00:00:00 2001 From: ZhangGe6 Date: Tue, 10 May 2022 12:21:34 +0800 Subject: [PATCH] fix external data loading error for unix platform issue#https://github.com/ZhangGe6/onnx-modifier/issues/1 --- onnx_modifier.py | 2 +- readme.md | 6 +----- readme_zh-CN.md | 2 -- 3 files changed, 2 insertions(+), 8 deletions(-) diff --git a/onnx_modifier.py b/onnx_modifier.py index 7c081a9..715a6d3 100644 --- a/onnx_modifier.py +++ b/onnx_modifier.py @@ -23,7 +23,7 @@ class onnxModifier: def from_name_stream(cls, name, stream): # https://leimao.github.io/blog/ONNX-IO-Stream/ stream.seek(0) - model_proto = onnx.load_model(stream, onnx.ModelProto) + model_proto = onnx.load_model(stream, onnx.ModelProto, load_external_data=False) return cls(name, model_proto) def reload(self): diff --git a/readme.md b/readme.md index 9ca4d04..1e445d2 100644 --- a/readme.md +++ b/readme.md @@ -8,7 +8,7 @@ To edit an ONNX model, One common way is to visualize the model graph, and edit What if we have a tool, which allow us to **edit and preview the editing effect in a totally visualization fashion**? -Then `onnx-modifier` comes. With it, we can focus on editing the model graph in the visualization pannel. All the editing information will be summarized and processed by Python ONNX automatically at last. Then our time can be saved! :rocket: +Then `onnx-modifier` comes. With it, we can focus on editing the model graph in the visualization pannel. All the editing information will be summarized and processed by Python ONNX API automatically at last. Then our time can be saved! :rocket: `onnx-modifier` is built based on the popular network viewer [Netron](https://github.com/lutzroeder/netron) and the lightweight web application framework [flask](https://github.com/pallets/flask). @@ -110,7 +110,3 @@ For quick testing, some typical sample models are provided as following. Most of - ONNX IO Stream [Leimao's Blog](https://leimao.github.io/blog/ONNX-IO-Stream/) - [onnx-utils](https://github.com/saurabh-shandilya/onnx-utils) - [sweetalert](https://github.com/t4t5/sweetalert) - - - -[https://github.com/onnx/models/blob/main/vision/classification/mobilenet/model/mobilenetv2-7.onnx]: diff --git a/readme_zh-CN.md b/readme_zh-CN.md index 9eb8421..293aee6 100644 --- a/readme_zh-CN.md +++ b/readme_zh-CN.md @@ -104,5 +104,3 @@ - ONNX IO Stream [Leimao's Blog](https://leimao.github.io/blog/ONNX-IO-Stream/) - [onnx-utils](https://github.com/saurabh-shandilya/onnx-utils) - [sweetalert](https://github.com/t4t5/sweetalert) - -[https://github.com/onnx/models/blob/main/vision/classification/mobilenet/model/mobilenetv2-7.onnx]: