Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

AttributeError: 'str' object has no attribute 'rank' #224

Open
TonyTangYu opened this issue Oct 27, 2018 · 8 comments
Open

AttributeError: 'str' object has no attribute 'rank' #224

TonyTangYu opened this issue Oct 27, 2018 · 8 comments

Comments

@TonyTangYu
Copy link

TonyTangYu commented Oct 27, 2018

I run python train.py --gpu 0 --batch-size 32 --lr 0.001 but I get the following problem.

Using mxnet as:
<module 'mxnet' from '/THL5/home/daodao/softwares/mxnet0.11/python/mxnet/init.pyc'>
Warning: using pre-installed version of mxnet may cause unexpected error...
(export MXNET_EXAMPLE_SSD_DISABLE_PRE_INSTALLED=1) to prevent loading pre-installed mxnet.
[22:12:49] src/io/iter_image_det_recordio.cc:280: ImageDetRecordIOParser: /THL5/home/daodao/ty_project/model/mxnet-ssd/data/train.rec, use 27 threads for decoding..
[22:12:50] src/io/iter_image_det_recordio.cc:333: ImageDetRecordIOParser: /THL5/home/daodao/ty_project/model/mxnet-ssd/data/train.rec, label padding width: 350
[22:12:50] src/engine/threaded_engine_perdevice.cc:253: [added by cxt] engine is created by EnginePerDevice
[22:12:50] src/io/iter_image_det_recordio.cc:280: ImageDetRecordIOParser: /THL5/home/daodao/ty_project/model/mxnet-ssd/data/val.rec, use 27 threads for decoding..
[22:12:51] src/io/iter_image_det_recordio.cc:333: ImageDetRecordIOParser: /THL5/home/daodao/ty_project/model/mxnet-ssd/data/val.rec, label padding width: 350
INFO:root:Start training with (gpu(0)) from pretrained model /THL5/home/daodao/ty_project/model/mxnet-ssd/model/vgg16_reduced
[22:12:52] src/nnvm/legacy_json_util.cc:190: Loading symbol saved by previous version v0.8.0. Attempting to upgrade...
[22:12:52] src/nnvm/legacy_json_util.cc:198: Symbol successfully upgraded!
INFO:root:Freezed parameters: [conv1_1_weight,conv1_1_bias,conv1_2_weight,conv1_2_bias,conv2_1_weight,conv2_1_bias,conv2_2_weight,conv2_2_bias]
[22:13:03] src/operator/././cudnn_algoreg-inl.h:112: Running performance tests to find the best convolution algorithm, this can take a while... (setting env variable MXNET_CUDNN_AUTOTUNE_DEFAULT to 0 to disable)
[22:13:40] src/operator/convolution.cu:119: This convolution is not supported by cudnn, MXNET convolution is applied.
ff
Traceback (most recent call last):
File "train.py", line 148, in
tensorboard=args.tensorboard)
File "/THL5/home/daodao/ty_project/model/mxnet-ssd/train/train_net.py", line 354, in train_net
monitor=monitor)
File "/THL5/home/daodao/softwares/mxnet0.11/python/mxnet/module/base_module.py", line 568, in fit
rank=kvstore.rank, total_iter=temp_count,
AttributeError: 'str' object has no attribute 'rank'

It seems that it results from the mxnet. There is no solution corresponding to this problem. I wanna solve this problem but don't know how. Could you please help me get over with it? Thank you!

@zhreshold
Copy link
Owner

please check mxnet version, make sure it's 1.1 or 1.2

@TonyTangYu
Copy link
Author

please check mxnet version, make sure it's 1.1 or 1.2

Thank you for your response. I checked the version of mxnet. It's 0.11. What can I do to solve this problem?

@TonyTangYu
Copy link
Author

@zhreshold In fact, I downloaded the source code of mxnet 0.11 and try to train vgg16_reduced but got the same error. Is it a problem from the base_module.py or resulting from the change of mxnet's API?

@zhreshold
Copy link
Owner

@TonyTangYu I mean mxnet version is 1.1 not 0.11

@TonyTangYu
Copy link
Author

@zhreshold I know. Do you mean I should install mxnet 1.1 or 1.2? However I want to know how to solve this problem when it's 0.11. Could you do me a favour?

@zhreshold
Copy link
Owner

@TonyTangYu

pip install mxnet==1.2.0 --upgrade

@TonyTangYu
Copy link
Author

@zhreshold Thank you for your response. But I install mxnet0.11 on the cloud server. It cannot connect the Internet and the pip command won't work on this occasion. Could you please give me another solution? Thank you.

@TonyTangYu
Copy link
Author

@zhreshold I upgraded the version of MXNet. It works now. Thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants