Skip to content

Commit

Permalink
fix: accidental type to rand32
Browse files Browse the repository at this point in the history
  • Loading branch information
avik-pal committed Sep 5, 2024
1 parent 0787b5b commit 6271c00
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 3 deletions.
2 changes: 2 additions & 0 deletions docs/src/introduction/updating_to_v1.md
Original file line number Diff line number Diff line change
Expand Up @@ -138,3 +138,5 @@ abstraction.
- [`InstanceNorm`](@ref) now supports tracking statistics.
- [`RNNCell`](@ref) and [`LSTMCell`](@ref) add `bias_ih` and `bias_hh` to the parameters to
align with Pytorch. Both are controlled using `init_bias` and `use_bias`.
- [`ConvTranspose`](@ref) allows `flipkernel=true` via `cross_correlation=true`. This makes
it efficient for MIOpen.
4 changes: 2 additions & 2 deletions src/layers/conv.jl
Original file line number Diff line number Diff line change
Expand Up @@ -432,7 +432,7 @@ function Base.show(io::IO, m::MaxPool)
print(io, "MaxPool(", m.k)
all(==(0), m.pad) || print(io, ", pad=", PrettyPrinting.tuple_string(m.pad))
m.stride == m.k || print(io, ", stride=", PrettyPrinting.tuple_string(m.stride))
return print(io, ")")
print(io, ")")
end

@doc doc"""
Expand Down Expand Up @@ -502,7 +502,7 @@ function Base.show(io::IO, m::MeanPool)
print(io, "MeanPool(", m.k)
all(==(0), m.pad) || print(io, ", pad=", PrettyPrinting.tuple_string(m.pad))
m.stride == m.k || print(io, ", stride=", PrettyPrinting.tuple_string(m.stride))
return print(io, ")")
print(io, ")")
end

"""
Expand Down
2 changes: 1 addition & 1 deletion src/layers/recurrent.jl
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ LuxOps.eachslice(x::AbstractMatrix, ::BatchLastIndex) = LuxOps.eachslice(x, Val(
function init_rnn_weight(rng::AbstractRNG, init_weight, hidden_dims, dims)
if init_weight === nothing
bound = inv(sqrt(hidden_dims))
y = randn32(rng, Float32, dims...)
y = randn32(rng, dims...)
@. y = (y - 0.5f0) * 2 * bound
return y
end
Expand Down

0 comments on commit 6271c00

Please sign in to comment.