Skip to content

Commit 5adf118

Browse files
committed
polish
1 parent c558f05 commit 5adf118

File tree

1 file changed

+1
-5
lines changed

1 file changed

+1
-5
lines changed

paddle/fluid/inference/api/api_impl.cc

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -67,14 +67,12 @@ void NativePaddlePredictor::PrepareFeedFetch() {
6767
}
6868
feeds_[idx] = op;
6969
feed_names_[op->Output("Out")[0]] = idx;
70-
LOG(ERROR) << "feed " << idx << " " << op->Output("Out")[0];
7170
} else if (op->Type() == "fetch") {
7271
int idx = boost::get<int>(op->GetAttr("col"));
7372
if (fetchs_.size() <= idx) {
7473
fetchs_.resize(idx + 1);
7574
}
7675
fetchs_[idx] = op;
77-
LOG(ERROR) << "fetch " << idx << " " << op->Input("X")[0];
7876
}
7977
}
8078
}
@@ -216,8 +214,7 @@ bool NativePaddlePredictor::SetFeed(const std::vector<PaddleTensor> &inputs,
216214
input.set_lod(lod);
217215
int idx = -1;
218216
if (config_.specify_input_name) {
219-
idx =
220-
boost::get<int>(feeds_[feed_names_[inputs[i].name]]->GetAttr("col"));
217+
idx = feed_names_[inputs[i].name];
221218
} else {
222219
idx = boost::get<int>(feeds_[i]->GetAttr("col"));
223220
}
@@ -231,7 +228,6 @@ bool NativePaddlePredictor::GetFetch(std::vector<PaddleTensor> *outputs,
231228
VLOG(3) << "Predictor::get_fetch";
232229
outputs->resize(fetchs_.size());
233230
for (size_t i = 0; i < fetchs_.size(); ++i) {
234-
std::string fetch_target_name = fetchs_[i]->Input("X")[0];
235231
int idx = boost::get<int>(fetchs_[i]->GetAttr("col"));
236232
PADDLE_ENFORCE(idx == i);
237233
framework::LoDTensor &output =

0 commit comments

Comments
 (0)