8 onnx_model = onnx.load(
'i5_resnet152v1.onnx')
11 input_shape1 = (1,3,224,224)
12 shape_dict = {input_name1: input_shape1}
14 mod, params = relay.frontend.from_onnx(model=onnx_model, shape=shape_dict)
20 with relay.build_config(opt_level=opt_level):
21 graph, lib, params = relay.build_module.build(
22 mod, target, params=params)
26 out_lib = open(
"i5_resnet152v1.ll",
"w")
27 out_lib.write(lib.get_source())
29 out_graph = open(
"i5_resnet152v1.json",
"w")
30 out_params = open(
"i5_resnet152v1.params",
"w")
31 out_graph.write(graph)