We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 6a2d8de commit 5c78e13Copy full SHA for 5c78e13
src/layers/basic.jl
@@ -582,11 +582,15 @@ function PairwiseFusion(connection; kw...)
582
end
583
584
function (m::PairwiseFusion)(x::T) where {T}
585
- getinput(i) = T <: Union{Tuple, Vector} ? x[i] : x
586
- nx = length(x)
587
nlayers = length(m.layers)
588
- if nx != nlayers
589
- throw(ArgumentError("PairwiseFusion with $nlayers layers takes $nlayers inputs, but got $nx inputs"))
+ if T <: Union{Tuple, Vector}
+ getinput(i) = x[i]
+ nx = length(x)
+ if nx != nlayers
590
+ throw(ArgumentError("PairwiseFusion with $nlayers layers takes $nlayers inputs, but got $nx inputs"))
591
+ end
592
+ else
593
+ getinput(i) = x
594
595
outputs = [m.layers[1](getinput(1))]
596
for i in 2:nlayers
0 commit comments