From b3688100adafb50117cb85a7c1190e64156b7dcf Mon Sep 17 00:00:00 2001 From: peizhilin Date: Sat, 29 Dec 2018 13:54:32 +0800 Subject: [PATCH] fix unittest test=develop --- paddle/fluid/operators/load_combine_op.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/paddle/fluid/operators/load_combine_op.cc b/paddle/fluid/operators/load_combine_op.cc index 691c5cc1a1d..c4a2282e164 100644 --- a/paddle/fluid/operators/load_combine_op.cc +++ b/paddle/fluid/operators/load_combine_op.cc @@ -44,7 +44,7 @@ class LoadCombineOp : public framework::OperatorBase { LoadParamsFromBuffer(scope, place, &fin, load_as_fp16, out_var_names); } else { PADDLE_ENFORCE(!filename.empty(), "Cannot load file from memory"); - std::stringstream fin(filename); + std::stringstream fin(filename, std::ios::in | std::ios::binary); LoadParamsFromBuffer(scope, place, &fin, load_as_fp16, out_var_names); } } -- GitLab