From 27a3801f1cdb28be76cbf74aee925e35e089230a Mon Sep 17 00:00:00 2001 From: champagne828 <49048274+champagne828@users.noreply.github.com> Date: Thu, 11 Apr 2019 16:29:58 +0800 Subject: [PATCH] Update inception_inference.cpp fix a bug when use --gpu --- cpp-package/example/inference/inception_inference.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cpp-package/example/inference/inception_inference.cpp b/cpp-package/example/inference/inception_inference.cpp index 78487e6ee0cd..fa5600190f95 100644 --- a/cpp-package/example/inference/inception_inference.cpp +++ b/cpp-package/example/inference/inception_inference.cpp @@ -301,7 +301,7 @@ void Predictor::PredictImage(const std::string& image_file) { executor->Forward(false); // The output is available in executor->outputs. - auto array = executor->outputs[0].Copy(global_ctx); + auto array = executor->outputs[0].Copy(Context::cpu()); /* * Find out the maximum accuracy and the index associated with that accuracy.