# HG changeset patch # User James Bergstra # Date 1285799809 14400 # Node ID 092cd4cd20093e0870101f941fc0297faba2d801 # Parent a165f2666643639191bccbc52f6e7ed292a41182 tinyimages - minor: removed inplace assumption and reduced min_dynamic_range diff -r a165f2666643 -r 092cd4cd2009 pylearn/dataset_ops/tinyimages.py --- a/pylearn/dataset_ops/tinyimages.py Wed Sep 29 18:35:40 2010 -0400 +++ b/pylearn/dataset_ops/tinyimages.py Wed Sep 29 18:36:49 2010 -0400 @@ -57,14 +57,13 @@ flat = imgstack.reshape((a,b*c)) flat -= flat.mean(axis=1).reshape((a,1)) flat /= numpy.maximum(flat.std(axis=1).reshape((a,1)),imaxscale) - # SHOULD CHANNEL VARIANCE BE STANDARDIZED? - #imgstack modified inplace - centre(X[:,:,:,0]) - centre(X[:,:,:,1]) - centre(X[:,:,:,2]) + return flat.reshape((a,b,c)) + X[:,:,:,0]=centre(X[:,:,:,0]) + X[:,:,:,1]=centre(X[:,:,:,1]) + X[:,:,:,2]=centre(X[:,:,:,2]) return X -def save_filters(X, fname, min_dynamic_range=1e-3, data_path=None): +def save_filters(X, fname, min_dynamic_range=1e-8, data_path=None): """ Save filters X (encoded as whitened images) in the original image space. """