Skip to content

Commit

Permalink
bug fix with mean correction.
Browse files Browse the repository at this point in the history
  • Loading branch information
Ragav Venkatesan committed Jan 24, 2017
1 parent d124178 commit 9f224d1
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions yann/utils/dataset.py
Original file line number Diff line number Diff line change
Expand Up @@ -733,11 +733,11 @@ def preprocessing( data, height, width, channels, args):
data = numpy.reshape(data,out_shp)
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)
data = (data - data.mean() / (data.max() + 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)
data = data / (data.max() + 1e-7)

if ZCA is True:

Expand Down

0 comments on commit 9f224d1

Please sign in to comment.