def squeeze_excitation_layer(x, out_dim, ratio=4, concate=True):
    squeeze = GlobalAveragePooling2D()(x)
    excitation = Dense(units=(out_dim // ratio))(squeeze)
    excitation = Activation('relu')(excitation)
    excitation = Dense(units=out_dim)(excitation)
    excitation = Activation('sigmoid')(excitation)
    excitation = Reshape((1, 1, out_dim))(excitation)
    scale = multiply([x, excitation])
    if concate:
        scale = concatenate([scale, x], axis=3)
    return scale
def squeeze_excitation_layer(x, out_dim, ratio=4, concate=True):
    squeeze = GlobalAveragePooling2D()(x)
    excitation = Dense(units=(out_dim // ratio))(squeeze)
    excitation = Activation('relu')(excitation)
    excitation = Dense(units=out_dim)(excitation)
    excitation = Activation('sigmoid')(excitation)
    excitation = Reshape((1, 1, out_dim))(excitation)
    scale = multiply([x, excitation])
    if concate:
        scale = concatenate([scale, x], axis=3)
    return scale