Chouffe commented on issue #15340: [Clojure] Add fastText example
URL: https://github.com/apache/incubator-mxnet/pull/15340#issuecomment-505533149
 
 
   I could run fastText:
   ```clojure
   cnn-text-classification.classifier=> (train-convnet {:devs [(context/cpu 0)] 
:embedding-size 300 :batch-size 100 :test-size 100 :num-epoch 10 :max-examples 
1000 :pretrained-embedding :fastText})
   Loading all the movie reviews from  data/mr-data
   WARN  org.apache.mxnet.WarnIfNotDisposed: LEAK: [one-time warning] An 
instance of org.apache.mxnet.Symbol was not disposed. Set property 
mxnet.traceLeakedObjects to true to enable tracing
   Loading the fastText pre-trained word embeddings from  
data/fastText/wiki.simple.vec
   Shuffling the data and splitting into training and test sets
   {:sentence-count 2000, :sentence-size 62, :vocab-size 8078, :embedding-size 
300, :pretrained-embedding :fastText}
   Getting ready to train for  10  epochs
   ===========
   WARN  org.apache.mxnet.DataDesc: Found Undefined Layout, will use default 
index 0 for batch axis
   WARN  org.apache.mxnet.DataDesc: Found Undefined Layout, will use default 
index 0 for batch axis
   WARN  org.apache.mxnet.DataDesc: Found Undefined Layout, will use default 
index 0 for batch axis
   WARN  org.apache.mxnet.DataDesc: Found Undefined Layout, will use default 
index 0 for batch axis
   WARN  org.apache.mxnet.DataDesc: Found Undefined Layout, will use default 
index 0 for batch axis
   [18:54:04] src/operator/tensor/./matrix_op-inl.h:200: Using target_shape 
will be deprecated.
   [18:54:04] src/operator/tensor/./matrix_op-inl.h:200: Using target_shape 
will be deprecated.
   INFO  org.apache.mxnet.module.BaseModule: Epoch[0] Train-accuracy=0.5326316
   INFO  org.apache.mxnet.module.BaseModule: Epoch[0] Time cost=4463
   INFO  org.apache.mxnet.module.BaseModule: Epoch[0] Validation-accuracy=0.59
   ...
   INFO  org.apache.mxnet.module.BaseModule: Epoch[8] Train-accuracy=0.9836842
   INFO  org.apache.mxnet.module.BaseModule: Epoch[8] Time cost=4093
   INFO  org.apache.mxnet.module.BaseModule: Epoch[8] Validation-accuracy=0.73
   INFO  org.apache.mxnet.module.BaseModule: Epoch[9] Train-accuracy=0.9878947
   INFO  org.apache.mxnet.module.BaseModule: Epoch[9] Time cost=3861
   INFO  org.apache.mxnet.module.BaseModule: Epoch[9] Validation-accuracy=0.75
   ```
   
   Thanks a lot for adding this @adc17! It seems to work really well :-)
   I am wondering if we should add bash scripts to fetch the data (for word2vec 
and fastText embeddings)?

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


With regards,
Apache Git Services

Reply via email to