Skip to content

Commit 7d2d320

Browse files
Added missing temperature parameter to call to function sample_next().
1 parent a6a24ed commit 7d2d320

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

chapter12_part01_text-generation.ipynb

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -407,6 +407,7 @@
407407
" predictions = self.model(tokenized_sentence)\n",
408408
" next_token = sample_next(\n",
409409
" predictions[0, self.prompt_length - 1 + i, :]\n",
410+
" temperature
410411
" )\n",
411412
" sampled_token = tokens_index[next_token]\n",
412413
" sentence += \" \" + sampled_token\n",
@@ -478,4 +479,4 @@
478479
},
479480
"nbformat": 4,
480481
"nbformat_minor": 0
481-
}
482+
}

0 commit comments

Comments
 (0)