From 995ac9a88546d78693d7a14472ee4942a563e479 Mon Sep 17 00:00:00 2001 From: guru4elephant Date: Sun, 16 Feb 2020 21:56:23 +0800 Subject: [PATCH] make output of general infer as GeneralBlob --- core/general-server/op/general_infer_op.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/core/general-server/op/general_infer_op.cpp b/core/general-server/op/general_infer_op.cpp index a4e8fa45..d3761000 100644 --- a/core/general-server/op/general_infer_op.cpp +++ b/core/general-server/op/general_infer_op.cpp @@ -39,6 +39,8 @@ int GeneralInferOp::inference() { const GeneralBlob * input_blob = get_depend_argument(pre_name()); + GeneralBlob * output_blob = mutable_data(); + if (!input_blob) { LOG(ERROR) << "Failed mutable depended argument, op:" << pre_name(); @@ -46,7 +48,7 @@ int GeneralInferOp::inference() { } const TensorVector *in = &input_blob->tensor_vector; - TensorVector *out = butil::get_object(); + TensorVector *out = &output_blob->tensor_vector; int batch_size = input_blob->GetBatchSize(); VLOG(2) << "infer batch size: " << batch_size; -- GitLab