The model is described in the Paper: [VERY DEEP CONVOLUTIONAL NETWORKS FOR TEXT CLASSIFICATION] (https://arxiv.org/abs/1606.01781)
Recommend to read the list before start working with Valohai platform:
- Git: For software version control.
- Docker: For environment set-up.
- Python argparse, Tensorflow tf.flags: For user-friendly command-line interface.
- YAML: Yet Another Markup Language xD
-
Log in to Valohai Platform with your account
-
Create a new Project. Go to Settings tab, choose Repository. Copy the Github link project to URL and SAVE. Valohai will automatically Fetch repository from Github to Valohai Platform. URL for this project:
-
Go to Execution tab, Create Execution, Valohai will read the valohai.yaml and give you many options for Parameters
-
Choose your preferrence parameters and start training.
-
To change Docker image or change running step, edit the valohai.yaml file or choose another Docker image in Image and Command section on Valohai web interface.
-
To commit another version of your code. Git push your new version to Github then click Fetch Repository button on your Valohai project.
Valohai will fetch the new version and show another commit option based on your new version of code under Commit
-
To train with another dataset with Valohai. There are 2 options:
-
Go to Data tab on your project, upload your train set and test set to Valohai storage. Go back to Execution tab, choose your Data file under Input section.
-
If you have your dataset uploaded somewhere on the Internet, copy your direct link to URL under Input section. Done
-
For more datasets, see Training Dataset below. The datasets which come from the author of the paper is open and free to use.
-
Clone or Download this Project from GitHub.
-
Run this Project with default Parameters
python train.py
-
Run this Project with your chosen Parameters:
python train.py --lr learning_rate --num_epochs number of epochs --batch_size batch size
For example:
python train.py --lr 0.005 --num_epochs 10 --batch_size 128
Read train.py for more preference parameters
-
To train with other datasets.
-
Download more datasets from this LINK.
-
Copy new train.csv and test.csv to data folder. Start training with your new dataset.
-
*Valohai store the metada of num_epoch, learning_rate, ... all parameters for each train and save the meta data with exported model
Depth | 9 | 17 | 29 | 49 |
---|---|---|---|---|
ag_news | 87.67(90.17) | 88.09(90.61) | 88.01(91.33) | 84.71 |
sogu_news | 95.67(96.42) | 95.89(96.49) | 95.73(96.82) | 95.35 |
db_pedia | 98.33(98.44) | 98.28(98.39) | 98.07(98.59) | 97.38 |
yelp_polarity | 94.57(94.73) | 95.20(94.95) | 94.95(95.37) | 95.08 |
yelp_review | 62.44(61.96) | 63.44(62.59) | 62.70(63.00) | 62.83 |
yahoo_answer | 69.57(71.76) | 70.03(71.75) | 70.34(72.84) | 69.16 |
amazon_review | 60.34(60.81) | 60.98(61.19) | 60.67(61.61) | 59.80 |
amazon_polarity | 94.30(94.31) | 94.60(94.57) | 94.53(95.06) | 94.10 |
Below are the training/test loss/accuracy curves for each dataset's experiments (figures for 9, 17, 29-layer model are from left to right) :
- ag_news
- sogou_news
- db_pedia
- yelp_polarity
- yelp_review
- amazon_review
- amazon_polarity