Code indexing in gitaly is broken and leads to code not being visible to the user. We work on the issue with highest priority.

Skip to content
Snippets Groups Projects
Commit c70e7235 authored by tekin_g's avatar tekin_g
Browse files

increase checkpoint number

parent 4be4147f
No related branches found
No related tags found
No related merge requests found
......@@ -18,7 +18,7 @@ import time
base_dir = "/data"
ground_truthdir = base_dir + '/train/ground_truth/'
input_dir = base_dir + "/train/input/"
test_image = base_dir + "/test/input/0.npz"
learning_rate = 0.008
timestr = time.strftime("%Y%m%d-%H%M%S")
run_name = "/RLN_Final_Model_{}_{}/".format(learning_rate,timestr)
......@@ -131,7 +131,7 @@ i = tf.Variable(0, trainable=False, dtype=tf.int64)
#ckpt = tf.train.Checkpoint(step=i, model=model, optimizer=optimizer)
ckpt = tf.train.Checkpoint(step=i, model=model)
manager = tf.train.CheckpointManager(ckpt, train_model_path, max_to_keep=5)
manager = tf.train.CheckpointManager(ckpt, train_model_path, max_to_keep=20)
for epoch in range(0, epochs):
logging.info("\nStart of epoch %d" % (epoch,))
......@@ -181,5 +181,12 @@ for epoch in range(0, epochs):
save_path = manager.save()
logging.info("Saved checkpoint for step {}: {}".format(int(ckpt.step), save_path))
logging.info("loss {:1.2f}".format(loss_value.numpy()))
if int(i)%301 == 0 and test_image is not None:
x = [images.read_file(test_image)]
inference = model(x, training=False)
tf.summary.image("test input", x, i,max_outputs=1)
tf.summary.image("test output", inference[0], i,max_outputs=1)
tf.summary.image("test estimation", inference[1], i,max_outputs=1)
# Log every 200 batches.
logging.info("Step %s", int(i))
......@@ -37,7 +37,7 @@ model = RLN_model_simple(name="test")
i = tf.Variable(0, trainable=False, dtype=tf.int64)
ckpt = tf.train.Checkpoint(step=i, model=model)
manager = tf.train.CheckpointManager(ckpt, train_model_path, max_to_keep=5)
manager = tf.train.CheckpointManager(ckpt, train_model_path, max_to_keep=20)
ckpt.restore(manager.latest_checkpoint)
logging.info("restore sucessfull")
a = os.listdir(input_dir)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment