Skip to content

Commit

Permalink
fix merge
Browse files Browse the repository at this point in the history
  • Loading branch information
CarloLucibello committed Jan 8, 2021
1 parent 65c37c1 commit 847efd2
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions src/layers/basic.jl
Original file line number Diff line number Diff line change
Expand Up @@ -119,11 +119,10 @@ end

@functor Dense

function (a::Dense)(x::AbstractVecOrMat)
function (a::Dense)(x::AbstractArray)
W, b, σ = a.W, a.b, a.σ
# reshape to handle dims > 1 as batch dimensions
sz = size(x)
x = reshape(x, sz[1], :)
x = reshape(x, sz[1], :) # reshape to handle dims > 1 as batch dimensions
x = σ.(W*x .+ b)
return reshape(x, :, sz[2:end]...)
end
Expand Down

0 comments on commit 847efd2

Please sign in to comment.