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 attribute_to_layer_input both for layer activations and layer attribution #864

Closed
wants to merge 1 commit into from

Conversation

NarineK
Copy link
Contributor

@NarineK NarineK commented Feb 14, 2022

Summary:
Currently, we cannot specify attribute_to_layer_input to LayerActivation. Since this flag has to be consistent both for attribution and layer activation, we can pass it through the constructor and use the same value for both layer activation and attribution.

Removed unnecessary docs, e.g.: (a, b) (2 dimensions) There is no need for (2 dimensions). It is already clear that it has 2 dimensions.

Also, simplified the computations based on the magnitude. The original one had an issue that if we had only one example and that example had positive TCAV score the magnitude was always 1.0 and that wasn't very useful.

Differential Revision: D33908812

…attribution

Summary:
Currently, we cannot specify `attribute_to_layer_input` to LayerActivation. Since this flag has to be consistent both for attribution and layer activation, we can pass it through the constructor and use the same value for both layer activation and attribution.

Removed unnecessary docs, e.g.: (a, b) (2 dimensions) There is no need for (2 dimensions). It is already clear that it has 2 dimensions.

Also, simplified the computations based on the magnitude. The original one had an issue that if we had only one example and that example had positive TCAV score the magnitude was always 1.0  and that wasn't very useful.

Differential Revision: D33908812

fbshipit-source-id: 1876e531f9bfa8e701bc678be2124703582fb3f4
@facebook-github-bot
Copy link
Contributor

This pull request was exported from Phabricator. Differential Revision: D33908812

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

Successfully merging this pull request may close these issues.

2 participants