We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
indexing='ij'
1 parent fee83c1 commit 9c77dcfCopy full SHA for 9c77dcf
models/yolo.py
@@ -74,7 +74,7 @@ def forward(self, x):
74
75
def _make_grid(self, nx=20, ny=20, i=0):
76
d = self.anchors[i].device
77
- yv, xv = torch.meshgrid([torch.arange(ny).to(d), torch.arange(nx).to(d)])
+ yv, xv = torch.meshgrid([torch.arange(ny).to(d), torch.arange(nx).to(d)], indexing='ij')
78
grid = torch.stack((xv, yv), 2).expand((1, self.na, ny, nx, 2)).float()
79
anchor_grid = (self.anchors[i].clone() * self.stride[i]) \
80
.view((1, self.na, 1, 1, 2)).expand((1, self.na, ny, nx, 2)).float()
0 commit comments