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

Poisson Example not working on Julia 1.8 #602

Closed
bernaloo opened this issue Sep 8, 2022 · 6 comments
Closed

Poisson Example not working on Julia 1.8 #602

bernaloo opened this issue Sep 8, 2022 · 6 comments

Comments

@bernaloo
Copy link

bernaloo commented Sep 8, 2022

Julia 1.8 Running on macOS Catalina 10.15.7 (Intel)
After installing all needed dependencies, trying to run the Poisson Example from "Introduction to NeuralPDE. "
Shows the following Problem:

ERROR: LoadError: TypeError: in NonAdaptiveLoss, in T, expected T<:Real, got Type{Any} Stacktrace: [1] symbolic_discretize(pde_system::PDESystem, discretization::PhysicsInformedNN{QuadratureTraining{IntegralsCubature.CubatureJLh, Float64}, Nothing, NeuralPDE.Phi{Lux.Chain{NamedTuple{(:layer_1, :layer_2, :layer_3), Tuple{Dense{typeof(σ), Matrix{Float32}, Vector{Float32}}, Dense{typeof(σ), Matrix{Float32}, Vector{Float32}}, Dense{typeof(identity), Matrix{Float32}, Vector{Float32}}}}}, NamedTuple{(:layer_1, :layer_2, :layer_3), Tuple{NamedTuple{(), Tuple{}}, NamedTuple{(), Tuple{}}, NamedTuple{(), Tuple{}}}}}, typeof(NeuralPDE.numeric_derivative), Bool, Nothing, Nothing, Nothing, Base.Pairs{Symbol, Union{}, Tuple{}, NamedTuple{(), Tuple{}}}}) @ NeuralPDE ~/.julia/packages/NeuralPDE/Qjcw1/src/discretize.jl:491 [2] discretize(pde_system::PDESystem, discretization::PhysicsInformedNN{QuadratureTraining{IntegralsCubature.CubatureJLh, Float64}, Nothing, NeuralPDE.Phi{Lux.Chain{NamedTuple{(:layer_1, :layer_2, :layer_3), Tuple{Dense{typeof(σ), Matrix{Float32}, Vector{Float32}}, Dense{typeof(σ), Matrix{Float32}, Vector{Float32}}, Dense{typeof(identity), Matrix{Float32}, Vector{Float32}}}}}, NamedTuple{(:layer_1, :layer_2, :layer_3), Tuple{NamedTuple{(), Tuple{}}, NamedTuple{(), Tuple{}}, NamedTuple{(), Tuple{}}}}}, typeof(NeuralPDE.numeric_derivative), Bool, Nothing, Nothing, Nothing, Base.Pairs{Symbol, Union{}, Tuple{}, NamedTuple{(), Tuple{}}}}) @ NeuralPDE ~/.julia/packages/NeuralPDE/Qjcw1/src/discretize.jl:678 [3] top-level scope @ ~/Projects/julia/NeuralPDEs/PoissonNPDE.jl:28 [4] include(fname::String) @ Base.MainInclude ./client.jl:476 [5] top-level scope @ REPL[18]:1 [6] top-level scope @ ~/.julia/packages/CUDA/DfvRa/src/initialization.jl:52`

@ChrisRackauckas
Copy link
Member

Is this with Julia v1.8.1? What version of NeuralPDE?

@bernaloo
Copy link
Author

bernaloo commented Sep 14, 2022

@ChrisRackauckas
This is with Julia v1.8.0 and NeuralPDE v5.2.0
Now that you say there is 1.8.1
I can give that a try.

@bernaloo
Copy link
Author

solved with Julia 1.8.1

@YichengDWu
Copy link
Contributor

What's changed in v1.8.1 so that it worked?

@ChrisRackauckas
Copy link
Member

ERROR: LoadError: TypeError: in NonAdaptiveLoss, in T, expected T<:Real, got Type{Any} Stacktrace: [1]

Sounds like it was just an older version of NeuralPDE from before the refactor, so not a Julia update but the package update from a previous major version. Just a guess from the information there though.

@YichengDWu
Copy link
Contributor

Oh I was wondering about the new release 1.8.1 cuz the result of the ks equation is quite bad https://neuralpde.sciml.ai/stable/examples/ks/
but always good on my laptop.

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

No branches or pull requests

3 participants