source: internals/2016/aptoideimagesdetector/trunk/explicit_content_detector/API/Explicit_detector/i2v/__init__.py @ 16448

Last change on this file since 16448 was 16448, checked in by dferreira, 3 years ago

File organization totally changed

  • Property svn:executable set to *
File size: 734 bytes
Line 
1try:
2        from Illustration2Vector.illustration2vec_master.i2v.base import Illustration2VecBase
3except:
4        from i2v.base import Illustration2VecBase
5
6caffe_available = False
7chainer_available = False
8
9try:
10    from Illustration2Vector.illustration2vec_master.i2v.caffe_i2v import CaffeI2V, make_i2v_with_caffe
11    caffe_available = True
12except ImportError:
13    pass
14
15try:
16    from Illustration2Vector.illustration2vec_master.i2v.chainer_i2v import ChainerI2V, make_i2v_with_chainer
17    chainer_available = True
18except ImportError:
19    from i2v.chainer_i2v import ChainerI2V, make_i2v_with_chainer
20    chainer_available = True
21
22if not any([caffe_available, chainer_available]):
23    raise ImportError('i2v requires caffe or chainer package')
Note: See TracBrowser for help on using the repository browser.