You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mxnet.apache.org by la...@apache.org on 2020/09/02 17:15:44 UTC
[incubator-mxnet] branch master updated: Fix MNIST classification
example (#19072)
This is an automated email from the ASF dual-hosted git repository.
lausen 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 4cfb9e1 Fix MNIST classification example (#19072)
4cfb9e1 is described below
commit 4cfb9e1164ee1fed66c745503e202b3b2a156339
Author: r3stl355 <ul...@hotmail.com>
AuthorDate: Wed Sep 2 18:13:08 2020 +0100
Fix MNIST classification example (#19072)
Co-authored-by: r3stl355 <ul...@amazon.com>
---
CONTRIBUTORS.md | 1 +
example/gluon/mnist/README.md | 7 +++----
example/gluon/mnist/mnist.py | 7 +++----
3 files changed, 7 insertions(+), 8 deletions(-)
diff --git a/CONTRIBUTORS.md b/CONTRIBUTORS.md
index 3bf9ece..756f1b6 100644
--- a/CONTRIBUTORS.md
+++ b/CONTRIBUTORS.md
@@ -284,6 +284,7 @@ List of Contributors
* [Connor Goggins](https://github.com/connorgoggins)
* [Wei Chu](https://github.com/waytrue17)
* [Joe Evans](https://github.com/josephevans)
+* [Nikolay Ulmasov](https://github.com/r3stl355)
Label Bot
---------
diff --git a/example/gluon/mnist/README.md b/example/gluon/mnist/README.md
index c053364..5e0c17f 100644
--- a/example/gluon/mnist/README.md
+++ b/example/gluon/mnist/README.md
@@ -21,10 +21,9 @@ This script shows a simple example how to do image classification with Gluon.
The model is trained on MNIST digits image dataset and the goal is to classify the digits ```0-9```. The model has the following layout:
```
net = nn.Sequential()
-with net.name_scope():
- net.add(nn.Dense(128, activation='relu'))
- net.add(nn.Dense(64, activation='relu'))
- net.add(nn.Dense(10))
+net.add(nn.Dense(128, activation='relu'))
+net.add(nn.Dense(64, activation='relu'))
+net.add(nn.Dense(10))
```
The script provides the following commandline arguments:
diff --git a/example/gluon/mnist/mnist.py b/example/gluon/mnist/mnist.py
index 81259db..8066379 100644
--- a/example/gluon/mnist/mnist.py
+++ b/example/gluon/mnist/mnist.py
@@ -48,10 +48,9 @@ opt = parser.parse_args()
# define network
net = nn.Sequential()
-with net.name_scope():
- net.add(nn.Dense(128, activation='relu'))
- net.add(nn.Dense(64, activation='relu'))
- net.add(nn.Dense(10))
+net.add(nn.Dense(128, activation='relu'))
+net.add(nn.Dense(64, activation='relu'))
+net.add(nn.Dense(10))
# data