mirror of
https://github.com/serengil/deepface.git
synced 2025-06-07 12:05:22 +00:00
patch: fix dimension
This commit is contained in:
parent
910d6e1d80
commit
72b6db19d6
@ -40,7 +40,6 @@ class Demography(ABC):
|
|||||||
assert img_batch.ndim == 4, "expected 4-dimensional tensor input"
|
assert img_batch.ndim == 4, "expected 4-dimensional tensor input"
|
||||||
|
|
||||||
if img_batch.shape[0] == 1: # Single image
|
if img_batch.shape[0] == 1: # Single image
|
||||||
img_batch = img_batch.squeeze(0) # Remove batch dimension
|
|
||||||
# Predict with legacy method.
|
# Predict with legacy method.
|
||||||
return self.model(img_batch, training=False).numpy()[0, :]
|
return self.model(img_batch, training=False).numpy()[0, :]
|
||||||
else:
|
else:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user