I’m implementing a custom FocalLoss in SameDiff. In the original code they make use of the tf.where() operation, is there any similar operation in SameDiff?
The operation I’m looking for should behave like: condition(x[i]) ? y[i] : z[i].
The only thing I found was the SDBaseOps::replaceWhere. But this works as: condition(x[i]) ? y[i] : x[i]
There are different ways to implement such a “where” operation, but nevertheless it would be very handy to have it integrated in SameDiff.