@@ -53,7 +56,10 @@ class TestSANAS(unittest.TestCase):
...
@@ -53,7 +56,10 @@ class TestSANAS(unittest.TestCase):
conv_list,ch_pro=compute_op_num(program)
conv_list,ch_pro=compute_op_num(program)
### assert conv number
### assert conv number
self.assertTrue((repeat_num*3)==len(conv_list),"the number of conv is NOT match, the number compute from token: {}, actual conv number: {}".format(repeat_num*3,len(conv_list)))
self.assertTrue((repeat_num*3)==len(
conv_list
),"the number of conv is NOT match, the number compute from token: {}, actual conv number: {}".
format(repeat_num*3,len(conv_list)))
### assert number of channels
### assert number of channels
ch_token=[]
ch_token=[]
...
@@ -64,7 +70,10 @@ class TestSANAS(unittest.TestCase):
...
@@ -64,7 +70,10 @@ class TestSANAS(unittest.TestCase):
ch_token.append(filter_num)
ch_token.append(filter_num)
init_ch_num=filter_num
init_ch_num=filter_num
self.assertTrue(str(ch_token)==str(ch_pro),"channel num is WRONG, channel num from token is {}, channel num come fom program is {}".format(str(ch_token),str(ch_pro)))
self.assertTrue(
str(ch_token)==str(ch_pro),
"channel num is WRONG, channel num from token is {}, channel num come fom program is {}".
format(str(ch_token),str(ch_pro)))
deftest_all_function(self):
deftest_all_function(self):
### unittest for next_archs
### unittest for next_archs
...
@@ -73,7 +82,8 @@ class TestSANAS(unittest.TestCase):
...
@@ -73,7 +82,8 @@ class TestSANAS(unittest.TestCase):