Skip to content
This repository was archived by the owner on Jul 7, 2023. It is now read-only.

Commit 05f02d8

Browse files
royaurkocopybara-github
authored andcommitted
Fix a bug that causes a crash when decoding for language models because initially targets is empty and only "infer_targets" is populated.
PiperOrigin-RevId: 317003338
1 parent 15ea434 commit 05f02d8

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

tensor2tensor/utils/t2t_model.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1718,7 +1718,7 @@ def estimator_spec_predict(self, features, use_tpu=False):
17181718

17191719
inputs = features.get("inputs")
17201720
if inputs is None:
1721-
inputs = features["targets"]
1721+
inputs = features.get("targets")
17221722

17231723
predictions = {
17241724
"outputs": outputs,

0 commit comments

Comments
 (0)