{"action":"closed","issue":{"url":"https://api.github.com/repos/dmlc/mxnet/issues/3988","repository_url":"https://api.github.com/repos/dmlc/mxnet","labels_url":"https://api.github.com/repos/dmlc/mxnet/issues/3988/labels{/name}","comments_url":"https://api.github.com/repos/dmlc/mxnet/issues/3988/comments","events_url":"https://api.github.com/repos/dmlc/mxnet/issues/3988/events","html_url":"https://github.com/dmlc/mxnet/issues/3988","id":191802767,"number":3988,"title":"Error running train_mnist.py","user":{"login":"john7farrell","id":14563462,"avatar_url":"https://avatars.githubusercontent.com/u/14563462?v=3","gravatar_id":"","url":"https://api.github.com/users/john7farrell","html_url":"https://github.com/john7farrell","followers_url":"https://api.github.com/users/john7farrell/followers","following_url":"https://api.github.com/users/john7farrell/following{/other_user}","gists_url":"https://api.github.com/users/john7farrell/gists{/gist_id}","starred_url":"https://api.github.com/users/john7farrell/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/john7farrell/subscriptions","organizations_url":"https://api.github.com/users/john7farrell/orgs","repos_url":"https://api.github.com/users/john7farrell/repos","events_url":"https://api.github.com/users/john7farrell/events{/privacy}","received_events_url":"https://api.github.com/users/john7farrell/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":2,"created_at":"2016-11-26T12:03:55Z","updated_at":"2016-11-28T04:46:37Z","closed_at":"2016-11-28T04:46:37Z","body":"Hey, I'm new to mxnet, and when I'm running *mxnet/example/image-classification/train_mnist.py*, I got following error messages:\r\n> $ python train_mnist.py\r\n> 2016-11-26 19:30:44,409 Node[0] start with arguments Namespace(batch_size=128, data_dir='mnist/', gpus=None, kv_store='local', load_epoch=None, lr=0.1, lr_factor=1, lr_factor_epoch=1, model_prefix=None, network='mlp', num_epochs=10, num_examples=60000, save_model_prefix=None)\r\n> [19:30:46] D:\\chhong\\mxnet\\src\\io\\iter_mnist.cc:91: MNISTIter: load 60000 images, shuffle=1, shape=(128,784)\r\n> [19:30:47] D:\\chhong\\mxnet\\src\\io\\iter_mnist.cc:91: MNISTIter: load 10000 images, shuffle=1, shape=(128,784)\r\n> Traceback (most recent call last):\r\n>   File \"train_mnist.py\", line 164, in <module>\r\n>     train_model.fit(args, net, get_iterator(data_shape))\r\n>   File \"C:\\mxnet-gpu\\example\\image-classification\\train_model.py\", line 92, in fit\r\n>     if args.benchmark:\r\n> AttributeError: 'Namespace' object has no attribute 'benchmark'\r\n\r\nSo I add a line in function *parse_args()*:\r\n> def parse_args():\r\n> ...\r\n>     parser.add_argument('--benchmark', type=bool, default=False, help='to avoid the error')\r\n> return parser.parse_args()\r\n\r\nand it works for now:\r\n> $ python train_mnist.py\r\n> 2016-11-26 20:53:49,938 Node[0] start with arguments Namespace(batch_size=128, benchmark=False, data_dir='mnist/', gpus=None, kv_store='local', load_epoch=None, lr=0.1, lr_factor=1, lr_factor_epoch=1, model_prefix=None, network='mlp', num_epochs=10, num_examples=60000, save_model_prefix=None)\r\n> [20:53:52] D:\\chhong\\mxnet\\src\\io\\iter_mnist.cc:91: MNISTIter: load 60000 images, shuffle=1, shape=(128,784)\r\n> [20:53:52] D:\\chhong\\mxnet\\src\\io\\iter_mnist.cc:91: MNISTIter: load 10000 images, shuffle=1, shape=(128,784)\r\n> 2016-11-26 20:53:52,700 Node[0] Start training with [cpu(0)]\r\n> 2016-11-26 20:53:52,896 Node[0] Epoch[0] Batch [50]     Speed: 34312.04 samples/sec     Train-accuracy=0.719063\r\n> 2016-11-26 20:53:52,896 Node[0] Epoch[0] Batch [50]     Speed: 34312.04 samples/sec     Train-top_k_accuracy_5=0.943594\r\n> 2016-11-26 20:53:52,896 Node[0] Epoch[0] Batch [50]     Speed: 34312.04 samples/sec     Train-top_k_accuracy_10=1.000000\r\n> 2016-11-26 20:53:52,896 Node[0] Epoch[0] Batch [50]     Speed: 34312.04 samples/sec     Train-top_k_accuracy_20=1.000000\r\n> 2016-11-26 20:53:53,085 Node[0] Epoch[0] Batch [100]    Speed: 34038.16 samples/sec     Train-accuracy=0.896406\r\n> 2016-11-26 20:53:53,085 Node[0] Epoch[0] Batch [100]    Speed: 34038.16 samples/sec     Train-top_k_accuracy_5=0.993750\r\n> 2016-11-26 20:53:53,085 Node[0] Epoch[0] Batch [100]    Speed: 34038.16 samples/sec     Train-top_k_accuracy_10=1.000000\r\n> 2016-11-26 20:53:53,085 Node[0] Epoch[0] Batch [100]    Speed: 34038.16 samples/sec     Train-top_k_accuracy_20=1.000000\r\n\r\nAnd if change it to *default=True*, the result will be very bad.\r\nStill I don't understand the reason behind this."}}
{"actor":{"display_login":"john7farrell"}}