Open mhauru opened 2 weeks ago
@ExpandingMan would you be interested in taking a stab at this?
There's a complicated but efficient solution in which onehot
is smart enough only to take the independent basis elements. The real difficulty I see with that is that the output side of gradient
would have to know about it to combine the results, which can potentially significantly increase its complexity.
Types like
Hermitian
andSymmetric
break the assumption made inonehot
that all elements of the array are independent variables that can besetindex!
ed freely. Not sure if there's some general solution to this, but maybe catering for stdlib types would be enough?