Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
ModelZoo
ResNet50_tensorflow
Commits
b308f6de
"test/git@developer.sourcefind.cn:change/sglang.git" did not exist on "712216928fa252d6592a1518579018a69cb72bfe"
Commit
b308f6de
authored
Feb 24, 2018
by
Andrew M. Dai
Browse files
PiperOrigin-RevId: 186888588
parent
3c6b54f4
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
6 deletions
+6
-6
research/adversarial_text/README.md
research/adversarial_text/README.md
+6
-6
No files found.
research/adversarial_text/README.md
View file @
b308f6de
...
@@ -10,7 +10,7 @@ Code for [*Adversarial Training Methods for Semi-Supervised Text Classification*
...
@@ -10,7 +10,7 @@ Code for [*Adversarial Training Methods for Semi-Supervised Text Classification*
### Fetch data
### Fetch data
```
```
bash
$
wget http://ai.stanford.edu/~amaas/data/sentiment/aclImdb_v1.tar.gz
\
$
wget http://ai.stanford.edu/~amaas/data/sentiment/aclImdb_v1.tar.gz
\
-O
/tmp/imdb.tar.gz
-O
/tmp/imdb.tar.gz
$
tar
-xf
/tmp/imdb.tar.gz
-C
/tmp
$
tar
-xf
/tmp/imdb.tar.gz
-C
/tmp
...
@@ -20,7 +20,7 @@ The directory `/tmp/aclImdb` contains the raw IMDB data.
...
@@ -20,7 +20,7 @@ The directory `/tmp/aclImdb` contains the raw IMDB data.
### Generate vocabulary
### Generate vocabulary
```
```
bash
$ IMDB_DATA_DIR
=
/tmp/imdb
$ IMDB_DATA_DIR
=
/tmp/imdb
$
python gen_vocab.py
\
$
python gen_vocab.py
\
--output_dir
=
$IMDB_DATA_DIR
\
--output_dir
=
$IMDB_DATA_DIR
\
...
@@ -33,7 +33,7 @@ Vocabulary and frequency files will be generated in `$IMDB_DATA_DIR`.
...
@@ -33,7 +33,7 @@ Vocabulary and frequency files will be generated in `$IMDB_DATA_DIR`.
### Generate training, validation, and test data
### Generate training, validation, and test data
```
```
bash
$
python gen_data.py
\
$
python gen_data.py
\
--output_dir
=
$IMDB_DATA_DIR
\
--output_dir
=
$IMDB_DATA_DIR
\
--dataset
=
imdb
\
--dataset
=
imdb
\
...
@@ -46,7 +46,7 @@ $ python gen_data.py \
...
@@ -46,7 +46,7 @@ $ python gen_data.py \
### Pretrain IMDB Language Model
### Pretrain IMDB Language Model
```
```
bash
$ PRETRAIN_DIR
=
/tmp/models/imdb_pretrain
$ PRETRAIN_DIR
=
/tmp/models/imdb_pretrain
$
python pretrain.py
\
$
python pretrain.py
\
--train_dir
=
$PRETRAIN_DIR
\
--train_dir
=
$PRETRAIN_DIR
\
...
@@ -74,7 +74,7 @@ addition of `pretrained_model_dir`, from which the classifier will load the
...
@@ -74,7 +74,7 @@ addition of `pretrained_model_dir`, from which the classifier will load the
pretrained embedding and LSTM variables, and flags related to adversarial
pretrained embedding and LSTM variables, and flags related to adversarial
training and classification.
training and classification.
```
```
bash
$ TRAIN_DIR
=
/tmp/models/imdb_classify
$ TRAIN_DIR
=
/tmp/models/imdb_classify
$
python train_classifier.py
\
$
python train_classifier.py
\
--train_dir
=
$TRAIN_DIR
\
--train_dir
=
$TRAIN_DIR
\
...
@@ -99,7 +99,7 @@ $ python train_classifier.py \
...
@@ -99,7 +99,7 @@ $ python train_classifier.py \
### Evaluate on test data
### Evaluate on test data
```
```
bash
$ EVAL_DIR
=
/tmp/models/imdb_eval
$ EVAL_DIR
=
/tmp/models/imdb_eval
$
python evaluate.py
\
$
python evaluate.py
\
--eval_dir
=
$EVAL_DIR
\
--eval_dir
=
$EVAL_DIR
\
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment