Merge pull request #488 from helmutg/patch-1
FeatureExtractor: avoid loading weights twicepull/511/head
commit
40bfa1ae77
|
@ -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()
|
||||
|
|
Loading…
Reference in New Issue