Closed antalszava closed 2 years ago
Adding info about the bug:
It only happens with big number of ndata
. For example, there is no bug when ndata=10
instead of 100. The value of ndata
which starts triggering the bug also depends on the random seed. When the seed is 42, the bug happens when ndata
is bigger than 14 on my machine.
Thanks @yitchen-tim for the details! Although I find it very odd that it is dependent on the size of the features 🤔
@antalszava is it like the case that there are more float64
assumptions hardcoded in somewhere?
Expected behavior
No error arising related to
dtype
mismatch when setting customdtype
s on the device and using TF.Actual behavior
The following error is raised with a QNode that takes floats as input and a TF loss:
Additional information
There might be a conversion happening in the backward pass (potentially in the custom gradient implementation). When omitting the use of
SparseCategoricalCrossentropy
, the gradient can be obtained without an issue.Source code
Tracebacks
No response
System information
Existing GitHub issues