Revision 1295ccb09626f89f20d0c0183d618f96b4833bf1 authored by Jean Kossaifi on 08 May 2018, 21:04:53 UTC, committed by Jean Kossaifi on 08 May 2018, 22:15:23 UTC
1 parent c729db7
Raw File
__init__.py
import sys
from .. import _BACKEND

sys.stderr.write('Using {} backend.\n'.format(_BACKEND))

if _BACKEND == 'mxnet':
    from .mxnet_backend import *
elif _BACKEND == 'numpy':
    from .numpy_backend import *
elif _BACKEND == 'pytorch':
    from .pytorch_backend import *
elif _BACKEND == 'tensorflow':
    from .tensorflow_backend import *
elif _BACKEND == 'cupy':
    from .cupy_backend import *
else:
    import warnings
    warnings.warn('_BACKEND should be either "mxnet", "pytorch" or "numpy", {} given.'.format(_BACKEND))
    warnings.warn('Using MXNet backend.')

back to top