[New-bugs-announce] [issue47112] RuntimeError: expected scalar type Long but found Int

Ramsey Thomson report at bugs.python.org
Thu Mar 24 13:06:04 EDT 2022


New submission from Ramsey Thomson <ramsey.thomson at gmail.com>:

Line 2846 of ~\anaconda3\lib\site-packages\torch\nn\functional.py in cross_entropy(input, target, weight, size_average, ignore_index, reduce, reduction, label_smoothing) results in > RuntimeError: expected scalar type Long but found Int
The above is called from line 1150 of ~\anaconda3\lib\site-packages\torch\nn\modules\loss.py in forward(self, input, target) which in turn is called from line 1102 of ~\anaconda3\lib\site-packages\torch\nn\modules\module.py in _call_impl(self, *input, **kwargs)

----------
components: Library (Lib)
messages: 415961
nosy: Ramsey
priority: normal
severity: normal
status: open
title: RuntimeError: expected scalar type Long but found Int
type: compile error
versions: Python 3.9

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue47112>
_______________________________________


More information about the New-bugs-announce mailing list