项目作者: bkj

项目描述 :
Implementation of ULMFit algorithm for text classification via transfer learning
高级语言: Python
项目地址: git://github.com/bkj/ulm-basenet.git
创建时间: 2018-06-04T16:40:12Z
项目社区:https://github.com/bkj/ulm-basenet

开源协议:

下载


ulm-basenet

Implementation of ulmfit using basenet wrappers.

Code in ulmfit.py is adapted directly from fastai code.

Installation

  1. conda create -n ulm_env python=3.6 pip -y
  2. source activate ulm_env
  3. # pytorch
  4. conda install pytorch pytorch=0.3.1 cuda90 -c pytorch -y
  5. # spacy (for tokenization)
  6. conda install -c conda-forge spacy -y
  7. python -m spacy download en
  8. # additional requirements
  9. pip install -r requirements.txt

Usage

See ./run.sh for usage.

Todo

  • Update to pytorch==0.4
    • !! Looked into this on 2018-12-02 — pytorch==0.4 has a bug that doesn’t allow freezing RNNs in the way we need to. May need to wait for pytorch==1.0 for a fix, so I’m waiting for now.