Merge pull request #488 from helmutg/patch-1

FeatureExtractor: avoid loading weights twice
pull/511/head
Kaiyang 2022-02-23 20:57:59 +08:00 committed by GitHub
commit 40bfa1ae77
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -71,7 +71,7 @@ class FeatureExtractor(object):
model = build_model(
model_name,
num_classes=1,
pretrained=True,
pretrained=not (model_path and check_isfile(model_path)),
use_gpu=device.startswith('cuda')
)
model.eval()