Kaynağa Gözat

`yolo.py --profile` updates (#7170)

modifyDataloader
Glenn Jocher GitHub 2 yıl önce
ebeveyn
işleme
b2194b9015
Veri tabanında bu imza için bilinen anahtar bulunamadı GPC Anahtar Kimliği: 4AEE18F83AFDEB23
1 değiştirilmiş dosya ile 2 ekleme ve 2 silme
  1. +2
    -2
      models/yolo.py

+ 2
- 2
models/yolo.py Dosyayı Görüntüle

@@ -310,11 +310,11 @@ if __name__ == '__main__':

# Create model
model = Model(opt.cfg).to(device)
model.train()

# Profile
if opt.profile:
img = torch.rand(16 if torch.cuda.is_available() else 1, 3, 640, 640).to(device)
model.eval().fuse()
img = torch.rand(8 if torch.cuda.is_available() else 1, 3, 640, 640).to(device)
y = model(img, profile=True)

# Test all models

Yükleniyor…
İptal
Kaydet