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

Adding test for output that is a tensor of integers. Updating passthrough layer. #1526

Closed
wants to merge 2 commits into from

Conversation

styusuf
Copy link
Contributor

@styusuf styusuf commented Mar 11, 2025

Summary: We are adding tests for different types of unsupported and non-differentiable layer output. Here, we add a test for layer output that is a tensor of integers.

Differential Revision: D70919347

@facebook-github-bot
Copy link
Contributor

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

…h#1521)

Summary:
Pull Request resolved: pytorch#1521

This is to make sure that we control for when the output is not a 2D tensor

We also include an output accessor that parses a dictionary model output to get final output.

Differential Revision: D69876980
styusuf added a commit to styusuf/captum that referenced this pull request Mar 17, 2025
…ough layer. (pytorch#1526)

Summary:

We are adding tests for different types of unsupported and non-differentiable layer output. Here, we add a test for layer output that is a tensor of integers.

We split by the cases for unsupported layers from the case when the layer output is used by some tasks and not others.

When layer output is not supported (layer output is a List of Tensors or a Tensor of integers), we don't get attributions and return None for those layers.

In the case when a layer output is not used by a task, we should output a tensor of zeros for that task.

Differential Revision: D70919347
…ough layer. (pytorch#1526)

Summary:
Pull Request resolved: pytorch#1526

We are adding tests for different types of unsupported and non-differentiable layer output. Here, we add a test for layer output that is a tensor of integers.

We split by the cases for unsupported layers from the case when the layer output is used by some tasks and not others.

When layer output is not supported (layer output is a List of Tensors or a Tensor of integers), we don't get attributions and return None for those layers.

In the case when a layer output is not used by a task, we should output a tensor of zeros for that task.

Differential Revision: D70919347
@facebook-github-bot
Copy link
Contributor

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

@facebook-github-bot
Copy link
Contributor

This pull request has been merged in b899732.

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