Skip to content

Commit 54e84a8

Browse files
author
Michael Abbott
committed
two spaces
1 parent 647284b commit 54e84a8

File tree

3 files changed

+12
-12
lines changed

3 files changed

+12
-12
lines changed

src/deprecations.jl

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,10 @@
66

77
# Was used both Dense(10, 2, initb = Zeros) and Dense(rand(2,10), Zeros())
88
struct Zeros
9-
function Zeros()
10-
@warn "Zeros() is deprecated, please simply use bias=false instead" maxlog=3
11-
false
12-
end
9+
function Zeros()
10+
@warn "Zeros() is deprecated, please simply use bias=false instead" maxlog=3
11+
false
12+
end
1313
end
1414
Zeros(args...) = Zeros()
1515

src/layers/basic.jl

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -148,11 +148,11 @@ function Base.show(io::IO, l::Dense)
148148
end
149149

150150
function _dense_promote(d, x)
151-
eltype(d.W) == eltype(x) && return x
152-
T = eltype(d.W)
153-
warn_string("Input of type ", typeof(x)," does not match layer ", d,
154-
", eltype(W) = ", T, T <: AbstractFloat ? ". Will try to convert." : "")
155-
T <: AbstractFloat ? T.(x) : x
151+
eltype(d.W) == eltype(x) && return x
152+
T = eltype(d.W)
153+
warn_string("Input of type ", typeof(x)," does not match layer ", d,
154+
", eltype(W) = ", T, T <: AbstractFloat ? ". Will try to convert." : "")
155+
T <: AbstractFloat ? T.(x) : x
156156
end
157157

158158
warn_string(arg...) = @warn string(arg...) maxlog=3 _id=hash(arg)

src/layers/conv.jl

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,8 @@ expand(N, i::Tuple) = i
99
expand(N, i::Integer) = ntuple(_ -> i, N)
1010

1111
conv_reshape_bias(c) = c.bias isa AbstractVector ?
12-
reshape(c.bias, map(_->1, c.stride)..., :, 1) :
13-
c.bias
12+
reshape(c.bias, map(_->1, c.stride)..., :, 1) :
13+
c.bias
1414

1515
"""
1616
SamePad()
@@ -258,7 +258,7 @@ function ConvTranspose(w::AbstractArray{T,N}, b::Union{Bool,AbstractVector{T}},
258258
stride = expand(Val(N-2), stride)
259259
dilation = expand(Val(N-2), dilation)
260260
pad = calc_padding(ConvTranspose, pad, size(w)[1:N-2], dilation, stride)
261-
bias = create_bias(b, zeros, size(w, N-1))
261+
bias = create_bias(b, zeros, size(w, N-1))
262262
return ConvTranspose(σ, w, bias, stride, pad, dilation)
263263
end
264264

0 commit comments

Comments
 (0)