This commit is contained in:
Mike J Innes 2018-02-17 12:41:53 +00:00
parent 11511982a4
commit 989adcdc7d

View File

@ -29,7 +29,7 @@ Conv2D(k::NTuple{2,Integer}, ch::Pair{<:Integer,<:Integer}, σ = identity;
Flux.treelike(Conv2D)
function (c::Conv2D)(x)
σ, b = c.σ, reshape(c.bias, 1, 1, :)
σ, b = c.σ, reshape(c.bias, 1, 1, :, 1)
σ.(conv2d(x, c.weight, stride = c.stride, padding = c.pad) .+ b)
end