Module ImportFrom alias ImportFrom alias Import alias identifier Import alias identifier ImportFrom alias ImportFrom alias ImportFrom alias FunctionDef arguments args NameParam NameParam defaults body Assign NameStore Call NameLoad SubscriptLoad NameLoad Slice Num SubscriptLoad NameLoad Slice Num Assign NameStore Call NameLoad GeneratorExp BinOpMult BinOpAdd NameLoad Num NameLoad comprehension TupleStore NameStore NameStore NameLoad FunctionDef arguments args NameParam defaults body For TupleStore NameStore NameStore NameLoad body Expr Yield TupleLoad Call AttributeLoad SubscriptLoad NameLoad Slice BinOpMult NameLoad NameLoad attr TupleLoad NameLoad NameLoad SubscriptLoad NameLoad Slice BinOpMult NameLoad NameLoad BinOpAdd BinOpMult NameLoad NameLoad NameLoad Assign NameStore SubscriptLoad NameLoad Slice BinOpMult BinOpAdd NameLoad Num NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults body For TupleStore NameStore NameStore Call NameLoad NameLoad body Assign NameStore BinOpAdd Call AttributeLoad NameLoad attr NameLoad NameLoad NameLoad Assign NameStore Call AttributeLoad NameLoad attr NameLoad Return BinOpSub NameLoad Call NameLoad NameLoad keyword Num keyword NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam defaults body Assign NameStore BinOpMult UnaryOpUSub NameLoad Call AttributeLoad NameLoad attr NameLoad NameLoad Assign NameStore Call AttributeLoad NameLoad attr BinOpMult Call NameLoad NameLoad NameLoad NameLoad Return BinOpSub UnaryOpUSub NameLoad NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam defaults body Return Call AttributeLoad NameLoad attr CompareNotEq Call AttributeLoad NameLoad attr NameLoad keyword Num Call AttributeLoad NameLoad attr Call NameLoad NameLoad NameLoad keyword Num decorator_list Return TupleLoad NameLoad NameLoad NameLoad NameLoad decorator_list FunctionDef arguments args defaults body Expr Call NameLoad Str Import alias alias Assign NameStore Lambda arguments args NameParam defaults Call AttributeLoad NameLoad attr NameLoad TupleLoad SubscriptLoad AttributeLoad NameLoad attr Index Num Call AttributeLoad NameLoad attr SubscriptLoad AttributeLoad NameLoad attr Slice Num Assign NameStore Lambda arguments args NameParam NameParam defaults Call AttributeLoad NameLoad attr CompareEq SubscriptLoad NameLoad ExtSlice Slice Index NameLoad SubscriptLoad Call AttributeLoad NameLoad attr NameLoad ExtSlice Index NameLoad Slice keyword NameLoad Assign TupleStore NameStore NameStore Call AttributeLoad NameLoad attr Str Assign NameStore Call AttributeLoad Call AttributeLoad NameLoad attr Str NameLoad attr Assign TupleStore NameStore NameStore NameStore NameStore NameLoad Assign NameStore BinOpDiv Call NameLoad NameLoad Num Assign NameStore BinOpDiv Call NameLoad NameLoad Num Assign NameStore Call NameLoad NameLoad Num Assign NameStore Call NameLoad NameLoad Num Assign NameStore SubscriptLoad AttributeLoad NameLoad attr Index Num Return TupleLoad NameLoad NameLoad NameLoad NameLoad NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults body Return ListComp Call NameLoad NameLoad Call NameLoad BinOpAdd NameLoad NameLoad NameLoad comprehension NameStore Call NameLoad Num NameLoad NameLoad decorator_list If CompareEq NameLoad Str body Assign NameStore ListLoad Num Num Num Num Assign NameStore Num Assign NameStore Num Assign NameStore Num Assign NameStore Num Assign NameStore Num Assign NameStore Num Assign TupleStore NameStore NameStore NameStore NameStore NameStore Call NameLoad Assign TupleStore NameStore NameStore NameStore NameStore Call NameLoad NameLoad NameLoad Assign NameStore Call NameLoad NameLoad Assign NameStore Call AttributeLoad NameLoad attr Assign NameStore BinOpMult Call AttributeLoad NameLoad attr NameLoad NameLoad Expr Call NameLoad NameLoad NameLoad TupleLoad NameLoad NameLoad Expr Call NameLoad Str FunctionDef arguments args NameParam NameParam defaults body Assign NameStore Call NameLoad NameLoad NameLoad NameLoad Assign NameStore Call NameLoad NameLoad NameLoad NameLoad Expr Call NameLoad Call AttributeLoad Str attr NameLoad NameLoad NameLoad decorator_list Assign NameStore Call NameLoad SubscriptLoad AttributeLoad NameLoad attr Index Num NameLoad Assign NameStore Call AttributeLoad NameLoad attr NameLoad For NameStore Call NameLoad NameLoad body Expr Call NameLoad NameLoad NameLoad For NameStore NameLoad body Assign NameStore Call NameLoad NameLoad SubscriptLoad NameLoad Index NameLoad SubscriptLoad NameLoad Index NameLoad Assign NameStore BinOpAdd BinOpMult NameLoad NameLoad BinOpMult BinOpSub Num NameLoad NameLoad AugAssignSub NameStore BinOpMult NameLoad NameLoad
N/A __future__ absolute_import __future__ print_function N/A autograd.numpy np N/A autograd.numpy.random npr autograd.scipy.misc logsumexp autograd grad autograd.util quick_grad_check make_nn_funs N/A N/A layer_sizes L2_reg N/A N/A N/A shapes N/A zip N/A layer_sizes N/A -1 N/A layer_sizes N/A 1 N/A N N/A sum N/A N/A N/A m 1 n N/A N/A m n shapes unpack_layers N/A N/A W_vect N/A N/A N/A N/A m n shapes N/A N/A N/A N/A N/A N/A N/A W_vect N/A N/A m n reshape N/A m n N/A W_vect N/A N/A m n N/A N/A m n n N/A W_vect N/A W_vect N/A N/A N/A m 1 n N/A predictions N/A N/A W_vect inputs N/A N/A N/A N/A W b N/A unpack_layers W_vect N/A N/A outputs N/A N/A N/A np dot inputs W b N/A inputs N/A N/A np tanh outputs N/A N/A outputs N/A logsumexp outputs axis 1 keepdims True N/A loss N/A N/A W_vect X T N/A N/A N/A log_prior N/A N/A L2_reg N/A N/A np dot W_vect W_vect N/A log_lik N/A N/A np sum N/A N/A predictions W_vect X T N/A N/A N/A log_prior log_lik N/A frac_err N/A N/A W_vect X T N/A N/A N/A N/A N/A np mean N/A N/A N/A np argmax T axis 1 N/A N/A np argmax N/A predictions W_vect X axis 1 N/A N/A N/A N predictions loss frac_err N/A load_mnist N/A N/A N/A N/A N/A N/A print Loading training data... N/A imp urllib N/A partial_flatten N/A N/A N/A x N/A N/A N/A np reshape x N/A N/A N/A x shape N/A 0 N/A N/A np prod N/A N/A x shape N/A 1 N/A one_hot N/A N/A N/A x K N/A N/A N/A np array N/A N/A x N/A N/A N/A None N/A N/A N/A np arange K N/A N/A None N/A dtype int N/A N/A source _ N/A N/A urllib urlretrieve https://raw.githubusercontent.com/HIPS/Kayak/master/examples/data.py N/A data N/A N/A N/A N/A imp load_source data source mnist N/A N/A train_images train_labels test_images test_labels data N/A train_images N/A N/A partial_flatten train_images 255.0 N/A test_images N/A N/A partial_flatten test_images 255.0 N/A train_labels N/A one_hot train_labels 10 N/A test_labels N/A one_hot test_labels 10 N/A N_data N/A N/A train_images shape N/A 0 N/A N/A N_data train_images train_labels test_images test_labels N/A make_batches N/A N/A N_data batch_size N/A N/A N/A N/A N/A slice i N/A min N/A i batch_size N_data N/A i N/A range 0 N_data batch_size N/A N/A N/A __name__ __main__ N/A N/A layer_sizes N/A 784 200 100 10 N/A L2_reg 1.0 N/A param_scale 0.1 N/A learning_rate 0.001 N/A momentum 0.9 N/A batch_size 256 N/A num_epochs 50 N/A N/A N_data train_images train_labels test_images test_labels N/A load_mnist N/A N/A N_weights pred_fun loss_fun frac_err N/A make_nn_funs layer_sizes L2_reg N/A loss_grad N/A grad loss_fun N/A rs N/A N/A npr RandomState N/A W N/A N/A N/A rs randn N_weights param_scale N/A N/A quick_grad_check loss_fun W N/A train_images train_labels N/A N/A print     Epoch      |    Train err  |   Test err   print_perf N/A N/A epoch W N/A N/A N/A test_perf N/A frac_err W test_images test_labels N/A train_perf N/A frac_err W train_images train_labels N/A N/A print N/A N/A {0:15}|{1:15}|{2:15} format epoch train_perf test_perf N/A N/A batch_idxs N/A make_batches N/A N/A train_images shape N/A 0 batch_size N/A cur_dir N/A N/A np zeros N_weights N/A epoch N/A range num_epochs N/A N/A N/A print_perf epoch W N/A idxs batch_idxs N/A N/A grad_W N/A loss_grad W N/A train_images N/A idxs N/A train_labels N/A idxs N/A cur_dir N/A N/A momentum cur_dir N/A N/A 1.0 momentum grad_W N/A W N/A learning_rate cur_dir