Skip to content

Commit 7342233

Browse files
authored
Update mnist_data.py
Comments on bg_value are edited.
1 parent 2b7a5b4 commit 7342233

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

mnist_data.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -84,9 +84,8 @@ def expend_training_data(images, labels):
8484
expanded_labels.append(y)
8585

8686
# get a value for the background
87-
# zero is not the value, since
88-
bg_value = numpy.median(x) # this is regarded as background's value
89-
#bg_value = (PIXEL_DEPTH / 2.0)
87+
# zero is the expected value, but median() is used to estimate background's value
88+
bg_value = numpy.median(x) # this is regarded as background's value
9089
image = numpy.reshape(x, (-1, 28))
9190

9291
for i in range(4):

0 commit comments

Comments
 (0)