From 3648165b63bd5331d1809cba896176e4af0a9ff2 Mon Sep 17 00:00:00 2001 From: qiaolongfei Date: Wed, 23 Aug 2017 23:00:45 -0700 Subject: [PATCH] add gpu support --- python/paddle/v2/framework/tests/mnist.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/python/paddle/v2/framework/tests/mnist.py b/python/paddle/v2/framework/tests/mnist.py index 0c27ce3e355..d9941023fe6 100644 --- a/python/paddle/v2/framework/tests/mnist.py +++ b/python/paddle/v2/framework/tests/mnist.py @@ -7,6 +7,8 @@ BATCH_SIZE = 100 scope = core.Scope() place = core.CPUPlace() +# if you want to test GPU training, you can use gpu place +# place = core.GPUPlace(0) dev_ctx = core.DeviceContext.create(place) init_net = core.Net.create() -- GitLab