<filename>focal_loss/backend.py
#!/usr/bin/env python
# -*- encoding: utf-8 -*-
'''
@File    :   backend.py
@Time    :   2020/06/24 09:21:29
@Author  :   <NAME> 
@Version :   1.0
@Contact :   <EMAIL>
@License :    
@Desc    :   None
'''
import os
import sys
from distutils.util import strtobool

is_tf_keras = strtobool(os.environ.get('TF_KERAS', '1'))
if is_tf_keras:
    import tensorflow.keras as keras
    import tensorflow.keras.backend as K
    sys.modules['keras'] = keras
else:
    import keras
    import keras.backend as K
