From ca5da3dfe08244fc26712e14d3e4771c97ddf192 Mon Sep 17 00:00:00 2001 From: Glenn Jocher Date: Sun, 8 Dec 2019 18:30:10 -0800 Subject: [PATCH] updates --- models.py | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/models.py b/models.py index cf95a959..8a3460da 100755 --- a/models.py +++ b/models.py @@ -167,9 +167,7 @@ class YOLOLayer(nn.Module): create_grids(self, img_size, (nx, ny), p.device, p.dtype) # p.view(bs, 255, 13, 13) -- > (bs, 3, 13, 13, 85) # (bs, anchors, grid, grid, classes + xywh) - # p = p.view(bs, self.na, self.nc + 5, self.ny, self.nx).permute(0, 1, 3, 4, 2).contiguous() # prediction - # https://discuss.pytorch.org/t/in-pytorch-0-4-is-it-recommended-to-use-reshape-than-view-when-it-is-possible/17034 - p = p.reshape(bs, self.na, self.nc + 5, self.ny, self.nx).permute(0, 1, 3, 4, 2) # prediction + p = p.view(bs, self.na, self.nc + 5, self.ny, self.nx).permute(0, 1, 3, 4, 2).contiguous() # prediction if self.training: return p