Update.
authorFrançois Fleuret <francois@fleuret.org>
Mon, 22 Jul 2024 04:38:40 +0000 (06:38 +0200)
committerFrançois Fleuret <francois@fleuret.org>
Mon, 22 Jul 2024 04:38:40 +0000 (06:38 +0200)
quiz_machine.py

index 5f14528..c73b6d0 100755 (executable)
@@ -73,7 +73,8 @@ def one_batch_masked_inplace_autoregression(
 
         logits = output[:, s]
 
-        logits = logit_transformer(s, logits).log_softmax(dim=-1)
+        if logit_transformer is not None:
+            logits = logit_transformer(s, logits).log_softmax(dim=-1)
 
         if deterministic_synthesis:
             t_next = logits.argmax(-1)