Unable to use in TF2
Dear sir, When I call 'adversary.run_standard_evaluation', it shows 'ModelAdapter' object is not callable
Hi,
it's a bit hard to say with little context, but I guess it might be because the flag is_tf_model=True is not set (see here).
I can confirm this behavior. In each of the attacks, model(x) is called. I believe this should be model.predict(x) instead.
Hi,
could you please point to the exact points where this happens? I think there should always be an if statement to distinguish whether the model is a TF one and then call model.predict.
It happens in checks.py:
def check_dynamic(model, x, is_tf_model=False, logger=None):
if is_tf_model:
msg = 'the check for dynamic defenses is not currently supported'
else:
msg = None
sys.settrace(tracefunc)
model(x)
sys.settrace(None)
#for k, v in funcs.items():
# print(k, v)
if any([c > 0 for c in funcs.values()]):
msg = 'it seems to be a dynamic defense! The evaluation' + \
' with AutoAttack might be insufficient.' + \
f' See {checks_doc_path} for details.'
if not msg is None:
if logger is None:
warnings.warn(Warning(msg))
else:
logger.log(f'Warning: {msg}')
#sys.settrace(None)
Sorry for the late reply. This https://github.com/fra31/auto-attack/pull/92 should fix it.