Skip to content

Commit

Permalink
bug fix
Browse files Browse the repository at this point in the history
  • Loading branch information
Ragav Venkatesan committed Jan 24, 2017
1 parent 31fb5fe commit 581600e
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions yann/utils/dataset.py
Original file line number Diff line number Diff line change
Expand Up @@ -733,9 +733,10 @@ 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() / (data.max() + 1e-7)
data = (data - data.mean()) / (data.max() + 1e-7)
# do this normalization thing in batch mode.
elif normalize is True or ZCA is True:
else:
if normalize is True or ZCA is True:
data = data / (data.max() + 1e-7)

if ZCA is True:
Expand Down

0 comments on commit 581600e

Please sign in to comment.