// CHECK-LABEL: @predict func @predict(%input:!Infrt.tensor, %map: !Infrt.tensor_map) -> (!Infrt.tensor) { %w = dt.get_param(%map, "create_parameter_0.w_0") -> !Infrt.tensor %bias = dt.get_param(%map, "create_parameter_1.w_0") -> !Infrt.tensor %out = dt.create_uninit_tensor.f32 [3, 3] -> !Infrt.tensor // fc "external.matmul"(%input, %w, %out) {}: (!Infrt.tensor, !Infrt.tensor, !Infrt.tensor) -> () "external.elementwise_add"(%out, %bias, %out) {axis = -1}: (!Infrt.tensor, !Infrt.tensor, !Infrt.tensor) -> () "external.sigmoid"(%out, %out) {}: (!Infrt.tensor, !Infrt.tensor) -> () //dt.print_tensor (%out : !Infrt.tensor) Infrt.return %out : !Infrt.tensor } // CHECK-LABEL: @main func @main() { %input = dt.create_uninit_tensor.f32 [3, 3] -> !Infrt.tensor dt.fill_tensor_with_constant.f32 (%input : !Infrt.tensor) {value=1.0:f32} // CHECK-LABEL: loading params %map = dt.load_params() {path="/Infrt/build/paddle/paddle_1.8_fc_model"} %out = Infrt.call @predict(%input, %map): (!Infrt.tensor, !Infrt.tensor_map) -> (!Infrt.tensor) dt.print_tensor (%out : !Infrt.tensor) Infrt.return }