Module Import alias Import alias Import alias Import alias identifier Assign NameStore Str If UnaryOpNot CompareIn NameLoad AttributeLoad NameLoad attr body Expr Call AttributeLoad AttributeLoad NameLoad attr attr Num NameLoad ImportFrom alias ImportFrom alias alias ImportFrom alias ImportFrom alias alias alias ImportFrom alias FunctionDef arguments args defaults body Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr Str Str Str Str With Call NameLoad NameLoad Str NameStore body Assign TupleStore NameStore NameStore NameStore Call AttributeLoad NameLoad attr NameLoad Assign NameStore Call NameLoad keyword Call NameLoad keyword Call AttributeLoad SubscriptLoad NameLoad Index Num attr SubscriptLoad AttributeLoad SubscriptLoad NameLoad Index Num attr Index Num Num Num Num keyword SubscriptLoad NameLoad Index Num keyword Call NameLoad keyword Call AttributeLoad SubscriptLoad NameLoad Index Num attr SubscriptLoad AttributeLoad SubscriptLoad NameLoad Index Num attr Index Num Num Num Num keyword SubscriptLoad NameLoad Index Num keyword Call NameLoad keyword Call AttributeLoad SubscriptLoad NameLoad Index Num attr SubscriptLoad AttributeLoad SubscriptLoad NameLoad Index Num attr Index Num Num Num Num keyword SubscriptLoad NameLoad Index Num keyword NameLoad Return NameLoad decorator_list FunctionDef arguments args NameParam defaults body Assign NameStore Call AttributeLoad NameLoad attr Assign NameStore Call AttributeLoad NameLoad attr Assign NameStore ListLoad Expr Call AttributeLoad NameLoad attr Call NameLoad keyword NameLoad keyword TupleLoad Num Num Num keyword TupleLoad Num Num Num Num keyword TupleLoad Num Num keyword AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr Call NameLoad keyword AttributeLoad SubscriptLoad NameLoad Index Num attr keyword AttributeLoad SubscriptLoad NameLoad Index Num attr keyword TupleLoad Num Num Num Num keyword TupleLoad Num Num keyword AttributeLoad NameLoad attr keyword NameLoad Expr Call AttributeLoad NameLoad attr Call NameLoad keyword AttributeLoad SubscriptLoad NameLoad Index Num attr keyword AttributeLoad SubscriptLoad NameLoad Index Num attr keyword Num keyword AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr Call NameLoad keyword AttributeLoad SubscriptLoad NameLoad Index Num attr keyword AttributeLoad SubscriptLoad NameLoad Index Num attr keyword Num keyword AttributeLoad NameLoad attr Assign NameStore Call NameLoad NameLoad NameLoad AttributeLoad SubscriptLoad NameLoad Index Num attr Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr Call AttributeLoad NameLoad attr AttributeLoad SubscriptLoad NameLoad Index Num attr NameLoad Assign AttributeStore NameLoad attr Call AttributeLoad NameLoad attr AttributeLoad SubscriptLoad NameLoad Index Num attr NameLoad Expr Call AttributeLoad NameLoad attr NameLoad NameLoad keyword Num keyword Num keyword Num keyword Num keyword Num Return NameLoad decorator_list FunctionDef arguments args NameParam defaults body With Call NameLoad Str Str NameStore body Expr Call AttributeLoad NameLoad attr NameLoad NameLoad AttributeLoad NameLoad attr decorator_list If CompareEq NameLoad Str body Assign NameStore Call NameLoad Assign NameStore Call NameLoad NameLoad Expr Call NameLoad NameLoad
N/A N/A os N/A sys N/A cPickle N/A theano.tensor T N/A homepath .. N/A N/A N/A homepath N/A sys path N/A N/A N/A N/A N/A sys path insert 0 homepath dlearn.data.dataset Dataset dlearn.models.layer FullConnLayer ConvPoolLayer dlearn.models.nnet NeuralNet dlearn.utils actfuncs costfuncs Wrapper dlearn.optimization sgd load_data N/A N/A N/A N/A N/A fpath N/A N/A N/A os path join .. data mnist mnist.pkl N/A N/A open fpath rb f N/A N/A N/A train_set valid_set test_set N/A N/A cPickle load f N/A dataset N/A Dataset train N/A Wrapper input N/A N/A N/A train_set N/A 0 reshape N/A N/A N/A train_set N/A 0 shape N/A 0 1 28 28 target N/A train_set N/A 1 valid N/A Wrapper input N/A N/A N/A valid_set N/A 0 reshape N/A N/A N/A valid_set N/A 0 shape N/A 0 1 28 28 target N/A valid_set N/A 1 test N/A Wrapper input N/A N/A N/A test_set N/A 0 reshape N/A N/A N/A test_set N/A 0 shape N/A 0 1 28 28 target N/A test_set N/A 1 limit None N/A dataset N/A train_model N/A N/A dataset N/A N/A N/A X N/A N/A T tensor4 N/A Y N/A N/A T lvector N/A layers N/A N/A N/A N/A layers append N/A ConvPoolLayer input X input_shape N/A 1 28 28 filter_shape N/A 32 1 5 5 pool_shape N/A 2 2 active_func N/A actfuncs tanh N/A N/A N/A layers append N/A ConvPoolLayer input N/A N/A layers N/A -1 output input_shape N/A N/A layers N/A -1 output_shape filter_shape N/A 64 32 5 5 pool_shape N/A 2 2 active_func N/A actfuncs tanh flatten True N/A N/A N/A layers append N/A FullConnLayer input N/A N/A layers N/A -1 output input_shape N/A N/A layers N/A -1 output_shape output_shape 512 active_func N/A actfuncs tanh N/A N/A N/A layers append N/A FullConnLayer input N/A N/A layers N/A -1 output input_shape N/A N/A layers N/A -1 output_shape output_shape 10 active_func N/A actfuncs softmax N/A model N/A NeuralNet layers X N/A N/A layers N/A -1 output N/A N/A model target Y N/A N/A model cost N/A N/A costfuncs neglog N/A N/A layers N/A -1 output Y N/A N/A model error N/A N/A costfuncs miscls_rate N/A N/A layers N/A -1 output Y N/A N/A N/A sgd train model dataset lr 0.1 momentum 0.9 batch_size 500 n_epochs 200 lr_decr 1.0 N/A model N/A save_model N/A N/A model N/A N/A N/A N/A open model.pkl wb f N/A N/A N/A N/A cPickle dump model f N/A cPickle HIGHEST_PROTOCOL N/A N/A N/A __name__ __main__ N/A N/A dataset N/A load_data N/A model N/A train_model dataset N/A N/A save_model model