Commit 758c8a5d authored by Andrey Filippov's avatar Andrey Filippov
Browse files

Trying next versions with partial second stage - 5x5+3x3+1x1

parent 17e64c60
Loading
Loading
Loading
Loading
+1 −1
Original line number Original line Diff line number Diff line
@@ -1030,7 +1030,7 @@ if __name__ == "__main__":
  
  
  ml_list_train=ex_data.getMLList(ml_subdir, ex_data.files_train)
  ml_list_train=ex_data.getMLList(ml_subdir, ex_data.files_train)
  ml_list_test= ex_data.getMLList(ml_subdir, ex_data.files_test)
  ml_list_test= ex_data.getMLList(ml_subdir, ex_data.files_test)
  num_test_scenes = [ex_data.files_test, ex_data.files_train][TEST_SAME_LENGTH_AS_TRAIN]    
  num_test_scenes = len([ex_data.files_test, ex_data.files_train][TEST_SAME_LENGTH_AS_TRAIN])    
          
          


  if RADIUS == 0 :
  if RADIUS == 0 :

nn_ds_neibs10.py

0 → 100644
+1515 −0

File added.

Preview size limit exceeded, changes collapsed.

nn_ds_neibs11.py

0 → 100644
+1548 −0

File added.

Preview size limit exceeded, changes collapsed.

+7 −6
Original line number Original line Diff line number Diff line
@@ -58,13 +58,13 @@ SHUFFLE_EPOCH = True
NET_ARCH1 =       0 # 4 # #4 # 8 # 4 # 0 #3 # 0 #  0 # 0 # 0 # 8 # 0 # 7 # 2 #0 # 6 #0 # 4 # 3 # overwrite with argv?
NET_ARCH1 =       0 # 4 # #4 # 8 # 4 # 0 #3 # 0 #  0 # 0 # 0 # 8 # 0 # 7 # 2 #0 # 6 #0 # 4 # 3 # overwrite with argv?
NET_ARCH2 =       0 # 4 # 0 # 0 # 4 # 0 # 0 # 3 #  0 # 3 # 0 # 3 # 0 # 2 #0 # 6 # 0 # 3 # overwrite with argv?
NET_ARCH2 =       0 # 4 # 0 # 0 # 4 # 0 # 0 # 3 #  0 # 3 # 0 # 3 # 0 # 2 #0 # 6 # 0 # 3 # overwrite with argv?
SYM8_SUB =        False # True #False #  True # False # True # False # True # False # enforce inputs from 2d correlation have symmetrical ones (groups of 8)
SYM8_SUB =        False # True #False #  True # False # True # False # True # False # enforce inputs from 2d correlation have symmetrical ones (groups of 8)
ONLY_TILE =        None # 4 # None # 0 # 4# None # (remove all but center tile data), put None here for normal operation)
ONLY_TILE =        12 # None # 4 # None # 0 # 4# None # (remove all but center tile data), put None here for normal operation)
ZIP_LHVAR =        True # combine _lvar and _hvar as odd/even elements 
ZIP_LHVAR =        True # combine _lvar and _hvar as odd/even elements 
#DEBUG_PACK_TILES = True
#DEBUG_PACK_TILES = True
# CLUSTER_RADIUS should match input data
# CLUSTER_RADIUS should match input data
CLUSTER_RADIUS =     2 # 1 # 1 - 3x3, 2 - 5x5 tiles
CLUSTER_RADIUS =     2 # 1 # 1 - 3x3, 2 - 5x5 tiles
SHUFFLE_FILES  =     True
SHUFFLE_FILES  =     True
WLOSS_LAMBDA =       0.0 # 50.0 # 5.0 # 1.0 # fraction of the W_loss (input layers weight non-uniformity) added to G_loss
WLOSS_LAMBDA =       2.0 #3.0 # 1.0 # 0.3 # 0.0 # 50.0 # 5.0 # 1.0 # fraction of the W_loss (input layers weight non-uniformity) added to G_loss
WBORDERS_ZERO =      True # Border conditions for first layer weights: False - free, True - tied to 0
WBORDERS_ZERO =      True # Border conditions for first layer weights: False - free, True - tied to 0
MAX_FILES_PER_GROUP = 6 # just to try, normally should be 8
MAX_FILES_PER_GROUP = 6 # just to try, normally should be 8
FILE_UPDATE_EPOCHS =  2 # update train files each this many epochs. 0 - do not update
FILE_UPDATE_EPOCHS =  2 # update train files each this many epochs. 0 - do not update
@@ -439,7 +439,8 @@ dir_train_hvar = data_dir # "/home/eyesis/x3d_data/data_sets/tf_data_5x5_main"
dir_train_lvar1 = data_dir1 #"/home/eyesis/x3d_data/data_sets/tf_data_5x5_main_1" # data_dir # "/home/eyesis/x3d_data/data_sets/tf_data_5x5_main"
dir_train_lvar1 = data_dir1 #"/home/eyesis/x3d_data/data_sets/tf_data_5x5_main_1" # data_dir # "/home/eyesis/x3d_data/data_sets/tf_data_5x5_main"
dir_train_hvar1 = data_dir1 # "/home/eyesis/x3d_data/data_sets/tf_data_5x5_main"
dir_train_hvar1 = data_dir1 # "/home/eyesis/x3d_data/data_sets/tf_data_5x5_main"
dir_test_lvar =   data_dir # data_dir #"/home/eyesis/x3d_data/data_sets/tf_data_5x5_center/" # data_dir # "/home/eyesis/x3d_data/data_sets/tf_data_5x5_main"
dir_test_lvar =   data_dir # data_dir #"/home/eyesis/x3d_data/data_sets/tf_data_5x5_center/" # data_dir # "/home/eyesis/x3d_data/data_sets/tf_data_5x5_main"
dir_test_hvar =   "/home/eyesis/x3d_data/data_sets/tf_data_5x5_main_3" # data_dir #"/home/eyesis/x3d_data/data_sets/tf_data_5x5_center" #  data_dir # "/home/eyesis/x3d_data/data_sets/tf_data_5x5_main"
#dir_test_hvar =   "/home/eyesis/x3d_data/data_sets/tf_data_5x5_main_3" # data_dir #"/home/eyesis/x3d_data/data_sets/tf_data_5x5_center" #  data_dir # "/home/eyesis/x3d_data/data_sets/tf_data_5x5_main"
dir_test_hvar =   "/home/eyesis/x3d_data/data_sets/tf_data_5x5_main_5" # data_dir #"/home/eyesis/x3d_data/data_sets/tf_data_5x5_center" #  data_dir # "/home/eyesis/x3d_data/data_sets/tf_data_5x5_main"
dir_img =         os.path.join(img_dir,"img") # "/home/eyesis/x3d_data/data_sets/tf_data_5x5_main/img"
dir_img =         os.path.join(img_dir,"img") # "/home/eyesis/x3d_data/data_sets/tf_data_5x5_main/img"
dir_result =      os.path.join(data_dir,"result") # "/home/eyesis/x3d_data/data_sets/tf_data_5x5_main/result"
dir_result =      os.path.join(data_dir,"result") # "/home/eyesis/x3d_data/data_sets/tf_data_5x5_main/result"


@@ -574,7 +575,7 @@ Compare with other (not used) train sets (use 7 of each instead of 8, 8-th as te
#just testing:
#just testing:
#files_train_lvar = files_train_hvar
#files_train_lvar = files_train_hvar
files_test_lvar =  ["train004_R2_GT_1.5.tfrecords"]# ["train007_R2_LE_1.5.tfrecords"]# "testTEST_R2_LE_1.5.tfrecords"] # testTEST_R2_LE_1.5.tfrecords"]
files_test_lvar =  ["train004_R2_GT_1.5.tfrecords"]# ["train007_R2_LE_1.5.tfrecords"]# "testTEST_R2_LE_1.5.tfrecords"] # testTEST_R2_LE_1.5.tfrecords"]
files_test_hvar =  ["train000_R2_GT_1.5.tfrecords"]#"testTEST_R2_GT_1.5.tfrecords"] # "testTEST_R2_GT_1.5.tfrecords"]
files_test_hvar =  ["testTEST_R2_GT_1.5.tfrecords"] # Now same size as train! # ["train000_R2_GT_1.5.tfrecords"]#"testTEST_R2_GT_1.5.tfrecords"] # "testTEST_R2_GT_1.5.tfrecords"]
#files_img =        ['1527257933_150165-v04'] # overlook
#files_img =        ['1527257933_150165-v04'] # overlook
#files_img =        ['1527256858_150165-v01'] # State Street
#files_img =        ['1527256858_150165-v01'] # State Street
#files_img =        ['1527256816_150165-v02'] # State Street
#files_img =        ['1527256816_150165-v02'] # State Street
@@ -1067,7 +1068,7 @@ def weightsLoss(inp_weights): # [batch_size,(1..2)] tf_result
        tf_inp =     tf.reshape(inp_weights[:TILE_LAYERS * TILE_SIZE,:], [TILE_LAYERS, FILE_TILE_SIDE, FILE_TILE_SIDE, inp_weights.shape[1]], name = "tf_inp")
        tf_inp =     tf.reshape(inp_weights[:TILE_LAYERS * TILE_SIZE,:], [TILE_LAYERS, FILE_TILE_SIDE, FILE_TILE_SIDE, inp_weights.shape[1]], name = "tf_inp")
        if WBORDERS_ZERO:
        if WBORDERS_ZERO:
            tf_zero_col = tf.constant(0.0, dtype=tf.float32, shape=[tf_inp.shape[0], tf_inp.shape[1], 1,                   tf_inp.shape[3]], name = "tf_zero_col")
            tf_zero_col = tf.constant(0.0, dtype=tf.float32, shape=[tf_inp.shape[0], tf_inp.shape[1], 1,                   tf_inp.shape[3]], name = "tf_zero_col")
            tf_zero_row = tf.constant(0.0, dtype=tf.float32, shape=[tf_inp.shape[0], 1 ,              tf_inp.shape[2], tf_inp.shape[3]], name = "tf_zero_row")
            tf_zero_row = tf.constant(0.0, dtype=tf.float32, shape=[tf_inp.shape[0], 1 ,              tf_inp.shape[2] + 2, tf_inp.shape[3]], name = "tf_zero_row")
            tf_inp_ext_h = tf.concat([tf_zero_col,                 tf_inp,       tf_zero_col                 ], axis = 2, name ="tf_inp_ext_h")
            tf_inp_ext_h = tf.concat([tf_zero_col,                 tf_inp,       tf_zero_col                 ], axis = 2, name ="tf_inp_ext_h")
            tf_inp_ext   = tf.concat([tf_zero_row,                 tf_inp_ext_h, tf_zero_row                 ], axis = 1, name ="tf_inp_ext")
            tf_inp_ext   = tf.concat([tf_zero_row,                 tf_inp_ext_h, tf_zero_row                 ], axis = 1, name ="tf_inp_ext")
        else:
        else: