Fix float zeros format (#5491)
* Fix float zeros format * 255 to integer
This commit is contained in:
1 parent
8a803f36d3
commit
5866646cc8
16 files changed
+36
-36
No files matched your search
+4
-4
@@ -634,13 +634,13 @@ class LoadImagesAndLabels(Dataset):
|
||||
n = len(shapes) // 4
|
||||
img4, label4, path4, shapes4 = [], [], path[:n], shapes[:n]
|
||||
|
||||
ho = torch.tensor([[0., 0, 0, 1, 0, 0]])
|
||||
wo = torch.tensor([[0., 0, 1, 0, 0, 0]])
|
||||
s = torch.tensor([[1, 1, .5, .5, .5, .5]]) # scale
|
||||
ho = torch.tensor([[0.0, 0, 0, 1, 0, 0]])
|
||||
wo = torch.tensor([[0.0, 0, 1, 0, 0, 0]])
|
||||
s = torch.tensor([[1, 1, 0.5, 0.5, 0.5, 0.5]]) # scale
|
||||
for i in range(n): # zidane torch.zeros(16,3,720,1280) # BCHW
|
||||
i *= 4
|
||||
if random.random() < 0.5:
|
||||
im = F.interpolate(img[i].unsqueeze(0).float(), scale_factor=2., mode='bilinear', align_corners=False)[
|
||||
im = F.interpolate(img[i].unsqueeze(0).float(), scale_factor=2.0, mode='bilinear', align_corners=False)[
|
||||
0].type(img[i].type())
|
||||
l = label[i]
|
||||
else:
|
||||
|
||||
Reference in new issue
Block a user