Skip to content

Commit

Permalink
(#3) Defense: Fix rank of images
Browse files Browse the repository at this point in the history
  • Loading branch information
betarixm committed May 2, 2022
1 parent afb63f0 commit 788e901
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/defense/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)

0 comments on commit 788e901

Please sign in to comment.