File tree Expand file tree Collapse file tree 2 files changed +4
-7
lines changed Expand file tree Collapse file tree 2 files changed +4
-7
lines changed Original file line number Diff line number Diff line change 19
19
import tf2onnx
20
20
import tf2onnx .utils
21
21
from tf2onnx .graph_matcher import OpTypePattern , GraphMatcher
22
- from tf2onnx .graph import Graph , GraphUtil
22
+ from tf2onnx .graph import GraphUtil
23
23
24
24
# pylint: disable=missing-docstring
25
25
Original file line number Diff line number Diff line change 19
19
20
20
import numpy as np
21
21
import onnx
22
- from onnx import numpy_helper
23
22
24
23
import tf2onnx .utils
25
- from tf2onnx .graph import Graph , GraphUtil
24
+ from tf2onnx .graph import GraphUtil
26
25
27
26
logging .basicConfig (level = logging .INFO )
28
27
log = logging .getLogger ("onnx-experiments" )
@@ -38,10 +37,8 @@ def get_args():
38
37
39
38
40
39
def load_graph (fname ):
41
- with open (fname , "rb" ) as f :
42
- data = f .read ()
43
- model_proto = onnx .ModelProto ()
44
- g = GraphUtil .create_graph_from_onnx_model (model_proto )
40
+ model_proto = onnx .ModelProto ()
41
+ g = GraphUtil .create_graph_from_onnx_model (model_proto )
45
42
return g , model_proto .producer_name
46
43
47
44
You can’t perform that action at this time.
0 commit comments