From 025ad59f62a86bdcd2fd69808f5876a2797efa98 Mon Sep 17 00:00:00 2001 From: shenwei41 Date: Tue, 13 Jul 2021 10:46:07 +0800 Subject: [PATCH] clean_code --- mindspore/ccsrc/minddata/dataset/engine/dataset_iterator.cc | 1 - mindspore/dataset/text/validators.py | 1 + mindspore/dataset/vision/py_transforms_util.py | 1 + mindspore/train/dataset_helper.py | 1 + 4 files changed, 3 insertions(+), 1 deletion(-) diff --git a/mindspore/ccsrc/minddata/dataset/engine/dataset_iterator.cc b/mindspore/ccsrc/minddata/dataset/engine/dataset_iterator.cc index 8c8b4f7fbb1..42136f59adf 100644 --- a/mindspore/ccsrc/minddata/dataset/engine/dataset_iterator.cc +++ b/mindspore/ccsrc/minddata/dataset/engine/dataset_iterator.cc @@ -27,7 +27,6 @@ namespace mindspore { namespace dataset { - // Fetches one row of data from the iterator as a column map. Status DatasetIterator::GetNextAsMap(TensorMap *out_map) { if (out_map == nullptr) { diff --git a/mindspore/dataset/text/validators.py b/mindspore/dataset/text/validators.py index cf96b746438..e027ade0b19 100644 --- a/mindspore/dataset/text/validators.py +++ b/mindspore/dataset/text/validators.py @@ -516,6 +516,7 @@ def check_save_model(method): return new_method + def check_sentence_piece_tokenizer(method): """A wrapper that wraps a parameter checker to the original function.""" diff --git a/mindspore/dataset/vision/py_transforms_util.py b/mindspore/dataset/vision/py_transforms_util.py index 3755a231285..475a4bab9bc 100644 --- a/mindspore/dataset/vision/py_transforms_util.py +++ b/mindspore/dataset/vision/py_transforms_util.py @@ -1291,6 +1291,7 @@ def rgb_to_bgrs(np_rgb_imgs, is_hwc): return rgb_to_bgr(np_rgb_imgs, is_hwc) return np.array([rgb_to_bgr(img, is_hwc) for img in np_rgb_imgs]) + def rgb_to_hsv(np_rgb_img, is_hwc): """ Convert RGB img to HSV img. diff --git a/mindspore/train/dataset_helper.py b/mindspore/train/dataset_helper.py index 5b073018b86..06dcec61e73 100644 --- a/mindspore/train/dataset_helper.py +++ b/mindspore/train/dataset_helper.py @@ -279,6 +279,7 @@ class DatasetHelper: """Get shape range(min shape, max shape) of dynamic data.""" return self.iter.dynamic_min_max_shapes() + class _DatasetIter: """Base iter for dataset helper"""