You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mxnet.apache.org by wk...@apache.org on 2019/05/14 14:56:00 UTC

[incubator-mxnet] branch master updated: use mx.context.num_gpus instead of mx.test_utils.list_gpus in MF recommender example (#14926)

This is an automated email from the ASF dual-hosted git repository.

wkcn pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-mxnet.git


The following commit(s) were added to refs/heads/master by this push:
     new 31225485 use mx.context.num_gpus instead of mx.test_utils.list_gpus in MF recommender example (#14926)
31225485 is described below

commit 31225485c3607f944b216b1048c1c95d5e61b00f
Author: Pedro Larroy <pe...@gmail.com>
AuthorDate: Tue May 14 07:55:13 2019 -0700

    use mx.context.num_gpus instead of mx.test_utils.list_gpus in MF recommender example (#14926)
---
 example/recommenders/demo1-MF.ipynb | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/example/recommenders/demo1-MF.ipynb b/example/recommenders/demo1-MF.ipynb
index e4d545e..a6c1ad7 100644
--- a/example/recommenders/demo1-MF.ipynb
+++ b/example/recommenders/demo1-MF.ipynb
@@ -55,7 +55,7 @@
    },
    "outputs": [],
    "source": [
-    "ctx = [mx.gpu(0)] if len(mx.test_utils.list_gpus()) > 0 else [mx.cpu()]\n",
+    "ctx = [mx.gpu(0)] if mx.context.num_gpus() > 0 else [mx.cpu()]\n",
     "batch_size = 128"
    ]
   },