Skip to content

Commit

Permalink
[wip] enabled debugging
Browse files Browse the repository at this point in the history
  • Loading branch information
NikolasMarkou committed Mar 28, 2022
1 parent f69f1e4 commit b7d4420
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@
},
"train": {
"epochs": 100,
"debugging": true,
"total_steps": -1,
"checkpoints_to_keep": 3,
"checkpoint_every": 10000,
Expand Down
19 changes: 13 additions & 6 deletions bfcnn/train_loop.py
Original file line number Diff line number Diff line change
Expand Up @@ -79,12 +79,7 @@ def train_loop(
optimizer, lr_schedule = \
optimizer_builder(config=config["train"]["optimizer"])

# --- create the help variables
global_step = tf.Variable(
0, trainable=False, dtype=tf.dtypes.int64, name="global_step")
global_epoch = tf.Variable(
0, trainable=False, dtype=tf.dtypes.int64, name="global_epoch")
summary_writer = tf.summary.create_file_writer(model_dir)


# --- get the train configuration
train_config = config["train"]
Expand Down Expand Up @@ -121,6 +116,18 @@ def train_loop(
use_discriminator = MODEL_DISCRIMINATE_STR in config
model_discriminate = None

# --- enable debugging
if train_config.get("debugging", False):
tf.debugging.experimental.enable_dump_debug_info(
str(model_dir), tensor_debug_mode="FULL_HEALTH")

# --- create the help variables
global_step = tf.Variable(
0, trainable=False, dtype=tf.dtypes.int64, name="global_step")
global_epoch = tf.Variable(
0, trainable=False, dtype=tf.dtypes.int64, name="global_epoch")
summary_writer = tf.summary.create_file_writer(model_dir)

# --- build the denoise model
tf.summary.trace_on(graph=True, profiler=False)
with summary_writer.as_default():
Expand Down

0 comments on commit b7d4420

Please sign in to comment.