def activation_supported_check(model):
    """Checks if all activation functions in the model are supported

    Args:
       model (keras Model): model to check

    Returns:
        valid (bool): 'True' if all activations are supported, 'False' otherwise
        log (str): log of unsupported activation functions
    """

    supported_activations = ['linear', 'relu', 'softmax', 'softplus',
                             'softsign', 'relu', 'tanh', 'sigmoid',
                             'hard_sigmoid', 'exponential']

    def check_layer(layer):
        valid = True
        log = ''
        if hasattr(layer, 'layer'):
            flag, templog = check_layer(layer.layer)
            valid = valid and flag
            log += templog
        activation = layer.get_config().get('activation')
        recurrent_activation = layer.get_config().get('recurrent_activation')
        if activation not in supported_activations and activation is not None:
            valid = False
            log += "activation type '" + layer.get_config()['activation'] + \
                   "' for layer '" + layer.name + \
                   "' is not supported at this time. \n"
        if recurrent_activation not in supported_activations and \
           recurrent_activation is not None:
            valid = False
            log += "recurrent activation type '" + \
                   layer.get_config()['recurrent_activation'] + \
                   "' for layer '" + layer.name + \
                   "' is not supported at this time. \n"
        return valid, log

    valid = True
    log = ''
    for layer in model.layers:
        flag, templog = check_layer(layer)
        valid = valid and flag
        log += templog
    return valid, log