returnn.frontend.assert_¶
Assertion utility functions for validating conditions in Python code.
- returnn.frontend.assert_.assert_(condition: Tensor | bool, message: str, *, stop: bool = True) None[source]¶
Asserts that a given condition is True. If the condition is False, raises an AssertionError with the provided message. This runs async on GPU.
- Parameters:
condition
message
stop – if True, raises an AssertionError on failure; if False, only logs a warning
- Returns:
nothing