Add unit tests for super-linear

This commit is contained in:
D-X-Y
2021-03-18 20:44:22 +08:00
parent badb6cf51d
commit ca22d61259
7 changed files with 57 additions and 17 deletions

View File

@@ -14,7 +14,7 @@ if str(lib_dir) not in sys.path:
from spaces import Categorical
from spaces import Continuous
from spaces import Integer
from spaces import Integer
from spaces import is_determined
from spaces import get_min
from spaces import get_max
@@ -92,3 +92,7 @@ class TestBasicSpace(unittest.TestCase):
print(nested_space)
for i in range(1, 13):
self.assertTrue(nested_space.has(i))
# Test Simple Op
self.assertTrue(is_determined(1))
self.assertFalse(is_determined(nested_space))

View File

@@ -26,3 +26,5 @@ class TestSuperLinear(unittest.TestCase):
bias = spaces.Categorical(True, False)
model = super_core.SuperLinear(10, out_features, bias=bias)
print(model)
print(model.super_run_type)
print(model.abstract_search_space())