diff options
Diffstat (limited to 'training/callbacks')
-rw-r--r-- | training/callbacks/wandb_callbacks.py | 4 |
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], |