You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mxnet.apache.org by GitBox <gi...@apache.org> on 2018/10/10 00:33:35 UTC

[GitHub] piyushghai edited a comment on issue #12528: Those cases with some problems in dir : example

piyushghai edited a comment on issue #12528: Those cases with some problems in dir : example  
URL: https://github.com/apache/incubator-mxnet/issues/12528#issuecomment-428398202
 
 
   Here are my findings : 
   
   I compiled MXNet from source using the instructions here : https://mxnet.incubator.apache.org/install/index.html?platform=Linux&language=Python&processor=CPU . MXNet was compiled from the master branch using the commit hash : c98b19e2d108a3861d89b475927e8a21a913e540 
   
   I used a machine with Ubuntu 16.04 as pointed by @pengzhao-intel to try to reproduce the error. 
   
   **mxnet_adversarial_vae**
   Following the instructions from here : https://github.com/apache/incubator-mxnet/tree/master/example/mxnet_adversarial_vae
   
   I ran the following two commands : 
   ```
   python convert_data.py
   python vaegan_mxnet.py --train
   ```
   The following output was observed : 
   ```
   python vaegan_mxnet.py --train
   Training...
   [00:16:56] src/operator/nn/./cudnn/./cudnn_algoreg-inl.h:109: 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)
   [00:16:56] src/operator/nn/./cudnn/./cudnn_algoreg-inl.h:109: 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)
   epoch: 0 iter: 10 metric: ('facc', 0.9161458333333333) ('fentropy', 4.697351173559825) ('fentropy', 0.1544979902760436) ('kldivergence', 30.890868949890137) [36.404568] [4215.3438]
   epoch: 0 iter: 20 metric: ('facc', 0.8911458333333333) ('fentropy', 4.428191826927165) ('fentropy', 0.42831218464331566) ('kldivergence', 45.59204025268555) [54.703785] [4094.2957]
   ....
   ```
   
   **named_entity_recognition**
   There is one step which is misleading in the instructions given here : https://github.com/apache/incubator-mxnet/tree/master/example/named_entity_recognition. 
   The download and unzip step in the readme needs to be rephrased. ``` wget https://www.kaggle.com/abhinavwalia95/entity-annotated-corpus/downloads/ner_dataset.csv``` yields a html as a result instead of csv file. 
   To fetch the correct dataset, click https://www.kaggle.com/abhinavwalia95/entity-annotated-corpus/downloads/ner_dataset.csv and then download the dataset from Kaggle's website. 
   
   After that, follow the rest of the instructions from the README. 
   I ran these two commands : 
   ```
    cd src && python preprocess.py
   cd src && python ner.py
   ```
   This yielded the following output : 
   ```
   Buckets  created:  [6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40]
   Warning, 610 sentences sliced to largest bucket size.
   
   Buckets  created:  [6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40]
   Warning, 162 sentences sliced to largest bucket size.
   [00:21:41] src/operator/nn/./cudnn/./cudnn_algoreg-inl.h:109: 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)
   /home/ubuntu/incubator-mxnet/example/named_entity_recognition/src/metrics.py:61: RuntimeWarning: invalid value encountered in double_scalars
     f1 = 2 * precision * recall / (precision + recall)
   /home/ubuntu/incubator-mxnet/example/named_entity_recognition/src/metrics.py:53: RuntimeWarning: invalid value encountered in long_scalars
     precision = correct_entitites/entity_preds
   [00:21:53] src/operator/nn/./cudnn/./cudnn_algoreg-inl.h:109: 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)
   [00:21:53] src/operator/nn/./cudnn/./cudnn_algoreg-inl.h:109: 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)
   [00:21:53] src/operator/nn/./cudnn/./cudnn_algoreg-inl.h:109: 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)
   [00:21:53] src/operator/nn/./cudnn/./cudnn_algoreg-inl.h:109: 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)
   [00:21:53] src/operator/nn/./cudnn/./cudnn_algoreg-inl.h:109: 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)
   [00:21:53] src/operator/nn/./cudnn/./cudnn_algoreg-inl.h:109: 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)
   [00:21:53] src/operator/nn/./cudnn/./cudnn_algoreg-inl.h:109: 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)
   [00:22:12] src/operator/nn/./cudnn/./cudnn_algoreg-inl.h:109: 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)
   [00:22:12] src/operator/nn/./cudnn/./cudnn_algoreg-inl.h:109: 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)
   [00:22:12] src/operator/nn/./cudnn/./cudnn_algoreg-inl.h:109: 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)
   [00:22:12] src/operator/nn/./cudnn/./cudnn_algoreg-inl.h:109: 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)
   [00:22:12] src/operator/nn/./cudnn/./cudnn_algoreg-inl.h:109: 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)
   [00:22:12] src/operator/nn/./cudnn/./cudnn_algoreg-inl.h:109: 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)
   [00:22:12] src/operator/nn/./cudnn/./cudnn_algoreg-inl.h:109: 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)
   [00:22:12] src/operator/nn/./cudnn/./cudnn_algoreg-inl.h:109: 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)
   INFO:root:Epoch[0] Train-accuracy=0.903614
   INFO:root:Epoch[0] Train-entity precision=nan
   INFO:root:Epoch[0] Train-entity recall=0.398506
   INFO:root:Epoch[0] Train-entity f1 score=nan
   INFO:root:Epoch[0] Time cost=43.281
   INFO:root:Epoch[0] Validation-accuracy=0.960105
   INFO:root:Epoch[0] Validation-entity precision=0.834820
   INFO:root:Epoch[0] Validation-entity recall=0.766734
   INFO:root:Epoch[0] Validation-entity f1 score=0.798455
   ...
   ```
   
   **Restricted-Boltzmann-machine**
   I followed the README from here : https://github.com/apache/incubator-mxnet/tree/master/example/restricted-boltzmann-machine and ran 
   ```
   python binary_rbm_gluon.py --no-cuda --num-epoch=5
   ```
   The following output was observed : 
   ```Namespace(ais_batch_size=100, ais_burn_in_steps=10, ais_intermediate_steps=10, ais_num_batch=10, batch_size=80, cuda=False, data_loader_num_worker=4, device_id=0, k=30, learning_rate=0.1, momentum=0.3, num_epoch=5, num_hidden=500)
   Epoch 0 completed with test log-likelihood -193.894379 and train log-likelihood -196.995422
   Epoch 1 completed with test log-likelihood -178.264587 and train log-likelihood -181.239731
   ...
   ```
   
   **sparse - linear_classification**
   Again following the README from https://github.com/apache/incubator-mxnet/tree/master/example/sparse/linear_classification, I ran :
   ```
   python2 train.py
   ```
   
   and got this output : 
   
   ```
   2018-10-10 00:02:09,340 Namespace(batch_size=8192, kvstore=None, num_epoch=5, optimizer='sgd')
   Dataset avazu-app not present. Downloading now ...
   Dataset avazu-app is now present.
   Dataset avazu-app.t not present. Downloading now ...
   Dataset avazu-app.t is now present.
   2018-10-10 00:04:17,542 Training started ...
   /home/ubuntu/.local/lib/python2.7/site-packages/mxnet/module/module.py:854: UserWarning: Parameters are not updated in the KVStore. No need to call sparse_row_id_fn.
     warnings.warn(UserWarning("Parameters are not updated in the KVStore. "
   2018-10-10 00:04:18,666 Epoch[0] Batch [100]	Speed: 768263.29 samples/sec	nll-loss=0.636536
   2018-10-10 00:04:19,727 Epoch[0] Batch [200]	Speed: 771779.48 samples/sec	nll-loss=0.589219
   ...
   ```
   Note : This example does not work with python3 due to an incompatible urllib library issue. ```module 'urllib' has no attribute 'urlretrieve' ``` . But this works in Python 2.
   
   **speech_recognition**
   I fixed the broken link issue in this PR : https://github.com/apache/incubator-mxnet/pull/12774
   The rest of the README works fine. Though, running the CTC example is really slow! 
   
   Please try at your end as well on the latest version of MXNet and let me know if you still experience some issues running these examples.
   
   Thanks! 

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services