MethodError when using PhysicsInformedNN() from NueralPDE.jl due to strategy arguement

Viewed 94

I am trying to learn the syntax of NeuralPDE.jl for some PINN work by going through the documentation tutorials found here.

When building the PINN algorithm using the PhysicsInformedNN(chain, strategy) function, I am getting a MethodError for whichever strategy I attempt to use. The tutorial suggests GridTraining(.05) and I also tried the StochasticTraining(::Int64) with no luck.

dim = 2 # number of dimensions
chain = FastChain(FastDense(dim,16,Flux.σ),FastDense(16,16,Flux.σ),FastDense(16,1))
dx = 0.05
discretization = PhysicsInformedNN(chain,GridTraining(dx))

ERROR:

MethodError: no method matching GridTraining(::Float64)
1 Answers

It was a package version issue. When updating to the most recent version it was fixed. See the comments for more information.

Related