ncet 0.1.0__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- ncet/__init__.py +26 -0
- ncet/backend/__init__.py +21 -0
- ncet/backend/cvxpy.py +738 -0
- ncet/builder.py +107 -0
- ncet/errors.py +21 -0
- ncet/frontend/__init__.py +21 -0
- ncet/frontend/fx.py +162 -0
- ncet/frontend/normalize.py +886 -0
- ncet/ir/__init__.py +16 -0
- ncet/ir/capability.py +34 -0
- ncet/ir/graph.py +59 -0
- ncet/ir/indexing.py +22 -0
- ncet/ir/validate.py +76 -0
- ncet/passes/__init__.py +5 -0
- ncet/passes/bounds_ibp.py +319 -0
- ncet-0.1.0.dist-info/METADATA +164 -0
- ncet-0.1.0.dist-info/RECORD +20 -0
- ncet-0.1.0.dist-info/WHEEL +5 -0
- ncet-0.1.0.dist-info/licenses/LICENSE +201 -0
- ncet-0.1.0.dist-info/top_level.txt +1 -0
ncet/__init__.py
ADDED
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
"""Neural-network Constraint Embedding Toolkit."""
|
|
2
|
+
|
|
3
|
+
from .errors import (
|
|
4
|
+
ExactnessContractError,
|
|
5
|
+
GraphCaptureError,
|
|
6
|
+
InvalidBoundsError,
|
|
7
|
+
NCETError,
|
|
8
|
+
UnsupportedOperatorError,
|
|
9
|
+
)
|
|
10
|
+
from .backend import MILPEncoding
|
|
11
|
+
from .builder import form_milp
|
|
12
|
+
from .passes import Bounds
|
|
13
|
+
|
|
14
|
+
__version__ = "0.1.0"
|
|
15
|
+
|
|
16
|
+
__all__ = [
|
|
17
|
+
"ExactnessContractError",
|
|
18
|
+
"Bounds",
|
|
19
|
+
"GraphCaptureError",
|
|
20
|
+
"InvalidBoundsError",
|
|
21
|
+
"MILPEncoding",
|
|
22
|
+
"NCETError",
|
|
23
|
+
"UnsupportedOperatorError",
|
|
24
|
+
"form_milp",
|
|
25
|
+
"__version__",
|
|
26
|
+
]
|
ncet/backend/__init__.py
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
"""Optimization backends for canonical NCET graphs."""
|
|
2
|
+
|
|
3
|
+
from .cvxpy import (
|
|
4
|
+
EncodedTensor,
|
|
5
|
+
EncodingOptions,
|
|
6
|
+
EncodingStats,
|
|
7
|
+
MaxPoolBinaries,
|
|
8
|
+
MILPEncoding,
|
|
9
|
+
ReLUBinaries,
|
|
10
|
+
encode_cvxpy,
|
|
11
|
+
)
|
|
12
|
+
|
|
13
|
+
__all__ = [
|
|
14
|
+
"EncodedTensor",
|
|
15
|
+
"EncodingOptions",
|
|
16
|
+
"EncodingStats",
|
|
17
|
+
"MaxPoolBinaries",
|
|
18
|
+
"MILPEncoding",
|
|
19
|
+
"ReLUBinaries",
|
|
20
|
+
"encode_cvxpy",
|
|
21
|
+
]
|