Skip to content

Commit f54b16c

Browse files
committed
Update data.py
1 parent 970e34e commit f54b16c

File tree

1 file changed

+2
-1
lines changed
  • DeepLearning Tutorials/keras_usage

1 file changed

+2
-1
lines changed

DeepLearning Tutorials/keras_usage/data.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,11 +23,12 @@ def load_data():
2323
arr = np.asarray(img,dtype="float32")
2424
data[i,:,:,:] = arr
2525
label[i] = int(imgs[i].split('.')[0])
26+
data /= np.max(data)
27+
data -= np.mean(data)
2628
return data,label
2729

2830

2931

3032

3133

3234

33-

0 commit comments

Comments
 (0)