Skip to content
This repository has been archived by the owner on Oct 31, 2023. It is now read-only.

Fix duplicate results when doing prediction #281

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions src/apps/query_predict.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,8 @@ int main(int argc, char** argv) {
StarSpace sp(args);
if (boost::algorithm::ends_with(args->model, ".tsv")) {
sp.initFromTsv(args->model);
// Load basedocs which are set of possible things to predict.
sp.loadBaseDocs();
} else {
sp.initFromSavedModel(args->model);
cout << "------Loaded model args:\n";
Expand All @@ -37,8 +39,6 @@ int main(int argc, char** argv) {
// Set dropout probability to 0 in test case.
sp.args_->dropoutLHS = 0.0;
sp.args_->dropoutRHS = 0.0;
// Load basedocs which are set of possible things to predict.
sp.loadBaseDocs();

for(;;) {
string input;
Expand Down