// CHECK-LABEL: @predict func @predict(%input:!infrt.dense_tensor, %map: !infrt.dense_tensor_map) -> (!infrt.dense_tensor) { %w = dt.get_param(%map, "create_parameter_0.w_0") -> !infrt.dense_tensor %bias = dt.get_param(%map, "create_parameter_1.w_0") -> !infrt.dense_tensor %out = dt.create_uninit_tensor.f32 [3, 3] -> !infrt.dense_tensor // fc "external.matmul"(%input, %w, %out) {}: (!infrt.dense_tensor, !infrt.dense_tensor, !infrt.dense_tensor) -> () "external.elementwise_add"(%out, %bias, %out) {axis = -1}: (!infrt.dense_tensor, !infrt.dense_tensor, !infrt.dense_tensor) -> () "external.sigmoid"(%out, %out) {}: (!infrt.dense_tensor, !infrt.dense_tensor) -> () //dt.print_tensor (%out : !infrt.dense_tensor) infrt.return %out : !infrt.dense_tensor } // CHECK-LABEL: @main func @main() { %input = dt.create_uninit_tensor.f32 [3, 3] -> !infrt.dense_tensor dt.fill_tensor_with_constant.f32 (%input : !infrt.dense_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.dense_tensor, !infrt.dense_tensor_map) -> (!infrt.dense_tensor) dt.print_tensor (%out : !infrt.dense_tensor) infrt.return }