Module Expr Str ImportFrom alias ImportFrom alias ImportFrom alias ImportFrom alias identifier Import alias identifier Import alias FunctionDef arguments args defaults body Assign NameStore Call AttributeLoad NameLoad attr Str Expr Call NameLoad Str Assign NameStore BinOpAdd NameLoad Str Assign NameStore Call AttributeLoad NameLoad attr BinOpAdd NameLoad Str Assign NameStore Call AttributeLoad NameLoad attr BinOpAdd NameLoad Str Expr Call NameLoad Str Expr Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr TupleLoad AttributeLoad NameLoad attr AttributeLoad NameLoad attr keyword Num Delete NameDel Expr Call NameLoad Str Assign NameStore BinOpAdd NameLoad Str Expr Call AttributeLoad NameLoad attr NameLoad Assign NameStore Call NameLoad BinOpAdd NameLoad Str Str Expr Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr Str Expr Call AttributeLoad NameLoad attr Expr Call NameLoad Str Assign NameStore Call AttributeLoad NameLoad attr Expr Call AttributeLoad AttributeLoad NameLoad attr attr Call AttributeLoad NameLoad attr keyword TupleLoad Num Num keyword BinOpMult BinOpMult Num Num Num Expr Call AttributeLoad AttributeLoad NameLoad attr attr Call AttributeLoad NameLoad attr keyword NameLoad keyword Num Expr Call AttributeLoad AttributeLoad NameLoad attr attr Call AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr keyword NameLoad keyword NameLoad Expr Call AttributeLoad NameLoad attr BinOpAdd NameLoad Str Expr Call AttributeLoad NameLoad attr BinOpAdd NameLoad Str NameLoad Expr Call AttributeLoad NameLoad attr BinOpAdd NameLoad Str NameLoad decorator_list If CompareEq NameLoad Str body Expr Call NameLoad
N/A N/A 
This script makes a dataset of two million approximately whitened patches,
extracted at random uniformly from a downsampled version of the STL-10
unlabeled and train dataset.

It assumes that you have already run make_downsampled_stl10.py,
which downsamples the STL-10 images to 1/3 of their original resolution.

This script is intended to reproduce the preprocessing used by Adam Coates
et. al. in their work from the first half of 2011.
 __future__ print_function pylearn2.utils serial pylearn2.datasets preprocessing pylearn2.utils string_utils string N/A numpy np N/A textwrap main N/A N/A N/A N/A N/A data_dir N/A N/A string preprocess ${PYLEARN2_DATA_PATH}/stl10 N/A N/A print Loading STL10-10 unlabeled and train datasets... N/A downsampled_dir N/A data_dir /stl10_32x32 N/A data N/A N/A serial load N/A downsampled_dir /unlabeled.pkl N/A supplement N/A N/A serial load N/A downsampled_dir /train.pkl N/A N/A print Concatenating datasets... N/A N/A N/A data set_design_matrix N/A N/A np concatenate N/A N/A data X N/A supplement X axis 0 N/A supplement N/A N/A print Preparing output directory... N/A patch_dir N/A data_dir /stl10_patches N/A N/A N/A serial mkdir patch_dir N/A README N/A open N/A patch_dir /README w N/A N/A N/A README write N/A N/A textwrap dedent 
    The .pkl files in this directory may be opened in python using
    cPickle, pickle, or pylearn2.serial.load.

    data.pkl contains a pylearn2 Dataset object defining an unlabeled
    dataset of 2 million 6x6 approximately whitened, contrast-normalized
    patches drawn uniformly at random from a downsampled (to 32x32)
    version of the STL-10 train and unlabeled datasets.

    preprocessor.pkl contains a pylearn2 Pipeline object that was used
    to extract the patches and approximately whiten / contrast normalize
    them. This object is necessary when extracting features for
    supervised learning or test set classification, because the
    extracted features must be computed using inputs that have been
    whitened with the ZCA matrix learned and stored by this Pipeline.

    They were created with the pylearn2 script make_stl10_patches.py.

    All other files in this directory, including this README, were
    created by the same script and are necessary for the other files
    to function correctly.
     N/A N/A N/A README close N/A N/A print Preprocessing the data... N/A pipeline N/A N/A preprocessing Pipeline N/A N/A N/A N/A pipeline items append N/A N/A preprocessing ExtractPatches patch_shape N/A 6 6 num_patches N/A N/A 2 1000 1000 N/A N/A N/A N/A pipeline items append N/A N/A preprocessing GlobalContrastNormalization use_std True sqrt_bias 10.0 N/A N/A N/A N/A pipeline items append N/A N/A preprocessing ZCA N/A N/A N/A data apply_preprocessor preprocessor pipeline can_fit True N/A N/A N/A data use_design_loc N/A patch_dir /data.npy N/A N/A N/A serial save N/A patch_dir /data.pkl data N/A N/A N/A serial save N/A patch_dir /preprocessor.pkl pipeline N/A N/A N/A __name__ __main__ N/A N/A N/A main