You can not select more than 25 topics Topics must start with a chinese character,a letter or number, can include dashes ('-') and can be up to 35 characters long.

custom_testcase.py 382 B

5 years ago
123456789101112131415161718
  1. #!/usr/bin/env python
  2. # -*- coding: utf-8 -*-
  3. import unittest
  4. from contextlib import contextmanager
  5. __all__ = [
  6. 'CustomTestCase',
  7. ]
  8. class CustomTestCase(unittest.TestCase):
  9. @contextmanager
  10. def assertNotRaises(self, exc_type):
  11. try:
  12. yield None
  13. except exc_type:
  14. raise self.failureException('{} raised'.format(exc_type.__name__))

TensorLayer3.0 是一款兼容多种深度学习框架为计算后端的深度学习库。计划兼容TensorFlow, Pytorch, MindSpore, Paddle.