diff --git a/python/examples/imagenet/resnet50_web_service.py b/python/examples/imagenet/resnet50_web_service.py index 3966d31c951d83d8f984e5a265504035ed273125..1dbb2be90da5192baf8b274e9dd3255179842f6d 100644 --- a/python/examples/imagenet/resnet50_web_service.py +++ b/python/examples/imagenet/resnet50_web_service.py @@ -65,7 +65,7 @@ image_service = ImageService(name="image") image_service.load_model_config(sys.argv[1]) image_service.init_imagenet_setting() if device == "gpu": - image_service.set_gpus("0,1") + image_service.set_gpus("0") image_service.prepare_server( workdir="workdir", port=int(sys.argv[3]), device=device) image_service.run_rpc_service() diff --git a/python/paddle_serving_server_gpu/web_service.py b/python/paddle_serving_server_gpu/web_service.py index 6750de86f1750f2ab9dc36eca9d4307f7821e2d8..2f848b1bf707aba17213d75facba6dea186a2351 100644 --- a/python/paddle_serving_server_gpu/web_service.py +++ b/python/paddle_serving_server_gpu/web_service.py @@ -204,4 +204,6 @@ class WebService(object): return feed, fetch def postprocess(self, feed=[], fetch=[], fetch_map=None): + for key in fetch_map.iterkeys(): + fetch_map[key] = fetch_map[key].tolist() return fetch_map