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 2019/01/12 23:38:19 UTC

[GitHub] kedarbellare opened a new pull request #13865: Modifying clojure CNN text classification example

kedarbellare opened a new pull request #13865: Modifying clojure CNN text classification example
URL: https://github.com/apache/incubator-mxnet/pull/13865
 
 
   ## Description ##
   
   - This PR modifies the clojure CNN text classification example. It tries to come close to the python-based example and also fixes some bugs.
   - It can be used with pretrained embeddings such as `:glove` or `:word2vec`. It can also be used without any pretrained embedding in which case an embedding is learned from training data.
   - There was an issue with using pretrained embeddings where a new random vector (uniformly sampled) was generated for the same word in the vocabulary if it appeared multiple times across the corpus. This PR fixes that issue by generating a random vector just once per out-of-vocabulary (OOV) word. This also helps avoid the memory `GC limit exceeded` issue.
   - Finally, it can be used with `word2vec` embeddings which required some tweaks in the way the model was being loaded. To optimize memory usage, either `max-vectors` can be loaded or a `vocab` can be passed in so that only a subset of embeddings are loaded.
   
   ## Checklist ##
   ### Essentials ###
   Please feel free to remove inapplicable items for your PR.
   - [X] Changes are complete (i.e. I finished coding on this PR)
   - [X] All changes have test coverage:
   - [X] Code is well-documented: 
   - For new examples, README.md is added to explain the what the example does, the source of the dataset, expected performance on test set and reference to the original paper if applicable
   - [X] To the my best knowledge, examples are either not affected by this change, or have been fixed to be compatible with this change
   
   ### Changes ###
   - [X] CNN text classification (including docs)
   
   ### Reviewers ###
   
   @gigasquid 

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