You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mxnet.apache.org by GitBox <gi...@apache.org> on 2018/10/22 23:55:16 UTC

[GitHub] ThomasDelteil commented on a change in pull request #12918: Fix adversary example generation

ThomasDelteil commented on a change in pull request #12918: Fix adversary example generation
URL: https://github.com/apache/incubator-mxnet/pull/12918#discussion_r227177269
 
 

 ##########
 File path: example/adversary/adversary_generation.ipynb
 ##########
 @@ -28,290 +27,312 @@
     "import matplotlib.pyplot as plt\n",
     "import matplotlib.cm as cm\n",
     "\n",
-    "from mxnet.test_utils import get_mnist_iterator"
+    "from mxnet import gluon"
    ]
   },
   {
    "cell_type": "markdown",
    "metadata": {},
    "source": [
-    "Build Network\n",
-    "\n",
-    "note: in this network, we will calculate softmax, gradient in numpy"
+    "Build simple CNN network for solving the MNIST dataset digit recognition task"
    ]
   },
   {
    "cell_type": "code",
-   "execution_count": null,
+   "execution_count": 17,
    "metadata": {
     "collapsed": true
    },
    "outputs": [],
    "source": [
-    "dev = mx.cpu()\n",
-    "batch_size = 100\n",
-    "train_iter, val_iter = get_mnist_iterator(batch_size=batch_size, input_shape = (1,28,28))"
+    "ctx = mx.gpu() if len(mx.test_utils.list_gpus()) else mx.cpu()\n",
 
 Review comment:
   I don't manage to reproduce that exception on my mac, any specific machine this happens on?

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services