Skip to content

Commit 9789cfa

Browse files
authored
Merge pull request #12 from danglotb/add-trained-model-to-readme
doc: add to the README a way to get the trained (but not release) jav…
2 parents 16e3071 + 740c393 commit 9789cfa

File tree

1 file changed

+12
-1
lines changed

1 file changed

+12
-1
lines changed

README.md

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ In order to create and preprocess a new dataset (for example, to compare code2ve
6767
### Step 2: Training a model
6868
You can either download an already-trained model, or train a new model using a preprocessed dataset.
6969

70-
#### Downloading a trained model (1.4G)
70+
#### Downloading a trained model (1.4 GB)
7171
We already trained a model for 8 epochs on the data that was preprocessed in the previous step.
7272
The number of epochs was chosen using [early stopping](https://en.wikipedia.org/wiki/Early_stopping), as the version that maximized the F1 score on the validation set.
7373
```
@@ -78,6 +78,17 @@ tar -xvzf java14m_model.tar.gz
7878
##### Note:
7979
This trained model is in a "released" state, which means that we stripped it from its training parameters and can thus be used for inference, but cannot be further trained. If you use this trained model in the next steps, use 'saved_model_iter8.release' instead of 'saved_model_iter8' in every command line example that loads the model such as: '--load models/java14_model/saved_model_iter8'. To read how to release a model, see [Releasing the model](#releasing-the-model).
8080

81+
#### Downloading a trained model (3.5 GB) _which can be further trained_
82+
83+
A non-stripped trained model can be obtained using:
84+
85+
```
86+
https://s3.amazonaws.com/code2vec/model/java14m_model_trainable.tar.gz
87+
tar -xvzf trained_model.tar
88+
```
89+
90+
This model weights more than twice than the stripped version, and it is recommended only if you wish to continue training a model which is already trained. To continue training this trained model, use the `--load` flag to load the trained model; the `--data` flag to point to the new dataset to train on; and the `--save` flag to provide a new save path.
91+
8192
#### Training a model from scratch
8293
To train a model from scratch:
8394
* Edit the file [train.sh](train.sh) to point it to the right preprocessed data. By default,

0 commit comments

Comments
 (0)