mirror of
https://github.com/marian-nmt/marian.git
synced 2024-09-17 09:47:34 +03:00
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.
This commit is contained in:
parent
f74d055d20
commit
db399d749c
@ -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")
|
||||
|
Loading…
Reference in New Issue
Block a user