--- title: Model explainability keywords: fastai sidebar: home_sidebar summary: "Functionality to help with both global and local explainability." description: "Functionality to help with both global and local explainability." nb_path: "nbs/100c_models.explainability.ipynb" ---
{% raw %}
{% endraw %} {% raw %}
{% endraw %} {% raw %}

get_acts_and_grads[source]

get_acts_and_grads(model, modules, x, y=None, detach=True, cpu=False)

Returns activations and gradients for given modules in a model and a single input or a batch. Gradients require y value(s). If they rae not provided, it will use the predicttions.

{% endraw %} {% raw %}

get_attribution_map[source]

get_attribution_map(model, modules, x, y=None, detach=True, cpu=False, apply_relu=True)

{% endraw %} {% raw %}
{% endraw %}