diff --git a/core/general-server/op/general_infer_op.cpp b/core/general-server/op/general_infer_op.cpp index a4e8fa451ea85da893ef3e00e741baf307522bf4..d3761000fba5ce0663b9c9b1759cbf6a64c912e8 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;