Skip to content

Commit

Permalink
updated some changes to normalize in dataset.
Browse files Browse the repository at this point in the history
  • Loading branch information
Ragav Venkatesan committed Jan 24, 2017
1 parent 9c3cf24 commit 4670c6a
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions yann/utils/dataset.py
Original file line number Diff line number Diff line change
Expand Up @@ -731,11 +731,13 @@ def preprocessing( data, height, width, channels, args):

# from here on data is processed as a 2D matrix
data = numpy.reshape(data,out_shp)
if normalize is True or ZCA is True:
data = data / (data.max(axis = 0) + 1e-7)
# do this normalization thing in batch mode.
if mean_subtract is True or ZCA is True:
data = data - data.mean(axis = 0)
if mean_subtract is True:
if normalize is True or ZCA is True:
data = (data - data.mean(axis = 0)) / (data.max(axis = 0) + 1e-7)
# do this normalization thing in batch mode.
else:
if normalize is True or ZCA is True:
data = data / (data.max(axis =0) + 1e-7)

if ZCA is True:

Expand Down

0 comments on commit 4670c6a

Please sign in to comment.