Skip to content
This repository has been archived by the owner on Oct 31, 2023. It is now read-only.

fix Expected isFloatingType error for pytorch version 1.2+ #72

Merged
merged 1 commit into from
Feb 7, 2020

Conversation

s9xie
Copy link
Contributor

@s9xie s9xie commented Feb 7, 2020

Currently the code will crash for new pytorch versions with the following error:

RuntimeError: Expected isFloatingType(grads[i].type().scalarType()) to be true, but got false. (Could this error message be improved? If so, please report an enhancement request to PyTorch.)

The pull request resolves the problem.

Reference:
https://discuss.pytorch.org/t/custom-autograd-function-with-int-tensor-input/65907

@facebook-github-bot facebook-github-bot added the CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. label Feb 7, 2020
@charlesq34 charlesq34 merged commit c330998 into facebookresearch:master Feb 7, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants