Open
Description
Right now canonicalizing
at Tangent{T}
inserts ZeroTangent
for all fields of the T
that don't have explict tangents recorded.
As does getproperty
.
This is correct in that they don't have anything recorded as they don't get used to determine the output -- which is what ZeroTangent
represents.
But it is also true for if the primal field is Char
or Bool
or Int
or Symbol
etc that they don't have a tangent space at all so NoTangent
is also correct, and kinda more expected.
We can't always get it right just from the primal type, since it could be a indicator float etc.
But we can probably do pretty well