multi_gpu multi_scale

This commit is contained in:
Glenn Jocher 2019-03-19 15:38:53 +02:00
parent dcdd1ae6b7
commit 2f1afd2d69
1 changed files with 1 additions and 2 deletions

View File

@ -223,8 +223,7 @@ def create_grids(self, img_size, nG, device='cpu'):
# build wh gains # build wh gains
self.anchor_vec = self.anchors.to(device) / self.stride self.anchor_vec = self.anchors.to(device) / self.stride
self.anchor_wh = self.anchor_vec.view(1, self.nA, 1, 1, 2).to(device) self.anchor_wh = self.anchor_vec.view(1, self.nA, 1, 1, 2).to(device)
self.nG = torch.Tensor([nG], device=device) self.nG = torch.FloatTensor([nG]).to(device)
def load_darknet_weights(self, weights, cutoff=-1): def load_darknet_weights(self, weights, cutoff=-1):
# Parses and loads the weights stored in 'weights' # Parses and loads the weights stored in 'weights'