mirror of
https://github.com/serengil/deepface.git
synced 2025-06-07 12:05:22 +00:00
Merge pull request #857 from Villyli/master
change model.predict() to model(), notably improve memory leak (issue #697)
This commit is contained in:
commit
68eaafc614
@ -696,7 +696,7 @@ def represent(
|
||||
# represent
|
||||
if "keras" in str(type(model)):
|
||||
# new tf versions show progress bar and it is annoying
|
||||
embedding = model.predict(img, verbose=0)[0].tolist()
|
||||
embedding = model(img, training=False).numpy()[0].tolist()
|
||||
else:
|
||||
# SFace and Dlib are not keras models and no verbose arguments
|
||||
embedding = model.predict(img)[0].tolist()
|
||||
|
Loading…
x
Reference in New Issue
Block a user