File tree Expand file tree Collapse file tree 1 file changed +1
-5
lines changed
paddle/fluid/inference/api Expand file tree Collapse file tree 1 file changed +1
-5
lines changed Original file line number Diff line number Diff line change @@ -67,14 +67,12 @@ void NativePaddlePredictor::PrepareFeedFetch() {
67
67
}
68
68
feeds_[idx] = op;
69
69
feed_names_[op->Output (" Out" )[0 ]] = idx;
70
- LOG (ERROR) << " feed " << idx << " " << op->Output (" Out" )[0 ];
71
70
} else if (op->Type () == " fetch" ) {
72
71
int idx = boost::get<int >(op->GetAttr (" col" ));
73
72
if (fetchs_.size () <= idx) {
74
73
fetchs_.resize (idx + 1 );
75
74
}
76
75
fetchs_[idx] = op;
77
- LOG (ERROR) << " fetch " << idx << " " << op->Input (" X" )[0 ];
78
76
}
79
77
}
80
78
}
@@ -216,8 +214,7 @@ bool NativePaddlePredictor::SetFeed(const std::vector<PaddleTensor> &inputs,
216
214
input.set_lod (lod);
217
215
int idx = -1 ;
218
216
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 ];
221
218
} else {
222
219
idx = boost::get<int >(feeds_[i]->GetAttr (" col" ));
223
220
}
@@ -231,7 +228,6 @@ bool NativePaddlePredictor::GetFetch(std::vector<PaddleTensor> *outputs,
231
228
VLOG (3 ) << " Predictor::get_fetch" ;
232
229
outputs->resize (fetchs_.size ());
233
230
for (size_t i = 0 ; i < fetchs_.size (); ++i) {
234
- std::string fetch_target_name = fetchs_[i]->Input (" X" )[0 ];
235
231
int idx = boost::get<int >(fetchs_[i]->GetAttr (" col" ));
236
232
PADDLE_ENFORCE (idx == i);
237
233
framework::LoDTensor &output =
You can’t perform that action at this time.
0 commit comments