summary_writer.add_image("UV", dataset.uv, channels=2) summary_op = tf.summary.merge(summary_writer.lists) return Model(train_op=train_op, summary_op=summary_op, loss=loss, vars=tf_vars, output=reconstruct_mask) if __name__ == '__main__': set_random_seed(args) # setting up logging logger = initial_logger(args) args.logger = logger args.ngf = 32 args.resnet_conv_count = 2 args.resnet_res_count = 9 args.resnet_padding = 'SYMMETRIC' # load data and preprocess dataset = data_mask.load_data(args) # build network logger.info('------Build Network Structure------') model = create_model(dataset, args)
exit(-1) def create_test_model(uv, args): with tf.variable_scope("mask_branch"): reconstruct_mask = resnet_cyclegan(uv, output_channles=1, activation="sigmoid", prefix="mask", args=args) return reconstruct_mask if __name__ == '__main__': # setting up logging logger = initial_logger(args, dump_code=False) args.logger = logger args.resolution = 512 args.ngf = 32 args.resnet_conv_count = 2 args.resnet_res_count = 9 args.resnet_padding = 'SYMMETRIC' args.batch_size = 1 # build network logger.info('------Build Network Structure------') tf_uv = tf.placeholder(dtype=tf.float32, shape=[1, args.resolution, args.resolution, 2]) output = create_test_model(tf_uv, args)