Procházet zdrojové kódy

autocast enable=torch.cuda.is_available() (#2748)

5.0
Glenn Jocher GitHub před 3 roky
rodič
revize
fca5e2a48f
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
      models/common.py

+ 1
- 1
models/common.py Zobrazit soubor

@@ -237,7 +237,7 @@ class autoShape(nn.Module):
return self

@torch.no_grad()
@torch.cuda.amp.autocast()
@torch.cuda.amp.autocast(torch.cuda.is_available())
def forward(self, imgs, size=640, augment=False, profile=False):
# Inference from various sources. For height=640, width=1280, RGB images example inputs are:
# filename: imgs = 'data/samples/zidane.jpg'

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