Merge pull request #521 from mwawrzos/torchhub

[SSD][hubconf] contiguous input tensor
This commit is contained in:
PrzemekS 2020-05-26 19:31:18 +02:00 committed by GitHub
commit 3e961c3a14
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -275,6 +275,7 @@ def nvidia_ssd_processing_utils():
NHWC = np.array(inputs)
NCHW = np.swapaxes(np.swapaxes(NHWC, 1, 3), 2, 3)
tensor = torch.from_numpy(NCHW)
tensor = tensor.contiguous()
tensor = tensor.cuda()
tensor = tensor.float()
if fp16: