-
Notifications
You must be signed in to change notification settings - Fork 249
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
Specify which dimension contains image channel in AnchorImage
#487
Comments
The easiest solution would be to introduce another argument with a default value, e.g. |
Annoyingly, it seems the latest release of |
It seems like the |
Tthere are cases e.g. sklearn mnist that do not even have a channel dimension. Basically the image is flattened for grayscale images to 2D: |
Yup, the standard response is to wrap the predictor so it's of the form that In this particular case it should be easy to support this internally (e.g. check This is actually the same type of issue as #516, attempting to push the complexity of wrapping non-compliant predictors internally as opposed to keeping it a responsibility of the user. |
Since |
I've thought a little about this and there are two main choices, both requiring an extra argument:
I think EDIT: it's also possible we stick with conventions like EDIT2: in the future supporting volumetric images may require even more conventions like EDIT3: including the batch dimension |
Mmmn a tricky one. I tend to agree that Maybe |
@ascillitoe I would avoid putting in extra functionality, especially something that would be a new custom format. We already have an |
Yeh that's fair enough. Even without a need for the added flexibility of |
PyTorch example for |
In
AnchorImage
the channel dimension is assumed to be the last dimension as defined here. This is not necessarily true, for example in mnist handwritten pytorch model the shape of the data is (1, 28*28).Note sure if this is applicable in other explainers as well? so the fix needs to be applied on all relevant explainers.
Lets have this as a configurable parameter at object init?
The text was updated successfully, but these errors were encountered: