pub fn enforce_load_contract(
apr_name: &str,
apr_shape: &[usize],
vocab_size: usize,
hidden_dim: usize,
) -> Result<(), ContractError>Expand description
MANDATORY: Validate tensor shape during APR model load.
This function MUST be called when loading tensors from APR format. It validates that the shape matches the contract expectation.
ยงErrors
Returns Err if the shape violates the contract. Callers MUST
propagate this error - do not ignore it.