diff --git a/flair/nn/model.py b/flair/nn/model.py index 2fa90714c..2e77d67d3 100644 --- a/flair/nn/model.py +++ b/flair/nn/model.py @@ -660,7 +660,7 @@ def multi_label_threshold(self): @multi_label_threshold.setter def multi_label_threshold(self, x): # setter method - if type(x) is dict: + if isinstance(x, dict): if "default" in x: self._multi_label_threshold = x else: