pub struct IAssertionLayer { /* private fields */ }Expand description
IAssertionLayer
An assertion layer in a network
The layer has a single input and no output. The input must be a boolean shape tensor. If any element of the input is provably false at build time, the network is rejected. If any element of the input is false at runtime for the supplied runtime dimensions, an error occurs, much the same as if any other runtime error (e.g. using IShuffleLayer to change the volume of a tensor) is handled.
Asserting equality of input dimensions may help the optimizer.
Do not inherit from this class, as doing so will break forward-compatibility of the API and ABI.
Implementations§
Source§impl IAssertionLayer
impl IAssertionLayer
Sourcepub unsafe fn setMessage(
self: Pin<&mut IAssertionLayer>,
message: *const c_char,
)
pub unsafe fn setMessage( self: Pin<&mut IAssertionLayer>, message: *const c_char, )
Set the message to print if the assertion fails.
The name is used in error diagnostics. This method copies the message string.
See [getMessage()]
Sourcepub fn getMessage(self: &IAssertionLayer) -> *const c_char
pub fn getMessage(self: &IAssertionLayer) -> *const c_char
Return the assertion message.
See [setMessage()]