Skip to content

Commit 219482a

Browse files
authored
Fix broadcasting bug on Julia 1.6 (#74)
1 parent d8bba27 commit 219482a

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ Explainable AI in Julia using [Flux.jl](https://fluxml.ai).
1212
This package implements interpretability methods and visualizations for neural networks, similar to [Captum][captum-repo] and [Zennit][zennit-repo] for PyTorch and [iNNvestigate][innvestigate-repo] for Keras models.
1313

1414
## Installation
15-
To install this package and its dependencies, open the Julia REPL and run
15+
This package supports Julia ≥1.6. To install it, open the Julia REPL and run
1616
```julia-repl
1717
julia> ]add ExplainableAI
1818
```

src/input_augmentation.jl

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,8 @@ function reduce_augmentation(input::AbstractArray{T,N}, n) where {T<:AbstractFlo
3737
axs = axes(input, N)
3838
colons = ntuple(Returns(:), N - 1)
3939
for (i, ax) in enumerate(first(axs):n:last(axs))
40-
view(out, colons..., i) .= sum(view(input, colons..., ax:(ax + n - 1)); dims=N) / n
40+
view(out, colons..., i) .=
41+
dropdims(sum(view(input, colons..., ax:(ax + n - 1)); dims=N); dims=N) / n
4142
end
4243
return out
4344
end

0 commit comments

Comments
 (0)