Skip to content

Commit

Permalink
Minor improvements to documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
adrhill committed Jan 26, 2024
1 parent 27b14c9 commit 4a708a2
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 21 deletions.
10 changes: 3 additions & 7 deletions docs/src/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,9 @@ and [Concept Relevance Propagation](https://www.nature.com/articles/s42256-023-0
for use with [Flux.jl](https://fluxml.ai) models.

!!! note
This package is part the [Julia-XAI ecosystem](https://github.com/Julia-XAI) and compatible with
[ExplainableAI.jl](https://github.com/Julia-XAI/ExplainableAI.jl).

For an introduction to the Julia-XAI ecosystem, refer to the
[*Getting started* guide from ExplainableAI.jl](https://julia-xai.github.io/ExplainableAI.jl/stable/generated/example/).


This package is part the [Julia-XAI ecosystem](https://github.com/Julia-XAI).
For an introduction to the ecosystem, please refer to the
[*Getting started* guide](https://julia-xai.github.io/XAIDocs/).

## Installation
To install this package and its dependencies, open the Julia REPL and run
Expand Down
30 changes: 16 additions & 14 deletions docs/src/literate/basics.jl
Original file line number Diff line number Diff line change
@@ -1,19 +1,9 @@
# # [Basic usage of LRP](@id docs-lrp-basics)
#md # !!! note "Getting started"
#md # This package is part the [Julia-XAI ecosystem](https://github.com/Julia-XAI)
#md # and builds on the basics shown in the
#md # [*Getting started* guide from ExplainableAI.jl](https://julia-xai.github.io/ExplainableAI.jl/stable/generated/example/).

#md # !!! note "TLDR"
#md #
#md # 1. Use [`strip_softmax`](@ref) to strip the output softmax from your model.
#md # Otherwise [model checks](@ref docs-lrp-model-checks) will fail.
#md # 1. Use [`canonize`](@ref) to fuse linear layers.
#md # 1. Don't just call `LRP(model)`, instead use a [`Composite`](@ref)
#md # to apply LRP rules to your model.
#md # Read [*Assigning rules to layers*](@ref docs-composites).
#md # 1. By default, `LRP` will call [`flatten_model`](@ref) to flatten your model.
#md # This reduces computational overhead.
#md # !!! note
#md # This package is part the [Julia-XAI ecosystem](https://github.com/Julia-XAI).
#md # For an introduction to the ecosystem, please refer to the
#md # [*Getting started* guide](https://julia-xai.github.io/XAIDocs/).

# We start out by loading a small convolutional neural network:
using RelevancePropagation
Expand All @@ -34,6 +24,18 @@ model = Chain(
# This model contains two chains: the convolutional layers and the fully connected layers.

# ## [Model preparation](@id docs-lrp-model-prep)

#md # !!! note "TLDR"
#md #
#md # 1. Use [`strip_softmax`](@ref) to strip the output softmax from your model.
#md # Otherwise [model checks](@ref docs-lrp-model-checks) will fail.
#md # 1. Use [`canonize`](@ref) to fuse linear layers.
#md # 1. Don't just call `LRP(model)`, instead use a [`Composite`](@ref)
#md # to apply LRP rules to your model.
#md # Read [*Assigning rules to layers*](@ref docs-composites).
#md # 1. By default, `LRP` will call [`flatten_model`](@ref) to flatten your model.
#md # This reduces computational overhead.

# ### [Stripping the output softmax](@id docs-lrp-strip-softmax)
# When using LRP, it is recommended to explain output logits instead of probabilities.
# This can be done by stripping the output softmax activation from the model
Expand Down

0 comments on commit 4a708a2

Please sign in to comment.