def test_residual_block11(self): rb1 = ResBlock(strides=1) self.assertTrue(len(rb1.strides) == 2) rb2 = ResBlock(strides=(1, 1)) self.assertTrue(len(rb2.strides) == 2) rb3 = ResBlock(strides=(1)) self.assertTrue(len(rb3.strides) == 2)
def test_residual_block5(self): try: ResBlock(kernel_sizes=(3, 3, 3), n_filters=(16, 16)) except DLPyError: pass except Exception as e: self.fail('Unexpected exception raised:', e) else: self.fail('ExpectedException not raised')
def test_residual_block1(self): list1 = ResBlock().compile(src_layer=InputLayer(name='data'), block_num=1) self.assertTrue(self.sample_syntax['resblock1'] == list1)