Przeglądaj źródła

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

5.0
Glenn Jocher GitHub 3 lat temu
rodzic
commit
fca5e2a48f
Nie znaleziono w bazie danych klucza dla tego podpisu ID klucza GPG: 4AEE18F83AFDEB23
1 zmienionych plików z 1 dodań i 1 usunięć
  1. +1
    -1
      models/common.py

+ 1
- 1
models/common.py Wyświetl plik

@@ -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'

Ładowanie…
Anuluj
Zapisz