ソースを参照

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

5.0
Glenn Jocher GitHub 3年前
コミット
fca5e2a48f
この署名に対応する既知のキーがデータベースに存在しません GPGキーID: 4AEE18F83AFDEB23
1個のファイルの変更1行の追加1行の削除
  1. +1
    -1
      models/common.py

+ 1
- 1
models/common.py ファイルの表示

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

読み込み中…
キャンセル
保存