Utilities¶
Network loading, format conversion, verification helpers, and diagnostic functions.
Network Loading & Conversion¶
Function |
Description |
|---|---|
|
Convert MATLAB SeriesNetwork, DAGNetwork, dlnetwork, or LayerGraph to NNV NN object |
|
Import ONNX network directly to NNV format |
|
Load network from .mat file |
Specification & Verification¶
Function |
Description |
|---|---|
|
Parse VNNLIB file. Returns input bounds and output HalfSpace properties. |
|
Check if reachable set satisfies property. Returns: 0=property failed (unsafe), 1=property satisfied (safe), 2=unknown. |
|
Export specification to VNNLIB format. |
LP Solving¶
[fval, exitflag] = lpsolver(f, A, b, Aeq, beq, lb, ub, solver, opts)
Unified LP interface supporting 'linprog', 'glpk', and 'gurobi'.
Handles automatic fallback between solvers.
Diagnostics & Info¶
Function |
Description |
|---|---|
|
Diagnostic tool: checks MATLAB version, toolboxes, submodules, Python env |
|
Returns version string (e.g., |
|
Returns NNV installation root path |
|
Returns path to Python executable for conformal prediction |
Weight Perturbation (WPutils)¶
WPutils is a static class. All methods are called as WPutils.method_name(...).
Method |
Description |
|---|---|
|
Get the weight range (max - min) for a layer |
|
Display layer information for all layers |
|
Sample networks with randomly perturbed weights |
Weight perturbations are specified per-layer via the weightPerturb property
on FullyConnectedLayer and Conv2DLayer. Each row of weightPerturb is
[linear_index, lower_bound, upper_bound].
Probabilistic Verification¶
Function |
Description |
|---|---|
|
Conformal prediction robustness verification |
|
Compute required sample sizes for CP verification |
|
Main probabilistic reachability driver |