[LayoutLMV2 Tests] Make sure input is on GPU (#15314)

* [LayoutLMV2 Tests] Make sure input is on GPU

* correct empty line
This commit is contained in:
Patrick von Platen 2022-01-24 15:54:47 +01:00 committed by GitHub
parent c15bb3fe19
commit dcaa5100c9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -122,7 +122,8 @@ class LayoutLMv2ModelTester:
bbox[i, j, 0] = t
image = ImageList(
torch.zeros(self.batch_size, self.num_channels, self.image_size, self.image_size), self.image_size
torch.zeros(self.batch_size, self.num_channels, self.image_size, self.image_size, device=torch_device),
self.image_size,
)
input_mask = None