diff --git a/nnvm/tests/python/frontend/onnx/test_forward.py b/nnvm/tests/python/frontend/onnx/test_forward.py index 187e6c175cd410474734eb25f5fe800a7f9b38f4..7ca520a88b1248291e8ca34845e157bcaebb63b6 100644 --- a/nnvm/tests/python/frontend/onnx/test_forward.py +++ b/nnvm/tests/python/frontend/onnx/test_forward.py @@ -66,7 +66,7 @@ def get_caffe2_output(model, x, dtype='float32'): def verify_onnx_forward_impl(graph_file, data_shape, out_shape): dtype = 'float32' x = np.random.uniform(size=data_shape) - model = onnx.load(graph_file) + model = onnx.load_model(graph_file) c2_out = get_caffe2_output(model, x, dtype) for target, ctx in ctx_list(): tvm_out = get_tvm_output(model, x, target, ctx, out_shape, dtype) diff --git a/nnvm/tests/python/frontend/onnx/test_graph.py b/nnvm/tests/python/frontend/onnx/test_graph.py index 0aad9d22f1bec0d6142f0875f4e0a79c6ccef36c..b3961c1a38fdd7d2008fea3e610d2891527cffd5 100755 --- a/nnvm/tests/python/frontend/onnx/test_graph.py +++ b/nnvm/tests/python/frontend/onnx/test_graph.py @@ -6,7 +6,7 @@ from model_zoo import super_resolution, super_resolution_sym from model_zoo import squeezenet as squeezenet def compare_graph(onnx_file, nnvm_sym, ishape): - onnx_model = onnx.load(onnx_file) + onnx_model = onnx.load_model(onnx_file) onnx_sym, params = nnvm.frontend.from_onnx(onnx_model) g1 = nnvm.graph.create(onnx_sym) g2 = nnvm.graph.create(nnvm_sym) diff --git a/tutorials/nnvm/from_onnx.py b/tutorials/nnvm/from_onnx.py index df8dee8272ce48ebfc31bb9b0dc9b2e6ab4fbe87..0fdef8afa98cfd0fadd479dcc23fc5df7cbed691 100644 --- a/tutorials/nnvm/from_onnx.py +++ b/tutorials/nnvm/from_onnx.py @@ -46,7 +46,7 @@ model_url = ''.join(['https://gist.github.com/zhreshold/', 'super_resolution_0.2.onnx']) download(model_url, 'super_resolution.onnx', True) # now you have super_resolution.onnx on disk -onnx_model = onnx.load('super_resolution.onnx') +onnx_model = onnx.load_model('super_resolution.onnx') # we can load the graph as NNVM compatible model sym, params = nnvm.frontend.from_onnx(onnx_model)