Skip to content

Commit e9eb221

Browse files
author
Beat Buesser
committed
Update check for Keras type
Signed-off-by: Beat Buesser <[email protected]>
1 parent c9f3bde commit e9eb221

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)