diff --git a/mindspore/ccsrc/minddata/dataset/engine/datasetops/source/mnist_op.cc b/mindspore/ccsrc/minddata/dataset/engine/datasetops/source/mnist_op.cc index ed87d0bd82..49a0a77ecf 100644 --- a/mindspore/ccsrc/minddata/dataset/engine/datasetops/source/mnist_op.cc +++ b/mindspore/ccsrc/minddata/dataset/engine/datasetops/source/mnist_op.cc @@ -192,9 +192,6 @@ Status MnistOp::ReadImageAndLabel(std::ifstream *image_reader, std::ifstream *la TensorShape img_tensor_shape = TensorShape({kMnistImageRows, kMnistImageCols, 1}); for (int64_t j = 0; j != num_images; ++j) { auto pixels = &images_buf[j * size]; - for (int64_t m = 0; m < size; ++m) { - pixels[m] = (pixels[m] == 0) ? 0 : 255; - } std::shared_ptr image; RETURN_IF_NOT_OK(Tensor::CreateFromMemory(img_tensor_shape, data_schema_->Column(0).Type(), reinterpret_cast(pixels), &image)); diff --git a/mindspore/ccsrc/minddata/dataset/engine/datasetops/source/qmnist_op.cc b/mindspore/ccsrc/minddata/dataset/engine/datasetops/source/qmnist_op.cc index b5162eab17..fe78f17b7a 100644 --- a/mindspore/ccsrc/minddata/dataset/engine/datasetops/source/qmnist_op.cc +++ b/mindspore/ccsrc/minddata/dataset/engine/datasetops/source/qmnist_op.cc @@ -241,9 +241,6 @@ Status QMnistOp::ReadImageAndLabel(std::ifstream *image_reader, std::ifstream *l TensorShape label_tensor_shape = TensorShape({kQMnistLabelLength}); for (int64_t data_index = 0; data_index != num_images; data_index++) { auto image = &images_buf[data_index * image_size]; - for (int64_t image_index = 0; image_index < image_size; image_index++) { - image[image_index] = (image[image_index] == 0) ? 0 : 255; - } std::shared_ptr image_tensor; RETURN_IF_NOT_OK(Tensor::CreateFromMemory(image_tensor_shape, data_schema_->Column(0).Type(), reinterpret_cast(image), &image_tensor)); diff --git a/tests/st/summary/test_summary_collector.py b/tests/st/summary/test_summary_collector.py index 77c8339d90..21d44ab07c 100644 --- a/tests/st/summary/test_summary_collector.py +++ b/tests/st/summary/test_summary_collector.py @@ -304,7 +304,7 @@ class TestSummary: break return tags - @pytest.mark.level0 + @pytest.mark.level1 @pytest.mark.platform_x86_ascend_training @pytest.mark.platform_arm_ascend_training @pytest.mark.platform_x86_gpu_training diff --git a/tests/ut/data/dataset/golden/autocontrast_mnist_result_c.npz b/tests/ut/data/dataset/golden/autocontrast_mnist_result_c.npz index 683ed673a0..e283681ab3 100644 Binary files a/tests/ut/data/dataset/golden/autocontrast_mnist_result_c.npz and b/tests/ut/data/dataset/golden/autocontrast_mnist_result_c.npz differ diff --git a/tests/ut/data/dataset/golden/equalize_mnist_result_c.npz b/tests/ut/data/dataset/golden/equalize_mnist_result_c.npz index 683ed673a0..bb7c8b5a1e 100644 Binary files a/tests/ut/data/dataset/golden/equalize_mnist_result_c.npz and b/tests/ut/data/dataset/golden/equalize_mnist_result_c.npz differ diff --git a/tests/ut/data/dataset/golden/random_solarize_02_result.npz b/tests/ut/data/dataset/golden/random_solarize_02_result.npz index 683ed673a0..90be85823e 100644 Binary files a/tests/ut/data/dataset/golden/random_solarize_02_result.npz and b/tests/ut/data/dataset/golden/random_solarize_02_result.npz differ diff --git a/tests/ut/python/dataset/test_datasets_emnist.py b/tests/ut/python/dataset/test_datasets_emnist.py index 76703151f2..7cfdcddb0d 100644 --- a/tests/ut/python/dataset/test_datasets_emnist.py +++ b/tests/ut/python/dataset/test_datasets_emnist.py @@ -59,7 +59,6 @@ def load_emnist(path, usage, name): image_file.read(16) image = np.fromfile(image_file, dtype=np.uint8) image = image.reshape(-1, 28, 28, 1) - image[image > 0] = 255 # Perform binarization to maintain consistency with our API images.append(image) with open(label_path[i], 'rb') as label_file: label_file.read(8) diff --git a/tests/ut/python/dataset/test_datasets_fashion_mnist.py b/tests/ut/python/dataset/test_datasets_fashion_mnist.py index 053b51d254..4b6b6975ec 100644 --- a/tests/ut/python/dataset/test_datasets_fashion_mnist.py +++ b/tests/ut/python/dataset/test_datasets_fashion_mnist.py @@ -44,7 +44,6 @@ def load_fashion_mnist(path): imgpath.read(16) images = np.fromfile(imgpath, dtype=np.uint8) images = images.reshape(-1, 28, 28, 1) - images[images > 0] = 255 # Perform binarization to maintain consistency with our API return images, labels diff --git a/tests/ut/python/dataset/test_datasets_kmnist.py b/tests/ut/python/dataset/test_datasets_kmnist.py index 918cd46aca..63f0069ece 100644 --- a/tests/ut/python/dataset/test_datasets_kmnist.py +++ b/tests/ut/python/dataset/test_datasets_kmnist.py @@ -44,7 +44,6 @@ def load_kmnist(path): imgpath.read(16) images = np.fromfile(imgpath, dtype=np.uint8) images = images.reshape(-1, 28, 28, 1) - images[images > 0] = 255 # Perform binarization to maintain consistency with our API return images, labels diff --git a/tests/ut/python/dataset/test_datasets_mnist.py b/tests/ut/python/dataset/test_datasets_mnist.py index bbd04df8ab..34354169c3 100644 --- a/tests/ut/python/dataset/test_datasets_mnist.py +++ b/tests/ut/python/dataset/test_datasets_mnist.py @@ -39,7 +39,6 @@ def load_mnist(path): imgpath.read(16) images = np.fromfile(imgpath, dtype=np.uint8) images = images.reshape(-1, 28, 28, 1) - images[images > 0] = 255 # Perform binarization to maintain consistency with our API return images, labels diff --git a/tests/ut/python/dataset/test_datasets_qmnist.py b/tests/ut/python/dataset/test_datasets_qmnist.py index 4c65228dff..9a86c95fb5 100644 --- a/tests/ut/python/dataset/test_datasets_qmnist.py +++ b/tests/ut/python/dataset/test_datasets_qmnist.py @@ -66,7 +66,6 @@ def load_qmnist(path, usage, compat=True): image_file.read(16) image = np.fromfile(image_file, dtype=np.uint8) image = image.reshape(-1, 28, 28, 1) - image[image > 0] = 255 # Perform binarization to maintain consistency with our API images.append(image) with open(label_path[i], 'rb') as label_file: label_file.read(12)