Skip to content

Commit 899999a

Browse files
committed
Update data.py
1 parent f54b16c commit 899999a

File tree

1 file changed

+2
-5
lines changed
  • DeepLearning Tutorials/dive_into_keras

1 file changed

+2
-5
lines changed

DeepLearning Tutorials/dive_into_keras/data.py

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -26,10 +26,8 @@ def load_data():
2626
data[i,:,:,:] = arr
2727
label[i] = int(imgs[i].split('.')[0])
2828
#归一化和零均值化
29-
scale = np.max(data)
30-
data /= scale
31-
mean = np.std(data)
32-
data -= mean
29+
data /= np.max(data)
30+
data -= np.mean(data)
3331
return data,label
3432

3533

@@ -38,4 +36,3 @@ def load_data():
3836

3937

4038

41-

0 commit comments

Comments
 (0)