From 5f115fdf610d9442e9f6f1aecf7424394660c03a Mon Sep 17 00:00:00 2001 From: Michael Wu Date: Wed, 11 Sep 2019 10:41:59 -0700 Subject: [PATCH] Fix pytext tutorial syntax Summary: https://github.com/facebookresearch/pytext/issues/934 Reviewed By: chenyangyu1988 Differential Revision: D17295128 fbshipit-source-id: 011b034cf7ccaee0752263f8ce86b1889f2ea923 --- pytext/docs/source/tensorizer.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pytext/docs/source/tensorizer.rst b/pytext/docs/source/tensorizer.rst index 7e34bdae2..707f15e01 100644 --- a/pytext/docs/source/tensorizer.rst +++ b/pytext/docs/source/tensorizer.rst @@ -146,7 +146,7 @@ We can test our tensorizer with the following code that initializes the vocab, t # test again, this time also make the tensors numberized_rows = (tensorizer.numberize(r) for r in rows) - words_tensors, seq_len_tensors = tensorizer.tensorize(numberized_rows)) + words_tensors, seq_len_tensors = tensorizer.tensorize(numberized_rows) # Notice the padding (1) of the 2nd tensor to match the dimension assert words_tensors.equal(torch.tensor([[2, 3, 4, 5], [6, 7, 8, 1]])) assert seq_len_tensors.equal(torch.tensor([4, 3]))