forked from mindspore-Ecosystem/mindspore
!1982 Fix pylint error
Merge pull request !1982 from Tinazhang/pylint-error
This commit is contained in:
commit
f69a3ee5fc
|
@ -63,23 +63,6 @@ def normalize_np(image, mean, std):
|
|||
return image
|
||||
|
||||
|
||||
# pylint: disable=inconsistent-return-statements
|
||||
def get_normalized(image_id):
|
||||
"""
|
||||
Reads the image using DE ops and then normalizes using Numpy
|
||||
"""
|
||||
data1 = ds.TFRecordDataset(DATA_DIR, SCHEMA_DIR, columns_list=["image"], shuffle=False)
|
||||
decode_op = c_vision.Decode()
|
||||
data1 = data1.map(input_columns=["image"], operations=decode_op)
|
||||
num_iter = 0
|
||||
for item in data1.create_dict_iterator():
|
||||
image = item["image"]
|
||||
if num_iter == image_id:
|
||||
return normalize_np(image)
|
||||
num_iter += 1
|
||||
return None
|
||||
|
||||
|
||||
def util_test_normalize(mean, std, op_type):
|
||||
"""
|
||||
Utility function for testing Normalize. Input arguments are given by other tests
|
||||
|
|
|
@ -19,7 +19,7 @@ import numpy as np
|
|||
import mindspore.dataset as ds
|
||||
import mindspore.dataset.transforms.vision.py_transforms as py_vision
|
||||
from mindspore import log as logger
|
||||
from util import visualize, diff_mse, config_get_set_seed, \
|
||||
from util import visualize, config_get_set_seed, \
|
||||
config_get_set_num_parallel_workers, save_and_check_md5
|
||||
|
||||
GENERATE_GOLDEN = False
|
||||
|
|
Loading…
Reference in New Issue