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

Fixed bug in MLP init

parent d1e40df1
No related branches found
No related tags found
No related merge requests found
......@@ -169,7 +169,7 @@ void Classifier::initLSTM(const std::vector<std::string> & definition, std::size
if (params.size() % 2)
util::myThrow("MLP must have even number of parameters");
for (unsigned int i = 0; i < params.size()/2; i++)
mlp.emplace_back(std::make_pair(std::stoi(params[i]), std::stof(params[i+1])));
mlp.emplace_back(std::make_pair(std::stoi(params[2*i]), std::stof(params[2*i+1])));
curIndex++;
}))
util::myThrow(fmt::format("Invalid line '{}', expected '{}'\n", curIndex < definition.size() ? definition[curIndex] : "", "(MLP :) {hidden1 dropout1 hidden2 dropout2...}"));
......
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