From f8a4485af04fb9a0f449c8bfcf3573cf69103cb2 Mon Sep 17 00:00:00 2001 From: gaotingquan Date: Wed, 16 Nov 2022 09:13:23 +0000 Subject: [PATCH] debug: should not use == to check None obj --- paddleclas.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/paddleclas.py b/paddleclas.py index 7df12862..d7db1790 100644 --- a/paddleclas.py +++ b/paddleclas.py @@ -751,7 +751,7 @@ class PaddleClas(object): prediction result(s) is zipped as a dict, that includs topk "class_ids", "scores" and "label_names". The format of batch prediction result(s) is as follow: [{"class_ids": [...], "scores": [...], "label_names": [...]}, ...] """ - if input_data == None and self._config.Global.infer_imgs: + if input_data is None and self._config.Global.infer_imgs: input_data = self._config.Global.infer_imgs if isinstance(input_data, np.ndarray): -- GitLab