Add slow generate tests for pretrained lm models (#2909)

* add slow generate lm_model tests

* fix conflicts

* merge conflicts

* fix conflicts

* add slow generate lm_model tests

* make style

* delete unused variable

* fix conflicts

* fix conflicts

* fix conflicts

* delete unused variable

* fix conflicts

* finished hard coded tests
This commit is contained in:
Patrick von Platen
2020-02-24 17:51:57 +01:00
committed by GitHub
parent 8194df8e0c
commit 17c45c39ed
8 changed files with 991 additions and 6 deletions

View File

@@ -641,7 +641,7 @@ global_rng = random.Random()
def ids_tensor(shape, vocab_size, rng=None, name=None):
"""Creates a random int32 tensor of the shape within the vocab size."""
# Creates a random int32 tensor of the shape within the vocab size
if rng is None:
rng = global_rng