[Tests, GPU, SLOW] fix a bunch of GPU hardcoded tests in Pytorch (#4468)

* fix gpu slow tests in pytorch

* change model to device syntax
This commit is contained in:
Patrick von Platen
2020-05-19 21:35:04 +02:00
committed by GitHub
parent 5856999a9f
commit aa925a52fa
11 changed files with 28 additions and 11 deletions

View File

@@ -517,6 +517,7 @@ class XLNetModelLanguageGenerationTest(unittest.TestCase):
@slow
def test_lm_generate_xlnet_base_cased(self):
model = XLNetLMHeadModel.from_pretrained("xlnet-base-cased")
model.to(torch_device)
input_ids = torch.tensor(
[
[