summaryrefslogtreecommitdiff
path: root/training/callbacks
diff options
context:
space:
mode:
authorGustaf Rydholm <gustaf.rydholm@gmail.com>2022-09-27 23:11:06 +0200
committerGustaf Rydholm <gustaf.rydholm@gmail.com>2022-09-27 23:11:06 +0200
commit9c7dbb9ca70858b870f74ecf595d3169f0cbc711 (patch)
treec342e2c004bb75571a380ef2805049a8fcec3fcc /training/callbacks
parent9b8e14d89f0ef2508ed11f994f73af624155fe1d (diff)
Rename mapping to tokenizer
Diffstat (limited to 'training/callbacks')
-rw-r--r--training/callbacks/wandb_callbacks.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/training/callbacks/wandb_callbacks.py b/training/callbacks/wandb_callbacks.py
index dc59f19..7d4f48e 100644
--- a/training/callbacks/wandb_callbacks.py
+++ b/training/callbacks/wandb_callbacks.py
@@ -117,9 +117,9 @@ class LogTextPredictions(Callback):
imgs = imgs.to(device=pl_module.device)
logits = pl_module.predict(imgs)
- mapping = pl_module.mapping
+ tokenizer = pl_module.tokenizer
data = [
- wandb.Image(img, caption=mapping.get_text(pred))
+ wandb.Image(img, caption=tokenizer.decode(pred))
for img, pred, label in zip(
imgs[: self.num_samples],
logits[: self.num_samples],