diff options
author | Taku Kudo <taku@google.com> | 2018-11-18 09:54:21 +0300 |
---|---|---|
committer | Taku Kudo <taku@google.com> | 2018-11-18 09:54:21 +0300 |
commit | f6229bfad55f28e6b35e6860d9c06a5ea9bd83c9 (patch) | |
tree | 6f3b40f98a4762cffbbf9c8c43a5369c8e8144f8 | |
parent | 3cf4923308c895819861a24202a90250c18fcd01 (diff) |
remvoe the max size constraint for input sentence size etc.
-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 |