Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/marian-nmt/marian.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGraeme <graemenail.work@gmail.com>2021-03-12 12:42:43 +0300
committerGitHub <noreply@github.com>2021-03-12 12:42:43 +0300
commitdb399d749c06d816ae104a97ee0f39bd651420b5 (patch)
treecd30696584e7c7c247b2b5c235af1cb7bd3f878d
parentf74d055d204d7ed417f3dd26ad469192d70e8112 (diff)
Fix fallback to default paths in MNIST example (#821)
If --train-sets or --valid-sets are not provided, the fallback to the hard-coded paths does not occur. This commit requires that these entities have a non-empty value.
-rw-r--r--src/examples/mnist/mnist_ffnn.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/examples/mnist/mnist_ffnn.cpp b/src/examples/mnist/mnist_ffnn.cpp
index 23415d85..a5053846 100644
--- a/src/examples/mnist/mnist_ffnn.cpp
+++ b/src/examples/mnist/mnist_ffnn.cpp
@@ -24,9 +24,9 @@ using namespace marian;
int main(int argc, char** argv) {
auto options = parseOptions(argc, argv, cli::mode::training, false);
- if(!options->has("train-sets"))
+ if(!options->hasAndNotEmpty("train-sets"))
options->set("train-sets", TRAIN_SET);
- if(!options->has("valid-sets"))
+ if(!options->hasAndNotEmpty("valid-sets"))
options->set("valid-sets", VALID_SET);
if(options->get<std::string>("type") != "mnist-lenet")