Module Expr Str Import alias alias ImportFrom alias alias Import alias identifier Import alias Import alias FunctionDef arguments args NameParam NameParam NameParam NameParam NameParam NameParam NameParam NameParam NameParam defaults body Assign NameStore Num For NameStore NameLoad body If CompareEq NameLoad Num body AugAssignAdd NameStore Num Assign NameStore Call NameLoad Assign AttributeStore NameLoad attr Call NameLoad NameLoad NameLoad NameLoad keyword AttributeLoad NameLoad attr Assign AttributeStore NameLoad attr Call NameLoad NameLoad NameLoad NameLoad keyword AttributeLoad NameLoad attr Print Call AttributeLoad Str attr Call NameLoad NameLoad Call NameLoad NameLoad Call NameLoad NameLoad Call NameLoad NameLoad Assign NameStore Call AttributeLoad NameLoad attr FunctionDef arguments args NameParam defaults body Assign NameStore Call AttributeLoad NameLoad attr NameLoad keyword Num Return Call AttributeLoad NameLoad attr NameLoad decorator_list FunctionDef arguments args NameParam defaults body Assign NameStore Call AttributeLoad NameLoad attr Num keyword NameLoad Return Call AttributeLoad NameLoad attr NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults body Return Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad NameLoad keyword ListLoad Num Num Num Num keyword Str decorator_list FunctionDef arguments args NameParam defaults body Return Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad keyword ListLoad Num Num Num Num keyword ListLoad Num Num Num Num keyword Str decorator_list Assign NameStore Call AttributeLoad NameLoad attr Str keyword ListLoad NameLoad BinOpMult BinOpMult NameLoad NameLoad NameLoad Assign NameStore Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr ListLoad NameLoad Num Assign NameStore NameLoad Assign NameStore Call NameLoad ListLoad NameLoad NameLoad Num Num Assign NameStore Call NameLoad ListLoad Num Assign NameStore Call AttributeLoad NameLoad attr NameLoad ListLoad Num NameLoad NameLoad Num Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr BinOpAdd Call NameLoad NameLoad NameLoad NameLoad Assign NameStore Call NameLoad NameLoad Assign NameStore Call NameLoad ListLoad NameLoad NameLoad Num Num Assign NameStore Call NameLoad ListLoad Num Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr BinOpAdd Call NameLoad NameLoad NameLoad NameLoad Assign NameStore Call NameLoad NameLoad Assign NameStore Call NameLoad ListLoad BinOpMult BinOpMult BinOpDiv BinOpMult BinOpDiv NameLoad Num NameLoad Num Num NameLoad Num Assign NameStore Call NameLoad ListLoad Num Assign NameStore Call AttributeLoad NameLoad attr NameLoad ListLoad Num BinOpMult BinOpMult BinOpDiv BinOpMult BinOpDiv NameLoad Num NameLoad Num Num NameLoad Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr BinOpAdd Call AttributeLoad NameLoad attr NameLoad NameLoad NameLoad Assign NameStore Call NameLoad ListLoad Num Num Assign NameStore Call NameLoad ListLoad Num Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr BinOpAdd Call AttributeLoad NameLoad attr NameLoad NameLoad NameLoad Assign NameStore UnaryOpUSub Call AttributeLoad NameLoad attr BinOpMult NameLoad Call AttributeLoad NameLoad attr NameLoad Assign NameStore Call AttributeLoad NameLoad attr NameLoad keyword Str Assign NameStore Call AttributeLoad Call AttributeLoad AttributeLoad NameLoad attr attr Num attr NameLoad Assign NameStore Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr NameLoad Num Call AttributeLoad NameLoad attr NameLoad Num Assign NameStore Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr NameLoad Str Expr Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr Assign NameStore Num Print Str Assign NameStore Call AttributeLoad NameLoad attr For NameStore Call NameLoad NameLoad body Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad Assign TupleStore NameStore NameStore Call AttributeLoad NameLoad attr ListLoad NameLoad NameLoad keyword Dict NameLoad NameLoad SubscriptLoad NameLoad Index Num SubscriptLoad NameLoad Index Num AugAssignAdd NameStore NameLoad Print Call AttributeLoad Str attr NameLoad NameLoad BinOpDiv NameLoad BinOpAdd NameLoad Num Print Call AttributeLoad Str attr BinOpSub Call AttributeLoad NameLoad attr NameLoad Print BinOpMod Str Call AttributeLoad NameLoad attr keyword Dict NameLoad NameLoad AttributeLoad AttributeLoad NameLoad attr attr AttributeLoad AttributeLoad NameLoad attr attr Assign NameStore Call AttributeLoad NameLoad attr NameLoad Num Assign NameStore Num Expr Str Return Call AttributeLoad NameLoad attr keyword Dict NameLoad AttributeLoad AttributeLoad NameLoad attr attr keyword NameLoad decorator_list
N/A N/A 
    train a deep convolutional neural network (CNN) with the OSM ways as labeled data for the imagery
    based on the 2nd tensroflow tutorial:
     https://github.com/trailbehind/DeepOSM/blob/246a2312828ccc0e5b395f8033825a46025232cc/mnist_tutorials/tutorial-mnist-expert.py
 N/A sys time DataSet DataSet DataSets N/A tensorflow tf N/A tensorflow.python.platform N/A numpy train_neural_net N/A N/A bands_to_use image_size train_images train_labels test_images test_labels convolution_patch_size number_of_batches batch_size N/A N/A N/A on_band_count 0 N/A b bands_to_use N/A N/A N/A b 1 N/A N/A on_band_count 1 N/A data_sets N/A DataSets N/A N/A data_sets train N/A DataSet on_band_count train_images train_labels dtype N/A tf float32 N/A N/A data_sets test N/A DataSet on_band_count test_images test_labels dtype N/A tf float32 N/A N/A N/A CREATED DATASET: {} training images, {} test images, with {} training labels, and {} test labels format N/A len train_images N/A len test_images N/A len train_labels N/A len test_labels N/A sess N/A N/A tf InteractiveSession weight_variable N/A N/A shape N/A N/A N/A initial N/A N/A tf truncated_normal shape stddev 0.1 N/A N/A N/A tf Variable initial N/A bias_variable N/A N/A shape N/A N/A N/A initial N/A N/A tf constant 0.1 shape shape N/A N/A N/A tf Variable initial N/A conv2d N/A N/A x W N/A N/A N/A N/A N/A N/A tf nn conv2d x W strides N/A 1 1 1 1 padding SAME N/A max_pool_2x2 N/A N/A x N/A N/A N/A N/A N/A N/A tf nn max_pool x ksize N/A 1 2 2 1 strides N/A 1 2 2 1 padding SAME N/A N/A x N/A N/A tf placeholder float shape N/A None N/A N/A image_size image_size on_band_count N/A y_ N/A N/A tf placeholder N/A tf float32 N/A None 2 N/A patch_size convolution_patch_size N/A W_conv1 N/A weight_variable N/A patch_size patch_size 1 32 N/A b_conv1 N/A bias_variable N/A 32 N/A x_image N/A N/A tf reshape x N/A -1 image_size image_size 1 N/A h_conv1 N/A N/A N/A tf nn relu N/A N/A conv2d x_image W_conv1 b_conv1 N/A h_pool1 N/A max_pool_2x2 h_conv1 N/A W_conv2 N/A weight_variable N/A patch_size patch_size 32 64 N/A b_conv2 N/A bias_variable N/A 64 N/A h_conv2 N/A N/A N/A tf nn relu N/A N/A conv2d h_pool1 W_conv2 b_conv2 N/A h_pool2 N/A max_pool_2x2 h_conv2 N/A W_fc1 N/A weight_variable N/A N/A N/A N/A N/A N/A image_size 4 image_size 4 64 on_band_count 1024 N/A b_fc1 N/A bias_variable N/A 1024 N/A h_pool2_flat N/A N/A tf reshape h_pool2 N/A -1 N/A N/A N/A N/A N/A image_size 4 image_size 4 64 on_band_count N/A h_fc1 N/A N/A N/A tf nn relu N/A N/A N/A tf matmul h_pool2_flat W_fc1 b_fc1 N/A W_fc2 N/A weight_variable N/A 1024 2 N/A b_fc2 N/A bias_variable N/A 2 N/A y_conv N/A N/A N/A tf nn softmax N/A N/A N/A tf matmul h_fc1 W_fc2 b_fc2 N/A cross_entropy N/A N/A N/A tf reduce_sum N/A y_ N/A N/A tf log y_conv N/A loss N/A N/A tf reduce_mean cross_entropy name xentropy_mean N/A train_step N/A N/A N/A N/A N/A tf train AdamOptimizer 0.0001 minimize cross_entropy N/A correct_prediction N/A N/A tf equal N/A N/A tf argmax y_conv 1 N/A N/A tf argmax y_ 1 N/A accuracy N/A N/A tf reduce_mean N/A N/A tf cast correct_prediction float N/A N/A N/A sess run N/A N/A tf initialize_all_variables N/A loss_total 0 N/A TRAINING... N/A t0 N/A N/A time time N/A i N/A range number_of_batches N/A N/A batch N/A N/A N/A data_sets train next_batch batch_size N/A N/A _ loss_val N/A N/A sess run N/A train_step cross_entropy feed_dict N/A x y_ N/A batch N/A 0 N/A batch N/A 1 N/A loss_total loss_val N/A N/A N/A step {}, loss = {}, loss rolling avg = {}  format i loss_val N/A loss_total N/A i 1 N/A N/A N/A training time {0:.1f}s format N/A N/A N/A time time t0 N/A N/A test accuracy %g N/A N/A accuracy eval feed_dict N/A x y_ N/A N/A data_sets test images N/A N/A data_sets test labels N/A prediction N/A N/A tf argmax y_conv 1 N/A index 0 N/A 
  print prediction.eval(feed_dict={x: data_sets.test.images}, session=sess)  
  for pred in prediction.eval(feed_dict={x: data_sets.test.images}, session=sess):
    if pred == 1:
      print index
  
    index += 1
   N/A N/A N/A prediction eval feed_dict N/A x N/A N/A data_sets test images session sess N/A