def main(_): run_config = tf.ConfigProto() run_config.gpu_options.allow_growth = True init = tf.global_variables_initializer() init_l = tf.local_variables_initializer() with tf.Session(config=run_config) as sess: sess.run(init) sess.run(init_l) model = ambientGAN(args) args.images_path = os.path.join(args.images_path, args.measurement) args.graph_path = os.path.join(args.graph_path, args.measurement) args.checkpoints_path = os.path.join(args.checkpoints_path, args.measurement) #create graph, images, and checkpoints folder if they don't exist if not os.path.exists(args.checkpoints_path): os.makedirs(args.checkpoints_path) if not os.path.exists(args.graph_path): os.makedirs(args.graph_path) if not os.path.exists(args.images_path): os.makedirs(args.images_path) print 'Start Training...' train(args, sess, model)
def main(_): run_config = tf.ConfigProto() run_config.gpu_options.allow_growth = True with tf.Session(config=run_config) as sess: model = ambientGAN(args) args.images_path = os.path.join(args.images_path, args.measurement) args.graph_path = os.path.join(args.graph_path, args.measurement) args.checkpoints_path = os.path.join(args.checkpoints_path, args.measurement) #create graph and checkpoints folder if they don't exist if not os.path.exists(args.checkpoints_path): os.makedirs(args.checkpoints_path) if not os.path.exists(args.graph_path): os.makedirs(args.graph_path) if not os.path.exists(args.images_path): os.makedirs(args.images_path) print 'Start Testing...' test(args, sess, model)
def main(_): run_config = tf.ConfigProto() run_config.gpu_options.allow_growth = True with tf.Session(config=run_config) as sess: model = ambientGAN(args, Trainmode) args.images_path = os.path.join(args.images_path, args.measurement) args.graph_path = os.path.join(args.graph_path, args.measurement) args.checkpoints_path = os.path.join(args.checkpoints_path, args.measurement) # create graph, images, and checkpoints folder if they don't exist if not os.path.exists(args.checkpoints_path): os.makedirs(args.checkpoints_path) if not os.path.exists(args.graph_path): os.makedirs(args.graph_path) if not os.path.exists(args.images_path): os.makedirs(args.images_path) real_dataset_iterator = RealDsIterator() print('Start Training...') train(args, sess, model, real_dataset_iterator)