import os
import sys
import six
import glob
import numpy as np

sys.path.append('./backbones')
from backbones import *
from decoders import *

from keras.regularizers import l2
from keras.layers import GlobalAveragePooling3D,GlobalMaxPooling3D
from keras.layers.advanced_activations import LeakyReLU

def get_block(identifier):
    if isinstance(identifier,six.string_types):
        res = globals().get(identifier)
        if not res:
            raise ValueError('Invalid {}'.format(identifier))
        return res
    return identifier