Incubator-mxnet: TypeError: __init__() got an unexpected keyword argument 'multi_precision'

Created on 27 Jul 2017  路  3Comments  路  Source: apache/incubator-mxnet

Operating System:Ubuntu 14.04
MXNet version: mxnet_cu80-0.10.0.post2
Python version and distribution: based on anaconda2
CUDA8.0 cudnn v5.1
I reference the install method from mxnet.io ,use $ pip install mxnet-cu80 and successfully installed. And I can sucessfully run the simple MXNet code as follow

import mxnet as mx
a = mx.nd.ones((2, 3), mx.gpu())
b = a * 2 + 1
b.asnumpy()
array([[ 3., 3., 3.],
[ 3., 3., 3.]], dtype=float32)

And then I do these operation:
$ git clone --recursive https://github.com/dmlc/mxnet /home/user/deep_learning/mxnet
$ MXNET_HOME = '/home/user/deep_learning/mxnet'

But when I run the example, I missed the error:TypeError: __init__() got an unexpected keyword argument 'multi_precision'
Terminal messages:
user@user-ASUS:~/deep_learning/mxnet/example/image-classification$ python train_mnist.py
INFO:root:start with arguments Namespace(add_stn=False, batch_size=64, disp_batches=100, dtype='float32', gpus=None, kv_store='device', load_epoch=None, lr=0.05, lr_factor=0.1, lr_step_epochs='10', model_prefix=None, mom=0.9, monitor=0, network='mlp', num_classes=10, num_epochs=20, num_examples=60000, num_layers=None, optimizer='sgd', test_io=0, top_k=0, wd=0.0001)
Traceback (most recent call last):
File "train_mnist.py", line 79, in
fit.fit(args, sym, get_mnist_iter)
File "/home/user/deep_learning/mxnet/example/image-classification/common/fit.py", line 190, in fit
monitor = monitor)
File "/home/user/anaconda2/lib/python2.7/site-packages/mxnet/module/base_module.py", line 465, in fit
optimizer_params=optimizer_params)
File "/home/user/anaconda2/lib/python2.7/site-packages/mxnet/module/module.py", line 478, in init_optimizer
optimizer_params)
File "/home/user/anaconda2/lib/python2.7/site-packages/mxnet/optimizer.py", line 128, in create_optimizer
return Optimizer.opt_registryname.lower()
File "/home/user/anaconda2/lib/python2.7/site-packages/mxnet/optimizer.py", line 328, in __init__
super(SGD, self).__init__(
kwargs)
TypeError: __init__() got an unexpected keyword argument 'multi_precision'

I searched a lot but can't find method to solve this problem. How can I fix this error?
Thanks for all of you to give me some advice.

Most helpful comment

This seems to be because when you cloned the repository, you are using the latest commit of the repository. The latest release of mxnet is of an older commit. The latest release information is here https://github.com/dmlc/mxnet/releases.
To use the source code from latest release as of today (0.10.0.post2), try
git checkout 0.10.0.post2
The example should work now.

All 3 comments

This seems to be because when you cloned the repository, you are using the latest commit of the repository. The latest release of mxnet is of an older commit. The latest release information is here https://github.com/dmlc/mxnet/releases.
To use the source code from latest release as of today (0.10.0.post2), try
git checkout 0.10.0.post2
The example should work now.

Thanks for your answers! I download the latest releases and replace the older one, and then I can run the example.

mark
when adding callback func about tensorboard

Was this page helpful?
0 / 5 - 0 ratings

Related issues

Zhaoyang-XU picture Zhaoyang-XU  路  3Comments

yuconglin picture yuconglin  路  3Comments

JonBoyleCoding picture JonBoyleCoding  路  3Comments

qiliux picture qiliux  路  3Comments

xzqjack picture xzqjack  路  3Comments