@@ -53,7 +58,10 @@ class TestSANAS(unittest.TestCase):
conv_list,ch_pro=compute_op_num(program)
### 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
ch_token=[]
...
...
@@ -64,7 +72,10 @@ class TestSANAS(unittest.TestCase):
ch_token.append(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):
### unittest for next_archs
...
...
@@ -73,7 +84,8 @@ class TestSANAS(unittest.TestCase):