From 6ed38bae39f97799d4b859dc5c97764d4568998d Mon Sep 17 00:00:00 2001 From: Pedro Larroy Date: Thu, 9 May 2019 11:47:13 -0400 Subject: [PATCH] use mx.context.num_gpus instead of mx.test_utils.list_gpus in MF recommender example --- 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 e4d545ec9f32..a6c1ad71958c 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" ] },