Small changes in perplexity.rstto make the notebook executable on google collaboratory (#13541)

* add imports

* Update docs/source/perplexity.rst

Co-authored-by: Sylvain Gugger <35901082+sgugger@users.noreply.github.com>

Co-authored-by: Sylvain Gugger <35901082+sgugger@users.noreply.github.com>
This commit is contained in:
SaulLu
2021-09-13 13:32:32 +02:00
committed by GitHub
parent f1c22dae7d
commit 149c833b75

View File

@@ -110,6 +110,9 @@ available to condition on).
.. code-block:: python .. code-block:: python
import torch
from tqdm import tqdm
max_length = model.config.n_positions max_length = model.config.n_positions
stride = 512 stride = 512