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

Remove shortform of averaging in average tool #1509

Merged
merged 1 commit into from
Mar 22, 2024
Merged

Conversation

Atticus1806
Copy link
Collaborator

I encountered this weird issue that this line would crash with RuntimeError: result type Float can't be cast to the desired output type Long when out_model_state[k] was of type int64.
Can be reproduced like:

import torch
x = torch.Tensor([1]).to(torch.int64)
x /= 1
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
RuntimeError: result type Float can't be cast to the desired output type Long

Not doing the short form but instead x = x / 1 works.

@Atticus1806 Atticus1806 requested review from albertz and a team as code owners March 21, 2024 22:07
@albertz albertz merged commit 85ce153 into master Mar 22, 2024
54 checks passed
JackTemaki pushed a commit to JackTemaki/MiniReturnn that referenced this pull request Mar 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants