Skip to content

Commit 2e88ad6

Browse files
committed
Add examples
1 parent 2703bce commit 2e88ad6

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

README.md

+4
Original file line numberDiff line numberDiff line change
@@ -159,3 +159,7 @@ yhat, ytrue = predict_HAN(myhan, input_vectorized, classes_vectorized, myhan_set
159159
from sklearn.metrics import classification_report
160160
print(classification_report(ytrue, yhat))
161161
```
162+
163+
## Using pretrained Embeddings
164+
165+
After you initialize the model, you can replace the 'embedding' layer with another embedding layer (such as a pretrained embedding). Let's say that you are using the [FastText embeddings](https://fasttext.cc/docs/en/english-vectors.html). You can download e.g. the 'wiki-news-300d-1M.vec.zip', and use the vectorizer to filter the embedding for those words that occur in your dataset.

0 commit comments

Comments
 (0)