You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
RecursionError Traceback (most recent call last)
<ipython-input-23-e5163801e214> in <module>
----> 1 adv_image_2=attack_2.generate(image)~\Anaconda3\lib\site-packages\art\attacks\fast_gradient.py in generate(self, x, **kwargs)
143 # Use model predictions as correct outputs
144 logger.info('Using model predictions as correct labels for FGM.')
--> 145 y = get_labels_np_array(self.classifier.predict(x))
146 else:
147 y = params_cpy.pop(str('y'))~\Anaconda3\lib\site-packages\art\wrappers\query_efficient_bb.py in _wrap_predict(self, x, logits, batch_size)
117 :rtype: `np.ndarray`
118 """
--> 119 return self._predict(clip_and_round(x, self.clip_values, self.round_samples), logits, batch_size)... last 1 frames repeated, from the frame below ...~\Anaconda3\lib\site-packages\art\wrappers\query_efficient_bb.py in _wrap_predict(self, x, logits, batch_size)
117 :rtype: `np.ndarray`
118 """
--> 119 return self._predict(clip_and_round(x, self.clip_values, self.round_samples), logits, batch_size)RecursionError: maximum recursion depth exceeded while calling a Python object
This is because wrappers have side effects. Here both wrappers replace the predict function of the same original classifier. Quick fix is to use two separate instances of classifiers, one per wrapper, but long term a better solution could be designed.
The text was updated successfully, but these errors were encountered:
imolloy
pushed a commit
to imolloy/adversarial-robustness-toolbox
that referenced
this issue
Aug 5, 2019
The following code yields an error when the second attack is called:
Infinite loop error:
This is because wrappers have side effects. Here both wrappers replace the
predict
function of the same original classifier. Quick fix is to use two separate instances of classifiers, one per wrapper, but long term a better solution could be designed.The text was updated successfully, but these errors were encountered: