Skip to content

Commit

Permalink
fixup rebase
Browse files Browse the repository at this point in the history
  • Loading branch information
Michael Abbott committed Dec 21, 2020
1 parent c7b9cd3 commit 2839f2a
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 25 deletions.
19 changes: 0 additions & 19 deletions src/deprecations.jl
Original file line number Diff line number Diff line change
Expand Up @@ -12,22 +12,3 @@ struct Zeros
end
end
Zeros(args...) = Zeros()

# v0.11 deprecations
@deprecate poisson poisson_loss false
@deprecate hinge hinge_loss false
@deprecate squared_hinge squared_hinge_loss false
@deprecate normalise(x) normalise(x, dims=1) false

@deprecate binarycrossentropy(ŷ, y) Losses.binarycrossentropy(ŷ, y, agg=identity) false
@deprecate logitbinarycrossentropy(ŷ, y) Losses.logitbinarycrossentropy(ŷ, y, agg=identity) false

function Broadcast.broadcasted(::typeof(binarycrossentropy), ŷ, y)
@warn "binarycrossentropy.(ŷ, y) is deprecated, use Losses.binarycrossentropy(ŷ, y, agg=identity) instead"
Losses.binarycrossentropy(ŷ, y, agg=identity)
end

function Broadcast.broadcasted(::typeof(logitbinarycrossentropy), ŷ, y)
@warn "logitbinarycrossentropy.(ŷ, y) is deprecated, use Losses.logitbinarycrossentropy(ŷ, y, agg=identity) instead"
Losses.logitbinarycrossentropy(ŷ, y, agg=identity)
end
9 changes: 3 additions & 6 deletions src/layers/basic.jl
Original file line number Diff line number Diff line change
Expand Up @@ -94,13 +94,10 @@ The input `x` must be a vector of length `in`, or batch of vectors represented
as an `in × N` matrix, or any array with `size(x,1) == in`.
The out `y` will be a vector of length `out`, or a batch with `size(y) == (out, size(x)[2:end]...)`
Setting `bias` to `false` will switch the bias off for the layer.
Setting `bias=false` creates a layer without bias parameters.
Keywords `initW=glorot_uniform` and `initb=Flux.zeros` control the initialisation of
parameters, when using the first constructor.
Two additional keywords `initW=glorot_uniform` and `initb=Flux.zeros` control the
initialisation of parameters, when using the first constructor.
# Examples
```jldoctest
Expand Down Expand Up @@ -139,7 +136,7 @@ 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)
Expand Down

0 comments on commit 2839f2a

Please sign in to comment.