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

Type issue in Julia v1.9 #696

Closed
jiyess opened this issue Jun 28, 2023 · 1 comment
Closed

Type issue in Julia v1.9 #696

jiyess opened this issue Jun 28, 2023 · 1 comment

Comments

@jiyess
Copy link

jiyess commented Jun 28, 2023

I recently began working through the examples provided in the tutorial in Julia v1.9. I noticed that the examples for Ordinary Differential Equations (ODEs) run smoothly without any issues. However, when I attempted to replicate the examples for Partial Differential Equations (PDEs), I encountered some type errors. I've included the relevant error messages below for your reference. Could you possibly provide some guidance on resolving these issues?

ERROR: TypeError: in NonAdaptiveLoss, in T, expected T<:Real, got Type{Any}
Stacktrace:
 [1] symbolic_discretize(pde_system::PDESystem, discretization::PhysicsInformedNN{GridTraining{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}}}}, Nothing}, 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/gdbjo/src/discretize.jl:490
 [2] discretize(pde_system::PDESystem, discretization::PhysicsInformedNN{GridTraining{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}}}}, Nothing}, 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/gdbjo/src/discretize.jl:683
 [3] top-level scope
   @ ~/Documents/research/research/PINN_sol/PDE_test1:28
@ChrisRackauckas
Copy link
Member

This is indicative of running an old version. Please make sure you're using NeuralPDE v5.8.

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

2 participants