Created
April 23, 2022 11:40
-
-
Save islem-esi/a189a368e51125f8cad669d255b930e3 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from gensim.models import FastText | |
embed_model = FastText(vector_size=meta_hyper['vector_size'], | |
window=meta_hyper['window'], | |
min_count = meta_hyper['min_count'], | |
alpha= meta_hyper['alpha'], | |
workers=meta_hyper['CPU']) | |
embed_model.build_vocab(tokenized_data) | |
import time | |
start = time.time() | |
embed_model.train(tokenized_data, total_examples=len(tokenized_data), epochs=meta_hyper['epochs']) | |
end = time.time() | |
embed_model.save('fasttext_{}.mdl'.format(meta_hyper['vector_size'])) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment