Skip to content

Commit cfe7a2b

Browse files
committed
Allow single-sample NoiseAugmentation
1 parent f323423 commit cfe7a2b

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/input_augmentation.jl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,8 +33,8 @@ struct NoiseAugmentation{A<:AbstractXAIMethod,D<:Sampleable,R<:AbstractRNG} <:
3333
function NoiseAugmentation(
3434
analyzer::A, n::Int, distribution::D, rng::R=GLOBAL_RNG
3535
) where {A<:AbstractXAIMethod,D<:Sampleable,R<:AbstractRNG}
36-
n < 2 &&
37-
throw(ArgumentError("Number of noise samples `n` needs to be larger than one."))
36+
n < 1 &&
37+
throw(ArgumentError("Number of samples `n` needs to be larger than zero."))
3838
return new{A,D,R}(analyzer, n, distribution, rng)
3939
end
4040
end

0 commit comments

Comments
 (0)