saver.restore(sess, args.load) batch_idx_train = 0 batch_idx_test = 0 epoch_idx = 0 iteration = 0 maxl_array = np.zeros((2)) maxl_array[0] = args.voxel_size maxl_array[1] = args.voxel_size epCount = dataLoad.fileCount(args.datapath) stepFactor = 9 epochs = dataLoad.gen_epochs(args.epochs, args.datapath, args.batch_size, args.velocity_multiplier, True, args.output_dim) sess.graph.finalize() while True: batch_train, batch_validate = next(epochs, [None, None]) epoch_idx += 1 if batch_train == None: break print(colored("Epoch %03d" % (epoch_idx), 'yellow')) # Training loop while True:
batch_idx_train = 0 batch_idx_test = 0 epoch_idx = 0 iteration = 0 maxl_array = np.zeros((2)) maxl_array[0] = args.voxel_size maxl_array[1] = args.voxel_size epCount = dataLoad.fileCount(args.datapath) stepFactor = 9 for epoch_train, epoch_validate in dataLoad.gen_epochs( args.epochs, args.datapath, args.batch_size, args.velocity_multiplier, True, args.output_dim): epoch_idx += 1 print(colored("Epoch %03d" % (epoch_idx), 'yellow')) # Train for _x, _x_size in epoch_train: if batch_idx_train == 10 and args.profile: print(colored("Profiling in progress...", 'yellow')) with tf.contrib.tfprof.ProfileContext('prof/%s' % args.name, trace_steps=[], dump_steps=[]) as pctx: if args.dosim and args.doloop: