mxnet-ssd icon indicating copy to clipboard operation
mxnet-ssd copied to clipboard

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

Open TonyTangYu opened this issue 6 years ago • 8 comments

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!

TonyTangYu avatar Oct 27 '18 16:10 TonyTangYu

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

zhreshold avatar Oct 28 '18 05:10 zhreshold

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 avatar Oct 28 '18 14:10 TonyTangYu

@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?

TonyTangYu avatar Oct 29 '18 08:10 TonyTangYu

@TonyTangYu I mean mxnet version is 1.1 not 0.11

zhreshold avatar Oct 29 '18 18:10 zhreshold

@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?

TonyTangYu avatar Oct 30 '18 00:10 TonyTangYu

@TonyTangYu

pip install mxnet==1.2.0 --upgrade

zhreshold avatar Oct 30 '18 00:10 zhreshold

@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 avatar Oct 31 '18 01:10 TonyTangYu

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

TonyTangYu avatar Oct 31 '18 16:10 TonyTangYu