LR_batch_dims = (1, LR_height, LR_width, 1) #setting input placeholders HR_depth_batch_input = tf.placeholder(tf.float32, HR_batch_dims) HR_inten_batch_input = tf.placeholder(tf.float32, HR_batch_dims) LR_depth_batch_input = tf.placeholder(tf.float32, LR_batch_dims) coar_inter_dep_batch = tf.image.resize_images( LR_depth_batch_input, tf.constant(HR_patch_size, dtype=tf.int32), tf.image.ResizeMethod.BICUBIC) #gen_network construction inten_feature = bnb.inten_feature_extraction(HR_inten_batch_input) inten_1x_ten = bnb.inten_residual_block(inten_feature, 1) dep_2x_ten = bnb.LR_dep_feature_extraction(LR_depth_batch_input) dep_2x_ten_up = bnb.feature_up_unit(dep_2x_ten, 1) dep_ten = bnb.LR_dep_fusion(dep_2x_ten_up[0], inten_1x_ten, fusion_stage=1) HR_gen_dep = bnb.LR_dep_reconstruction(dep_2x_ten_up[0], dep_ten, coar_inter_dep_batch) #define loss for gen saver_full = tf.train.Saver() #begin comp_gen testing with tf.Session() as sess: model_path = "/media/kenny/Data/trained_models/multi_dense_guide_resnet/noise-free/l1loss/2x/full_model1/2x_ny_full_model.ckpt-99" saver_full.restore(sess, model_path) ten_fets = sess.run(HR_gen_dep, feed_dict={ HR_inten_batch_input: val_inten, HR_depth_batch_input: val_gth_dep, LR_depth_batch_input: val_LR_dep
#setting input placeholders HR_depth_batch_input = tf.placeholder(tf.float32, HR_batch_dims) HR_inten_batch_input = tf.placeholder(tf.float32, HR_batch_dims) LR_depth_batch_input = tf.placeholder(tf.float32, LR_batch_dims) coar_inter_dep_batch = tf.image.resize_images( LR_depth_batch_input, tf.constant(HR_patch_size, dtype=tf.int32), tf.image.ResizeMethod.BICUBIC) #gen_network construction inten_feature = bnb.inten_feature_extraction(HR_inten_batch_input) inten_1x_ten = bnb.inten_residual_block(inten_feature, 1) inten_ten, inten_2x_down = bnb.inten_residual_block(inten_1x_ten, 2) inten_2x_down_up = bnb.feature_up_unit(inten_2x_down, 1) dep_4x_ten = bnb.LR_dep_feature_extraction(LR_depth_batch_input) dep_4x_ten_up = bnb.feature_up_unit(dep_4x_ten, 2) dep_2x_ten = bnb.LR_dep_fusion(dep_4x_ten_up[0], inten_2x_down, fusion_stage=1) dep_2x_ten_up = bnb.feature_up_unit(dep_2x_ten, 1) dep_ten = bnb.LR_dep_fusion(tf.concat([dep_4x_ten_up[1], dep_2x_ten_up[0]], 3), tf.concat([inten_2x_down_up[0], inten_1x_ten], 3), fusion_stage=2) HR_gen_dep = bnb.LR_dep_reconstruction(dep_4x_ten_up[1], dep_ten, coar_inter_dep_batch) #define loss for gen saver_full = tf.train.Saver() #begin comp_gen testing with tf.Session() as sess: model_path = "/media/kenny/Data/trained_models/multi_dense_guide_resnet/noise-free/l1loss/4x/full_model3/4x_ny_full_model.ckpt-13" saver_full.restore(sess, model_path) ten_fets = sess.run(HR_gen_dep,