[SSD][hubconf] contiguous input tensor

This commit is contained in:
Marek Wawrzos 2020-05-20 16:00:47 +02:00
parent 9189f07093
commit ffe84ae70a

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: