更新 function.py
Gitea Actions Experiment Test / Experiment-Actions (push) Successful in 29s

This commit is contained in:
cy
2024-10-20 17:18:32 +08:00
parent 19d414c383
commit 7a15d92ba8
-9
View File
@@ -97,15 +97,6 @@ def load_dataset(directory):
labels.append(label)
data_set.append(img_to_vector(os.path.join(root, file)))
data_set = np.array(data_set).reshape(len(data_set), - 1)
# # 找到数据集中的最大值和最小值
# data_min = np.min(data_set)
# data_max = np.max(data_set)
# 归一化数据
# data_set = (data_set - data_min) / (data_max - data_min)
data_set = data_set / 255.0
return data_set, np.array(labels)