Skip to content

Commit

Permalink
patch: fix dimension
Browse files Browse the repository at this point in the history
  • Loading branch information
h-alice committed Jan 13, 2025
1 parent 910d6e1 commit 72b6db1
Showing 1 changed file with 0 additions and 1 deletion.
1 change: 0 additions & 1 deletion deepface/models/Demography.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,6 @@ def _predict_internal(self, img_batch: np.ndarray) -> np.ndarray:
assert img_batch.ndim == 4, "expected 4-dimensional tensor input"

if img_batch.shape[0] == 1: # Single image
img_batch = img_batch.squeeze(0) # Remove batch dimension
# Predict with legacy method.
return self.model(img_batch, training=False).numpy()[0, :]
else:
Expand Down

0 comments on commit 72b6db1

Please sign in to comment.