Is it possible to throw a run-time error based on the value of a tensor?
The use case we’re encountering for the WL net framework would be if a tensor is being used to index into another using gather_nd (which is being used to implement a higher-level layer). To prevent a crash, we wish to detect out-of-bounds indices and halt the net evaluation, warning the user by raising a RuntimeError. I don’t see a way of doing this conditionally based on the value of the tensor, currently. Am I missing something? This seems a useful general mechanism to have.