To ensure compatibility, use the latest TensorFlow (2.x) version. Since eager execution is the default in newer versions, use TensorFlowV2Classifier
instead of KerasClassifier
with the Adversarial Robustness Toolbox (ART
), as it's designed for TensorFlow 2.x's execution model. Please refer to this gist for your reference.