neg_img = train_db[2] sess = tf.InteractiveSession() thr = tf.placeholder("float") y_target = tf.placeholder("float", [None, 1]) #12-net #conv layer 1 x_12 = tf.placeholder( "float", [None, etc.img_size_12 * etc.img_size_12 * etc.input_channel]) W_conv1_12 = etc.weight_variable([3, 3, 3, 16]) b_conv1_12 = etc.bias_variable([16]) x_12_reshaped = tf.reshape( x_12, [-1, etc.img_size_12, etc.img_size_12, etc.input_channel]) h_conv1_12 = tf.nn.relu(etc.conv2d(x_12_reshaped, W_conv1_12) + b_conv1_12) #pooling layer 1 h_pool1_12 = etc.max_pool_3x3(h_conv1_12) #fully layer 1 W_fc1_12 = etc.weight_variable([6 * 6 * 16, 16]) b_fc1_12 = etc.bias_variable([16]) h_pool1_12_reshaped = tf.reshape(h_pool1_12, [-1, 6 * 6 * 16]) h_fc1_12 = tf.nn.relu(tf.matmul(h_pool1_12_reshaped, W_fc1_12) + b_fc1_12) #fully layer2 W_fc2_12 = etc.weight_variable([16, 1]) b_fc2_12 = etc.bias_variable([1]) h_fc2_12 = tf.nn.sigmoid(tf.matmul(h_fc1_12, W_fc2_12) + b_fc2_12)
train_db = load_db.load_db_cali_train() sess = tf.InteractiveSession() y_target = tf.placeholder("float", [None,etc.cali_patt_num]) #12-net #conv layer 1 x_12 = tf.placeholder("float", [None, etc.img_size_12 * etc.img_size_12 * etc.input_channel]) W_conv1_12_cali = etc.weight_variable([3,3,3,16],'calib_wc1_12') b_conv1_12_cali = etc.bias_variable([16],'calib_bc1_12') x_12_reshaped = tf.reshape(x_12, [-1, etc.img_size_12, etc.img_size_12, etc.input_channel]) h_conv1_12 = tf.nn.relu(etc.conv2d(x_12_reshaped, W_conv1_12_cali) + b_conv1_12_cali) #pooling layer 1 h_pool1_12 = etc.max_pool_3x3(h_conv1_12) #fully layer 1 W_fc1_12_cali = etc.weight_variable([6 * 6 * 16, 128],'calib_wfc1_12') b_fc1_12_cali = etc.bias_variable([128],'calib_bfc1_12') h_pool1_12_reshaped = tf.reshape(h_pool1_12, [-1, 6 * 6 * 16]) h_fc1_12 = tf.nn.relu(tf.matmul(h_pool1_12_reshaped, W_fc1_12_cali) + b_fc1_12_cali) #fully layer2 W_fc2_12_cali = etc.weight_variable([128, etc.cali_patt_num],'calib_wfc2_12') b_fc2_12_cali = etc.bias_variable([etc.cali_patt_num],'calib_bfc2_12') h_fc2_12 = tf.nn.softmax(tf.matmul(h_fc1_12, W_fc2_12_cali) + b_fc2_12_cali)
train_db = load_db.load_db_cali_train() sess = tf.InteractiveSession() y_target = tf.placeholder("float", [None, etc.cali_patt_num]) #12-cali-net #conv layer 1 x_12 = tf.placeholder( "float", [None, etc.img_size_12 * etc.img_size_12 * etc.input_channel]) W_conv1_12_cali = etc.weight_variable([3, 3, 3, 16], 'calib_wc1_12') b_conv1_12_cali = etc.bias_variable([16], 'calib_bc1_12') x_12_reshaped = tf.reshape( x_12, [-1, etc.img_size_12, etc.img_size_12, etc.input_channel]) h_conv1_12 = tf.nn.relu( etc.conv2d(x_12_reshaped, W_conv1_12_cali) + b_conv1_12_cali) #pooling layer 1 h_pool1_12 = etc.max_pool_3x3(h_conv1_12) #fully layer 1 W_fc1_12_cali = etc.weight_variable([6 * 6 * 16, 128], 'calib_wfc1_12') b_fc1_12_cali = etc.bias_variable([128], 'calib_bfc1_12') h_pool1_12_reshaped = tf.reshape(h_pool1_12, [-1, 6 * 6 * 16]) h_fc1_12 = tf.nn.relu( tf.matmul(h_pool1_12_reshaped, W_fc1_12_cali) + b_fc1_12_cali) #fully layer2 W_fc2_12_cali = etc.weight_variable([128, etc.cali_patt_num], 'calib_wfc2_12') b_fc2_12_cali = etc.bias_variable([etc.cali_patt_num], 'calib_bfc2_12') h_fc2_12 = tf.nn.softmax(tf.matmul(h_fc1_12, W_fc2_12_cali) + b_fc2_12_cali)