Skip to content

Commit

Permalink
resolve conflicts
Browse files Browse the repository at this point in the history
  • Loading branch information
panyx0718 committed May 29, 2018
1 parent af05d46 commit 065eaf0
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion paddle/contrib/inference/paddle_inference_api_impl.cc
Original file line number Diff line number Diff line change
Expand Up @@ -299,7 +299,7 @@ std::unique_ptr<PaddlePredictor> CreatePaddlePredictor(
if (!dynamic_cast<PaddlePredictorImpl *>(predictor.get())->Init()) {
return nullptr;
}
return predictor;
return std::move(predictor);
}

} // namespace paddle
4 changes: 2 additions & 2 deletions paddle/contrib/inference/test_paddle_inference_api_impl.cc
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ TEST(paddle_inference_api_impl, word2vec) {

std::vector<PaddleTensor> outputs;
ASSERT_TRUE(predictor->Run(paddle_tensor_feeds, &outputs));
ASSERT_EQ(outputs.size(), 1);
ASSERT_EQ(outputs.size(), 1UL);
size_t len = outputs[0].data.length;
float* data = static_cast<float*>(outputs[0].data.data);
for (int j = 0; j < len / sizeof(float); ++j) {
Expand Down Expand Up @@ -143,7 +143,7 @@ TEST(paddle_inference_api_impl, image_classification) {
size_t len = outputs[0].data.length;
float* data = static_cast<float*>(outputs[0].data.data);
float* lod_data = output1.data<float>();
for (int j = 0; j < len / sizeof(float); ++j) {
for (size_t j = 0; j < len / sizeof(float); ++j) {
EXPECT_LT(lod_data[j] - data[j], 1e-10);
EXPECT_GT(lod_data[j] - data[j], -1e-10);
}
Expand Down

0 comments on commit 065eaf0

Please sign in to comment.