jind11 / TextFooler

A Model for Natural Language Attack on Text Classification and Inference
MIT License
485 stars 79 forks source link

reduce memory consumption. #4

Closed leix28 closed 4 years ago

leix28 commented 4 years ago

memory consumption can be significantly reduced by first normalizing embeddings, then computing the dot product.

Script can run on server with 32G memory.

jind11 commented 4 years ago

Thanks for this pull request! It helps a lot!