7 onnx_model = onnx.load(
'i3_vgg16.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(
"i3_vgg16.ll",
"w")
26 out_lib.write(lib.get_source())
28 out_graph = open(
"i3_vgg16.json",
"w")
29 out_params = open(
"i3_vgg16.params",
"w")
30 out_graph.write(graph)