Hide keyboard shortcuts

Hot-keys on this page

r m x p   toggle line displays

j k   next/prev highlighted chunk

0   (zero) top of page

1   (one) first highlighted chunk

1#!/usr/bin/env python 

2# -*- coding: utf-8 -*- 

3 

4import unittest 

5 

6from ..models.driu import driu 

7from ..models.driu_od import driu_od 

8from ..models.hed import hed 

9from ..models.resunet import resunet50 

10from ..models.unet import unet 

11from ..utils.summary import summary 

12 

13 

14class Tester(unittest.TestCase): 

15 """ 

16 Unit test for model architectures 

17 """ 

18 

19 def test_summary_driu(self): 

20 model = driu() 

21 s, param = summary(model) 

22 self.assertIsInstance(s, str) 

23 self.assertIsInstance(param, int) 

24 

25 def test_summary_driuod(self): 

26 model = driu_od() 

27 s, param = summary(model) 

28 self.assertIsInstance(s, str) 

29 self.assertIsInstance(param, int) 

30 

31 def test_summary_hed(self): 

32 model = hed() 

33 s, param = summary(model) 

34 self.assertIsInstance(s, str) 

35 self.assertIsInstance(param, int) 

36 

37 def test_summary_unet(self): 

38 model = unet() 

39 s, param = summary(model) 

40 self.assertIsInstance(s, str) 

41 self.assertIsInstance(param, int) 

42 

43 def test_summary_resunet(self): 

44 model = resunet50() 

45 s, param = summary(model) 

46 self.assertIsInstance(s, str) 

47 self.assertIsInstance(param, int)