Procházet zdrojové kódy

Update loss for FP16 `tobj` (#7088)

modifyDataloader
Glenn Jocher GitHub před 2 roky
rodič
revize
a2d617ece9
V databázi nebyl nalezen žádný známý klíč pro tento podpis ID GPG klíče: 4AEE18F83AFDEB23
1 změnil soubory, kde provedl 1 přidání a 1 odebrání
  1. +1
    -1
      utils/loss.py

+ 1
- 1
utils/loss.py Zobrazit soubor

@@ -125,7 +125,7 @@ class ComputeLoss:
# Losses
for i, pi in enumerate(p): # layer index, layer predictions
b, a, gj, gi = indices[i] # image, anchor, gridy, gridx
tobj = torch.zeros(pi.shape[:4], device=self.device) # target obj
tobj = torch.zeros(pi.shape[:4], dtype=pi.dtype, device=self.device) # target obj

n = b.shape[0] # number of targets
if n:

Načítá se…
Zrušit
Uložit