Skip to content

Commit

Permalink
Correct syntax error in Multiple GPUs from Scratch
Browse files Browse the repository at this point in the history
Correct a syntax error where the notebook incorrectly refers to
gluon.autograd when it should refer to mxnet.autograd.
  • Loading branch information
vishaalkapoor committed Aug 2, 2018
1 parent 1975270 commit 72ec48c
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion chapter07_distributed-learning/multiple-gpus-scratch.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -476,12 +476,13 @@
},
"outputs": [],
"source": [
"from mxnet import autograd\n",
"def train_batch(batch, params, ctx, lr):\n",
" # split the data batch and load them on GPUs\n",
" data = split_and_load(batch.data[0], ctx)\n",
" label = split_and_load(batch.label[0], ctx)\n",
" # run forward on each GPU\n",
" with gluon.autograd.record():\n",
" with autograd.record():\n",
" losses = [loss(lenet(X, W), Y) \n",
" for X, Y, W in zip(data, label, params)]\n",
" # run backward on each gpu\n",
Expand Down

0 comments on commit 72ec48c

Please sign in to comment.