Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix MLP #194

Merged
merged 3 commits into from
Dec 14, 2021
Merged

fix MLP #194

merged 3 commits into from
Dec 14, 2021

Conversation

jbrea
Copy link
Contributor

@jbrea jbrea commented Dec 13, 2021

Otherwise there is the following error

julia> MLJFlux.build(builder, rng, 3, 3)
ERROR: MethodError: Cannot `convert` an object of type 
  Flux.Dense{typeof(identity),Array{Float32{},2},Array{Float32{},1}} to an object of type 
  Flux.Dense{typeof(NNlib.relu),Array{Float32{},2},Array{Float32{},1}}
Closest candidates are:
  convert(::Type{T}, ::T) where T at essentials.jl:205
Stacktrace:
 [1] push!(a::Vector{Flux.Dense{typeof(NNlib.relu), Matrix{Float32}, Vector{Float32}}}, item::Flux.Dense{typeof(identity), Matrix{Float32}, Vector{Float32}})
   @ Base ./array.jl:932
 [2] build(mlp::MLJFlux.MLP{3}, rng::Random._GLOBAL_RNG, n_in::Int64, n_out::Int64)
   @ MLJFlux ~/.julia/dev/MLJFlux/src/builders.jl:93
 [3] top-level scope
   @ REPL[9]:1
 [4] top-level scope
   @ ~/.julia/packages/CUDA/YpW0k/src/initialization.jl:52

ablaom
ablaom previously approved these changes Dec 13, 2021
Copy link
Collaborator

@ablaom ablaom left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks indeed.

Oops, I have approved, but tests are not passing.

@ablaom ablaom dismissed their stale review December 13, 2021 19:49

overlooked failing tests

@ablaom
Copy link
Collaborator

ablaom commented Dec 13, 2021

Mmm. Looks like julia 1.7 is behaving differently re RNGs. I thought we used StableRNGs everywhere except for dropout (needs this).

edit Correction. I see that StableRNGs are not used everywhere. Opening new issue: #195

@ablaom ablaom closed this Dec 14, 2021
@ablaom ablaom reopened this Dec 14, 2021
@ablaom
Copy link
Collaborator

ablaom commented Dec 14, 2021

@jbrea Can you make a trivial commit to re-trigger buildkite? I think tests should pass now.

@codecov-commenter
Copy link

Codecov Report

Merging #194 (0838fa9) into dev (0b373f9) will increase coverage by 3.29%.
The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##              dev     #194      +/-   ##
==========================================
+ Coverage   88.97%   92.27%   +3.29%     
==========================================
  Files           9        9              
  Lines         245      246       +1     
==========================================
+ Hits          218      227       +9     
+ Misses         27       19       -8     
Impacted Files Coverage Δ
src/builders.jl 100.00% <100.00%> (+36.36%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 0b373f9...0838fa9. Read the comment docs.

Copy link
Collaborator

@ablaom ablaom left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for this!

@ablaom ablaom merged commit cdd5621 into FluxML:dev Dec 14, 2021
@ablaom ablaom mentioned this pull request Dec 14, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants