Skip to content

Commit 9e164e4

Browse files
committed
fix typing
1 parent 034e8f4 commit 9e164e4

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Diff for: machine-learning/app/models/facial_recognition/recognition.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ def __init__(self, model_name: str, min_score: float = 0.7, **model_kwargs: Any)
2626

2727
def _load(self) -> ModelSession:
2828
session = self._make_session(self.model_path)
29-
if self.batch and session.get_inputs()[0].shape[0] != "batch":
29+
if self.batch and isinstance((first_axis := session.get_inputs()[0].shape[0]), str) and first_axis != "batch":
3030
self._add_batch_axis(self.model_path)
3131
session = self._make_session(self.model_path)
3232
self.model = ArcFaceONNX(

0 commit comments

Comments
 (0)