Module ImportFrom alias Import alias Import alias Import alias Import alias Import alias ImportFrom alias ImportFrom alias Expr Call AttributeLoad AttributeLoad NameLoad attr attr Call AttributeLoad AttributeLoad NameLoad attr attr Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad Str Str ImportFrom alias ClassDef bases NameLoad body FunctionDef arguments args NameParam NameParam NameParam NameParam NameParam defaults body Expr Call AttributeLoad NameLoad attr NameLoad NameLoad NameLoad Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr Num Assign AttributeStore NameLoad attr BinOpFloorDiv SubscriptLoad AttributeLoad NameLoad attr Index Num NameLoad decorator_list FunctionDef arguments args NameParam defaults body Assign AttributeStore NameLoad attr Call NameLoad keyword AttributeLoad NameLoad attr Expr Call AttributeLoad AttributeLoad NameLoad attr attr decorator_list FunctionDef arguments args NameParam defaults body Expr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr For NameStore Call NameLoad BinOpFloorDiv SubscriptLoad AttributeLoad AttributeLoad NameLoad attr attr Index Num AttributeLoad NameLoad attr body Assign NameStore BinOpMult NameLoad AttributeLoad NameLoad attr Assign NameStore BinOpMult BinOpAdd NameLoad Num AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr SubscriptLoad AttributeLoad NameLoad attr Slice NameLoad NameLoad Expr Call AttributeLoad AttributeLoad NameLoad attr attr Expr Call NameLoad Str Import alias Expr Call AttributeLoad NameLoad attr Num decorator_list FunctionDef arguments args NameParam NameParam NameParam defaults body Expr Call NameLoad Call AttributeLoad Str attr NameLoad Assign NameStore Str If CompareEq NameLoad Str body If CompareIs AttributeLoad NameLoad attr NameLoad body Assign AttributeStore NameLoad attr Call AttributeLoad NameLoad attr Assign NameStore Str orelse If CompareEq NameLoad Str body Assign NameStore AttributeLoad SubscriptLoad AttributeLoad NameLoad attr Index Num attr orelse If CompareIn Str NameLoad body AugAssignAdd AttributeStore NameLoad attr SubscriptLoad NameLoad Index Str Expr Call NameLoad Call AttributeLoad Str attr AttributeLoad NameLoad attr If CompareEq AttributeLoad NameLoad attr AttributeLoad NameLoad attr body Assign NameStore Str Expr Call AttributeLoad NameLoad attr NameLoad Expr Call NameLoad Call AttributeLoad Str attr BinOpSub Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr Return NameLoad decorator_list decorator_list FunctionDef arguments args defaults body Import alias Assign NameStore Call AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr Str keyword Num keyword NameLoad keyword NameLoad keyword Str Expr Call AttributeLoad NameLoad attr Str keyword Num keyword NameLoad keyword NameLoad keyword Str Expr Call AttributeLoad NameLoad attr Str keyword Num keyword NameLoad keyword NameLoad keyword Str Return Call AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam defaults body Import alias Import alias If UnaryOpNot Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad body Expr Call NameLoad Str keyword Str Assign NameStore Str Expr Call AttributeLoad NameLoad attr NameLoad NameLoad Expr Call NameLoad Str decorator_list If CompareEq NameLoad Str body Assign NameStore Call NameLoad Assign NameStore Str Expr Call NameLoad NameLoad With Call AttributeLoad NameLoad attr NameLoad Str NameStore body Assign NameStore Dict If AttributeLoad NameLoad attr body Assign SubscriptStore NameLoad Index Str Str Assign TupleStore NameStore NameStore NameStore Call AttributeLoad NameLoad attr NameLoad NameLoad Assign NameStore Call NameLoad keyword AttributeLoad NameLoad attr keyword AttributeLoad NameLoad attr keyword SubscriptLoad NameLoad Index Num keyword AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr
N/A __future__ print_function N/A os N/A sys N/A gzip N/A time N/A six six.moves cPickle multiprocessing Process N/A N/A N/A N/A sys path append N/A N/A N/A os path join N/A N/A N/A os path dirname __file__ .. .. platoon.channel Controller BatchedPixelSumController N/A Controller N/A __init__ N/A N/A self control_port batch_port dataset batch_size N/A N/A N/A N/A N/A Controller __init__ self control_port None N/A N/A self _batch_port batch_port N/A N/A self _start_time None N/A N/A self _should_stop False N/A N/A self _batch_size batch_size N/A N/A self _dataset dataset N/A N/A self _nb_batch_processed 0 N/A N/A self _nb_batch_to_process N/A N/A N/A dataset shape N/A 0 batch_size N/A start_batch_server N/A N/A self N/A N/A N/A N/A self p N/A Process target N/A self _send_mb N/A N/A N/A N/A self p start N/A _send_mb N/A N/A self N/A N/A N/A N/A N/A self init_data N/A self _batch_port N/A i N/A range N/A N/A N/A N/A self _dataset shape N/A 0 N/A self _batch_size N/A N/A batch_start N/A i N/A self _batch_size N/A batch_stop N/A N/A i 1 N/A self _batch_size N/A N/A N/A self send_mb N/A N/A self _dataset N/A batch_start batch_stop N/A N/A N/A N/A self asocket close N/A N/A print Done Sending MB. N/A time N/A N/A N/A time sleep 2 N/A handle_control N/A N/A self req worker_id N/A N/A N/A N/A print N/A N/A # Handling req: {} format req N/A control_response N/A N/A req next N/A N/A N/A N/A self _start_time None N/A N/A N/A self _start_time N/A N/A time time N/A control_response train N/A N/A N/A req get_data_shape N/A N/A control_response N/A N/A N/A self _dataset N/A 0 shape N/A N/A N/A done req N/A N/A N/A self _nb_batch_processed N/A req N/A done N/A N/A print N/A N/A {} batches processed by worker so far. format N/A self _nb_batch_processed N/A N/A N/A self _nb_batch_processed N/A self _nb_batch_to_process N/A N/A control_response stop N/A N/A N/A self worker_is_done worker_id N/A N/A print N/A N/A Training time {0:.4f}s format N/A N/A N/A time time N/A self _start_time N/A control_response N/A N/A parse_arguments N/A N/A N/A N/A N/A argparse N/A parser N/A N/A argparse ArgumentParser N/A N/A N/A parser add_argument --batch_port default 5566 type int required False help Port on which the batches will be transfered. N/A N/A N/A parser add_argument --control_port default 5567 type int required False help Port on which the control commands will be sent. N/A N/A N/A parser add_argument --batch-size default 1000 type int required False help Size of the batches. N/A N/A N/A parser parse_args N/A get_mnist N/A N/A path N/A N/A N/A os N/A urllib N/A N/A N/A N/A N/A os path exists path N/A N/A N/A print Downloading mnist ... end N/A url http://www.iro.umontreal.ca/~lisa/deep/data/mnist/mnist.pkl.gz N/A N/A N/A urllib urlretrieve url path N/A N/A print Done N/A N/A N/A __name__ __main__ N/A N/A args N/A parse_arguments N/A mnist_path ../data/mnist.pkl.gz N/A N/A get_mnist mnist_path N/A N/A N/A gzip open mnist_path rb f N/A N/A kwargs N/A N/A N/A six PY3 N/A N/A N/A kwargs N/A encoding latin1 N/A N/A train_set _ _ N/A N/A cPickle load f kwargs N/A controller N/A BatchedPixelSumController control_port N/A args control_port batch_port N/A args batch_port dataset N/A train_set N/A 0 batch_size N/A args batch_size N/A N/A N/A controller start_batch_server N/A N/A N/A controller serve