Created
August 11, 2018 16:31
-
-
Save mrm1001/66f9396c1e8cf348cec23ed1b6850b01 to your computer and use it in GitHub Desktop.
FastText
This file contains 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
if (args_->pretrainedVectors.size() != 0) { | |
loadVectors(args_->pretrainedVectors); | |
} else { | |
input_ = std::make_shared<Matrix>(dict_->nwords()+args_->bucket, args_->dim); | |
input_->uniform(1.0 / args_->dim); | |
} | |
if (args_->model == model_name::sup) { | |
output_ = std::make_shared<Matrix>(dict_->nlabels(), args_->dim); | |
} else { | |
output_ = std::make_shared<Matrix>(dict_->nwords(), args_->dim); | |
} | |
output_->zero(); | |
startThreads(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment