Skip to content

Commit

Permalink
Merge pull request #40 from zygmuntz/stable
Browse files Browse the repository at this point in the history
Changes:
* ignore lines starting with #
  • Loading branch information
Clemens-Alexander Brust committed Nov 13, 2015
2 parents bd9be5c + 960c05a commit 592c08b
Showing 1 changed file with 14 additions and 1 deletion.
15 changes: 14 additions & 1 deletion src/factory/ConfigurableFactory.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,9 @@ ConfigurableFactory::ConfigurableFactory (std::istream& file, const unsigned int
while (! file_.eof()) {
std::string line;
std::getline (file_, line);
if (line.compare (0, 1, "#") == 0) {
continue;
}

std::string method;
ParseStringParamIfPossible (line, "method", method);
Expand Down Expand Up @@ -177,6 +180,9 @@ int ConfigurableFactory::AddLayers (Net& net, Connection data_layer_connection,
while (! file_.eof()) {
std::string line;
std::getline (file_, line);
if (line.compare (0, 1, "#") == 0) {
continue;
}

/*
* PREPROCESSING
Expand Down Expand Up @@ -420,7 +426,11 @@ bool ConfigurableFactory::AddLayers(NetGraph& net, NetGraphConnection data_layer
while (! file_.eof()) {
std::string line;
std::getline (file_, line);
datum loss_weight = 1.0;
if (line.compare (0, 1, "#") == 0) {
continue;
}

datum loss_weight = 1.0;

/*
* PREPROCESSING
Expand Down Expand Up @@ -679,6 +689,9 @@ void ConfigurableFactory::InitOptimalSettings() {
while (!file_.eof()) {
std::string line;
std::getline (file_, line);
if (line.compare (0, 1, "#") == 0) {
continue;
}

ParseDatumIfPossible (line, "l1", optimal_settings_.l1_weight);
ParseDatumIfPossible (line, "l2", optimal_settings_.l2_weight);
Expand Down

0 comments on commit 592c08b

Please sign in to comment.