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

Enable batches with variable length/size inputs #464

Closed
davidslater opened this issue Jun 11, 2020 · 1 comment
Closed

Enable batches with variable length/size inputs #464

davidslater opened this issue Jun 11, 2020 · 1 comment
Labels
enhancement New feature or request

Comments

@davidslater
Copy link
Collaborator

Is your feature request related to a problem? Please describe.
If the input into the PyTorch classifier wrapper has variable length samples (e.g., the batch is a 1D numpy object array, where the samples (objects) of np arrays of different length/size).

Places that currently throw errors:
https://github.com/IBM/adversarial-robustness-toolbox/blob/master/art/classifiers/pytorch.py#L147
https://github.com/IBM/adversarial-robustness-toolbox/blob/master/art/classifiers/pytorch.py#L193-L194
(I think it also throws errors in gradient calculations as well - basically anywhere torch.from_numpy shows up.)

I have not tested it on Keras or TensorFlow, but I am guessing that they may have similar issues.

Describe the solution you'd like
Enable input samples to classifier/estimator wrappers to be of variable size (variable length for audio, variable sizes for images, variables frames and sizes for video); this would also need to extend into the calculation of loss and class gradients for use in attacks.

@davidslater
Copy link
Collaborator Author

Possibly related to #458

@beat-buesser beat-buesser added the enhancement New feature or request label Jun 13, 2020
@beat-buesser beat-buesser modified the milestones: ART v1.3.0, ART v1.4.0 Jun 13, 2020
@beat-buesser beat-buesser removed this from the ART v1.4.0 milestone Sep 16, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants