Browse Source

!10342 optimize set_num_rows log

From: @luoyang42
Reviewed-by: @heleiwang,@liucunwei
Signed-off-by: @liucunwei
tags/v1.1.0
mindspore-ci-bot Gitee 5 years ago
parent
commit
3fb0bc399a
1 changed files with 3 additions and 1 deletions
  1. +3
    -1
      mindspore/ccsrc/minddata/dataset/engine/datasetops/source/sampler/sampler.cc

+ 3
- 1
mindspore/ccsrc/minddata/dataset/engine/datasetops/source/sampler/sampler.cc View File

@@ -142,7 +142,9 @@ int64_t SamplerRT::CalculateNumSamples(int64_t num_rows) {
}

Status SamplerRT::SetNumRowsInDataset(int64_t num_rows) {
CHECK_FAIL_RETURN_UNEXPECTED(num_rows > 0, "Invalid parameter, num_rows must be greater than 0.");
CHECK_FAIL_RETURN_UNEXPECTED(
num_rows > 0,
"Invalid data, data rows of input dataset must not be less than or equal to 0, please check the input dataset.");
num_rows_ = num_rows;
return Status::OK();
}


Loading…
Cancel
Save