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

Ablation Device Fix #528

Closed
wants to merge 1 commit into from
Closed

Conversation

vivekmig
Copy link
Contributor

Summary: Allows output to be on a different device than input by moving output difference to input device.

Differential Revision: D25001273

Summary: Allows output to be on a different device than input by moving output difference to input device.

Differential Revision: D25001273

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

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

Copy link
Contributor

@NarineK NarineK left a comment

Choose a reason for hiding this comment

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

LGTM!
It looks like there is a flake8 issue.

@@ -348,7 +348,7 @@ def attribute(
).reshape((-1, num_outputs) + (len(inputs[i].shape) - 1) * (1,))
if self.use_weights:
weights[i] += current_mask.float().sum(dim=0)
total_attrib[i] += (eval_diff * current_mask.to(attrib_type)).sum(
total_attrib[i] += (eval_diff.to(total_attrib[i].device) * current_mask.to(attrib_type)).sum(
Copy link
Contributor

Choose a reason for hiding this comment

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

looks like there is a flake8 issue.

@facebook-github-bot
Copy link
Contributor

This pull request has been merged in 50167ad.

vivekmig added a commit that referenced this pull request Jan 21, 2021
Summary:
Pull Request resolved: #528

Allows output to be on a different device than input by moving output difference to input device.

Reviewed By: miguelmartin75

Differential Revision: D25001273

fbshipit-source-id: a9b6d8e8bb585d5360c53272a5502f4e8f257459
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.

3 participants