Skip to content
Snippets Groups Projects
Commit 9144f997 authored by Franck Dary's avatar Franck Dary
Browse files

addded parameter machine to macaonTrain

parent 86ded225
No related branches found
No related tags found
No related merge requests found
......@@ -31,6 +31,8 @@ po::options_description MacaonTrain::getOptionsDescription()
"Raw text file of the development corpus")
("nbEpochs,n", po::value<int>()->default_value(5),
"Number of training epochs")
("machine", po::value<std::string>()->default_value(""),
"Reading machine file content")
("help,h", "Produce this help message");
desc.add(req).add(opt);
......@@ -91,6 +93,16 @@ int MacaonTrain::main()
bool debug = variables.count("debug") == 0 ? false : true;
bool printAdvancement = !debug && variables.count("silent") == 0 ? true : false;
bool computeDevScore = variables.count("devScore") == 0 ? false : true;
auto machineContent = variables["machine"].as<std::string>();
if (!machineContent.empty())
{
std::FILE * file = fopen(machinePath.c_str(), "w");
if (!file)
util::error(fmt::format("can't open file '{}'\n", machinePath.c_str()));
fmt::print(file, "{}", machineContent);
std::fclose(file);
}
fmt::print(stderr, "[{}] Training using device : {}\n", util::getTime(), NeuralNetworkImpl::device.str());
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment