def _is_suitable_activation_layer(model, layer):
    """
    Check whether the layer ``layer`` matches what is required 
    by ``model`` to do Grad-CAM on ``layer``.
    Returns a boolean.

    Matching Criteria:
        * Rank of the layer's output tensor.
    """
    rank = len(layer.output_shape)
    required_rank = len(model.input_shape)
    return rank == required_rank
