Browse Source

[MD] code review

tags/v1.1.0
YangLuo 5 years ago
parent
commit
dfd9df577d
2 changed files with 3 additions and 3 deletions
  1. +2
    -2
      mindspore/ccsrc/minddata/dataset/engine/ir/datasetops/source/minddata_node.cc
  2. +1
    -1
      mindspore/dataset/vision/c_transforms.py

+ 2
- 2
mindspore/ccsrc/minddata/dataset/engine/ir/datasetops/source/minddata_node.cc View File

@@ -70,9 +70,9 @@ Status MindDataNode::ValidateParams() {
}

if (padded_sample_ != nullptr) {
if (num_padded_ < 0) {
if (num_padded_ < 0 || num_padded_ > INT_MAX) {
std::string err_msg =
"MindDataNode: num_padded must be greater than or equal to zero, num_padded: " + std::to_string(num_padded_);
"MindDataNode: num_padded must to be between 0 and INT32_MAX, but got: " + std::to_string(num_padded_);
MS_LOG(ERROR) << err_msg;
RETURN_STATUS_SYNTAX_ERROR(err_msg);
}


+ 1
- 1
mindspore/dataset/vision/c_transforms.py View File

@@ -560,7 +560,7 @@ class RandomPosterize(cde.RandomPosterizeOp):
Bits values must be in range of [1,8], and include at
least one integer value in the given range. It must be in
(min, max) or integer format. If min=max, then it is a single fixed
magnitude operation (default=[4, 8]).
magnitude operation (default=[8, 8]).

Examples:
>>> import mindspore.dataset.vision.c_transforms as c_vision


Loading…
Cancel
Save