From 788e90199a86b6f2604e11a231c51697b2a2a11e Mon Sep 17 00:00:00 2001 From: beta Date: Mon, 2 May 2022 23:04:19 +0900 Subject: [PATCH] (#3) Defense: Fix rank of images --- src/defense/models.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/defense/models.py b/src/defense/models.py index 1d183b3..1d07df7 100644 --- a/src/defense/models.py +++ b/src/defense/models.py @@ -161,8 +161,11 @@ def custom_callbacks(self) -> List[keras.callbacks.Callback]: with defense_model.tensorboard_file_writer().as_default(): for idx, (x, _) in enumerate(test_set): y = defense_model.predict(x) + + tf.summary.image(f"(Defense) Original images", x, step=idx) + tf.summary.image( - f"{args.defense.upper()} processing result", [x, y], step=idx + f"(Defense) {args.defense.upper()} processing result", y, step=idx ) progress.add(1)