torch.sym_not
function sym_not(x: boolean): booleanCreates the logical negation of a symbolic boolean value.
Used in symbolic execution and export for representing conditional logic that may not be evaluated until runtime.
Symbolic tensors are not implemented in torch.js. This function simply returns the logical negation of the input. Use standard JavaScript boolean logic instead.
Parameters
xboolean- The boolean value to negate
Returns
boolean– The logical NOT of the input (!x)Examples
// Negate a symbolic boolean
const result = torch.sym_not(true);
// Returns: false
const result2 = torch.sym_not(false);
// Returns: trueSee Also
- PyTorch torch.sym_not()
- sym_float - Create symbolic floats
- sym_int - Create symbolic integers