diff options
-rw-r--r-- | src/trainer_interface.cc | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/src/trainer_interface.cc b/src/trainer_interface.cc index 544c514..70c9c39 100644 --- a/src/trainer_interface.cc +++ b/src/trainer_interface.cc @@ -58,18 +58,19 @@ util::Status VerifySpec(const TrainerSpec &trainer_spec) { CHECK_OR_RETURN(variable >= minval && variable <= maxval) CHECK_RANGE(trainer_spec.character_coverage(), 0.98, 1.0); - CHECK_RANGE(trainer_spec.input_sentence_size(), 100, 100000000); CHECK_RANGE(trainer_spec.max_sentencepiece_length(), 1, 512); - CHECK_RANGE(trainer_spec.mining_sentence_size(), 100, 100000000); CHECK_RANGE(trainer_spec.num_sub_iterations(), 1, 10); CHECK_RANGE(trainer_spec.num_threads(), 1, 128); - CHECK_RANGE(trainer_spec.seed_sentencepiece_size(), 1000, 5000000); CHECK_RANGE(trainer_spec.self_test_sample_size(), 0, 1000); CHECK_RANGE(trainer_spec.shrinking_factor(), 0.5, 0.95); - CHECK_RANGE(trainer_spec.training_sentence_size(), 100, 100000000); CHECK_RANGE(trainer_spec.max_sentence_length(), 10, 1073741824); #undef CHECK_RANGE + CHECK_GE_OR_RETURN(trainer_spec.input_sentence_size(), 100); + CHECK_GE_OR_RETURN(trainer_spec.mining_sentence_size(), 100); + CHECK_GE_OR_RETURN(trainer_spec.seed_sentencepiece_size(), 1000); + CHECK_GE_OR_RETURN(trainer_spec.training_sentence_size(), 100); + return util::OkStatus(); } } // namespace |