From 05208e1f2bd7fb77b5427353edc8c3f28ef9a23b Mon Sep 17 00:00:00 2001 From: Qiao Longfei Date: Thu, 6 Dec 2018 13:00:28 +0800 Subject: [PATCH] optimize code test=develop --- paddle/fluid/operators/reader/ctr_reader.cc | 3 ++- paddle/fluid/operators/reader/read_op.cc | 1 - 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/paddle/fluid/operators/reader/ctr_reader.cc b/paddle/fluid/operators/reader/ctr_reader.cc index ca9a58615..e8edbf660 100644 --- a/paddle/fluid/operators/reader/ctr_reader.cc +++ b/paddle/fluid/operators/reader/ctr_reader.cc @@ -261,7 +261,8 @@ static inline void parse_csv_line( string_split(slot_data, ',', &data_in_slot_str); std::vector data_in_slot; for (auto& data_str : data_in_slot_str) { - (*sparse_datas)[i].push_back(std::stol(data_str)); + auto id = std::stol(data_str); + (*sparse_datas)[i].push_back(id); } } } diff --git a/paddle/fluid/operators/reader/read_op.cc b/paddle/fluid/operators/reader/read_op.cc index 97faade04..8fe638ac2 100644 --- a/paddle/fluid/operators/reader/read_op.cc +++ b/paddle/fluid/operators/reader/read_op.cc @@ -36,7 +36,6 @@ class ReadInferShape : public framework::InferShapeBase { ctx->SetOutputsDim("Out", reader_dims); auto in_desc = boost::get(ctx->GetInputVarPtrs("Reader")[0]); - std::cout << in_desc->Proto()->SerializeAsString() << std::endl; auto in_lod_levels = in_desc->GetLoDLevels(); auto out_var_ptrs = ctx->GetOutputVarPtrs("Out"); PADDLE_ENFORCE_EQ(in_lod_levels.size(), out_var_ptrs.size(), -- GitLab