Skip to content

Commit 4ddb72f

Browse files
authored
Merge pull request #631 from Trusted-AI/development_issue_630
Update check for Keras type in KerasClassifier
2 parents c9f3bde + e9eb221 commit 4ddb72f

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

art/estimators/classification/keras.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -126,9 +126,9 @@ def __init__(
126126
self._input_layer = input_layer
127127
self._output_layer = output_layer
128128

129-
if "<class 'tensorflow" in str(type(model)):
129+
if "<class 'tensorflow" in str(type(model).__mro__):
130130
self.is_tensorflow = True
131-
elif "<class 'keras" in str(type(model)):
131+
elif "<class 'keras" in str(type(model).__mro__):
132132
self.is_tensorflow = False
133133
else:
134134
raise TypeError("Type of model not recognized:" + str(type(model)))

0 commit comments

Comments
 (0)