using DifferentialEquations , Plots , PlutoUI
Initial Condition
md"
Initial Condition
"
Parameter
md"
Parameter
"
f (generic function with 1 method)
1.0
begin
begin
xaxis="Time (t)",yaxis="u(t)",label="solution", ylims=(0,3))
end
end
A Simple scalar Neural Network
md"
A Simple scalar Neural Network
"
simple (generic function with 1 method)
3.0831909010016787
using Flux
10
n = 10
Chain(
Main.var"#1#2"{DataType}(Float32),
Dense(1 => 10, tanh), # 20 parameters
Dense(10 => 1), # 11 parameters
first,
) # Total: 4 arrays, 31 parameters, 404 bytes.
NNODE.layers
10×1 Matrix{Float32}:
0.3943369
0.018199405
-0.0168786
-0.38904595
0.44548574
-0.2726122
0.5850382
-0.6337153
-0.4097277
0.34402916
1×10 Matrix{Float32}:
-0.0337934 0.635426 0.498114 0.141992 … 0.253938 -0.705633 -0.137575
10×1 Matrix{Float32}: 0.394337 0.0181994 -0.0168786 -0.389046 0.445486 -0.272612 0.585038 -0.633715 -0.409728 0.344029
1×10 Matrix{Float32}: -0.0337934 0.635426 0.498114 0.141992 … 0.253938 -0.705633 -0.137575
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
Let's solve u'=sin(2πt), u(0)=1
md"
Let's solve u'=sin(2πt), u(0)=1
"
g (generic function with 1 method)
loss (generic function with 1 method)