7 onnx_model = onnx.load(
'i4_googlenet.onnx')
10 input_shape1 = (1,3,224,224)
11 shape_dict = {input_name1: input_shape1}
13 mod, params = relay.frontend.from_onnx(model=onnx_model, shape=shape_dict)
19 with relay.build_config(opt_level=opt_level):
20 graph, lib, params = relay.build_module.build(
21 mod, target, params=params)
25 out_lib = open(
"i4_googlenet.ll",
"w")
26 out_lib.write(lib.get_source())
28 out_graph = open(
"i4_googlenet.json",
"w")
29 out_params = open(
"i4_googlenet.params",
"w")
30 out_graph.write(graph)