Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Export carla obj det adversarial patches #1996

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

lumurillo
Copy link

Extending the CARLA related scenarios to enable the export of the generated perturbations.

@swsuggs
Copy link
Contributor

swsuggs commented Oct 19, 2023

Hi Luis, thanks for the contribution. Would you mind rebasing the PR to the develop branch?

# Ensure that input sample isn't overwritten by model
self.hub.set_context(stage="adversarial")
x_adv.flags.writeable = False
y_pred_adv = self.model.predict(x_adv, **self.predict_kwargs)

self.probe.update(x_adv=x_adv, y_pred_adv=y_pred_adv)
if hasattr(self.attack, "perturbations"):
self.probe.update(perturbation=perturbations)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The prior conditional could be combined with this one. For example:

if hasattr(self.attack, "perturbations"):
    self.probe.update(perturbation=self.attack.perturbations)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants