Commit bd40bcd1 by Wenhao Hu Committed by Tianqi Chen

use caffe2.python.onnx.backend instead of onnx-caffe2 (#418)

parent ec5c4651
......@@ -7,9 +7,9 @@ import onnx
from model_zoo import super_resolution, squeezenet1_1, lenet, resnet18_1_0
def verify_onnx_forward_impl(graph_file, data_shape, out_shape):
import onnx_caffe2.backend
import caffe2.python.onnx.backend
def get_caffe2_output(model, x, dtype='float32'):
prepared_backend = onnx_caffe2.backend.prepare(model)
prepared_backend = caffe2.python.onnx.backend.prepare(model)
W = {model.graph.input[0].name: x.astype(dtype)}
c2_out = prepared_backend.run(W)[0]
return c2_out
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment