Add actual dtype to RuntimeError("mat1 and mat2 must have the same dtype") #105243
Labels
actionable
better-engineering
Relatively self-contained tasks for better engineering contributors
module: nn
Related to torch.nn
馃殌 The feature, motivation and pitch
I was doing some testing and get the error message
RuntimeError("mat1 and mat2 must have the same dtype")
from a linear layer. The problem is fixed, but I would have found the issue faster, if the error message told me that one mat was float32 and the other float64. I.e.RuntimeError("mat1 and mat2 must have the same dtype, but got torch.float32 and torch.float64")
.Alternatives
No response
Additional context
No response
cc @albanD @mruberry @jbschlosser @walterddr @mikaylagawarecki
The text was updated successfully, but these errors were encountered: