Inverse problem for the diffusion equation#
Problem setup#
We will solve an inverse problem for the diffusion equation with an unknown parameter \(C\) :
with the initial condition
and the Dirichlet boundary condition
The reference solution is \(y=e^{-t} \sin (\pi x)\).
Dimensional Analysis#
Below is the dimensional analysis of the given diffusion equation with an unknown parameter \(C\):
Step 1: Assign Dimensions to Variables#
Spatial Coordinate \(x\):
Spatial coordinate has the dimension of length:
\[ [x] = L. \]
Time \(t\):
Time has the dimension:
\[ [t] = T. \]
Function \(y(x, t)\):
\(y\) is the solution of the diffusion equation and depends on the context. For this case, \(y\) has no explicit physical quantity associated with it, but we assume it to be dimensionless since the reference solution is given as \( y = e^{-t} \sin(\pi x) \), where both \(e^{-t}\) and \(\sin(\pi x)\) are dimensionless.
\[ [y] = 1 \quad \text{(dimensionless)}. \]
Parameter \(C\):
The term \(C \frac{\partial^2 y}{\partial x^2}\) must have the same dimension as \(\frac{\partial y}{\partial t}\) for consistency.
First, consider the time derivative:
\[ \left[\frac{\partial y}{\partial t}\right] = \frac{[y]}{[t]} = \frac{1}{T}. \]Next, consider the second spatial derivative:
\[ \left[\frac{\partial^2 y}{\partial x^2}\right] = \frac{[y]}{[x]^2} = \frac{1}{L^2}. \]Multiplying by \(C\), the dimensions of \(C\) must satisfy:
\[ [C] \cdot \frac{1}{L^2} = \frac{1}{T} \implies [C] = \frac{L^2}{T}. \]
Source Term: \(e^{-t} \left(\sin(\pi x) - \pi^2 \sin(\pi x)\right)\)
The exponential term \(e^{-t}\) and the sine functions are dimensionless. Therefore, the source term is dimensionally consistent with:
\[ \text{Source Term} = \frac{1}{T}. \]
Step 2: Initial and Boundary Conditions#
Initial Condition: \(y(x, 0) = \sin(\pi x)\).
\(\sin(\pi x)\) is dimensionless, consistent with \( [y] = 1 \).
Boundary Condition: \(y(-1, t) = y(1, t) = 0\).
The boundary values are dimensionless.
Step 3: Summary of Dimensions#
Variable/Parameter |
Physical Meaning |
Dimensions |
|---|---|---|
\(x\) |
Spatial coordinate |
\(L\) |
\(t\) |
Time |
\(T\) |
\(y\) |
Solution (dimensionless) |
\(1\) |
\(C\) |
Diffusion coefficient |
\(L^2 / T\) |
Source term |
Forcing function |
\(1 / T\) |
In conclusion,
The unknown parameter \(C\) has dimensions of \(L^2 / T\), which is consistent with the physical meaning of a diffusion coefficient.
The function \(y\) and the boundary/initial conditions are dimensionless, ensuring the consistency of the problem setup.
Implementation#
First, we import the necessary libraries and define the diffusion coefficient \(C\).
import brainstate
import braintools
import brainunit as u
import pinnx as pinnx
Define the physical units for the problem:
unit_of_x = u.meter
unit_of_t = u.second
unit_of_f = 1 / u.second
Define the diffusion coefficient \(C\) and the PDE function:
C = brainstate.ParamState(2.0 * u.meter ** 2 / u.second)
def pde(x, y):
jacobian = net.jacobian(x, x='t')
hessian = net.hessian(x, xi='x', xj='x')
dy_t = jacobian["y"]["t"]
dy_xx = hessian["y"]["x"]["x"]
source = (
u.math.exp(-x['t'] / unit_of_t) *
(u.math.sin(u.math.pi * x['x'] / unit_of_x) -
u.math.pi ** 2 * u.math.sin(u.math.pi * x['x'] / unit_of_x))
)
return dy_t - C.value * dy_xx + source * unit_of_f
Define the geometry:
geom = pinnx.geometry.Interval(-1, 1)
timedomain = pinnx.geometry.TimeDomain(0, 1)
geomtime = pinnx.geometry.GeometryXTime(geom, timedomain).to_dict_point(x=unit_of_x, t=unit_of_t)
Define the initial and boundary conditions:
def func(x):
y = u.math.sin(u.math.pi * x['x'] / unit_of_x) * u.math.exp(-x['t'] / unit_of_t)
return {'y': y}
bc = pinnx.icbc.DirichletBC(func)
ic = pinnx.icbc.IC(func)
Define the observation points:
x = {
'x': u.math.linspace(-1, 1, num=10) * unit_of_x,
't': u.math.full((10,), 1) * unit_of_t,
}
observe_y = pinnx.icbc.PointSetBC(x, func(x))
Define the neural network model:
net = pinnx.nn.Model(
pinnx.nn.DictToArray(x=unit_of_x, t=unit_of_t),
pinnx.nn.FNN([2] + [32] * 3 + [1], "tanh"),
pinnx.nn.ArrayToDict(y=None),
)
Define the inverse problem:
problem = pinnx.problem.TimePDE(
geomtime,
pde,
[bc, ic, observe_y],
net,
num_domain=40,
num_boundary=20,
num_initial=10,
anchors=x,
solution=func,
num_test=10000,
)
Warning: 10000 points required, but 10082 points sampled.
Train the neural network model and solve the inverse problem:
variable = pinnx.callbacks.VariableValue(C, period=1000)
trainer = pinnx.Trainer(problem, external_trainable_variables=C)
trainer.compile(braintools.optim.Adam(0.001), metrics=["l2 relative error"]).train(iterations=50000, callbacks=[variable])
trainer.saveplot(issave=True, isplot=True)
Compiling trainer...
'compile' took 0.106258 s
Training trainer...
Step Train loss Test loss Test metric
0 [35.679718 * becquerel2, [45.503433 * becquerel2, [{'y': Array(0.8310661, dtype=float32)}]
{'ibc0': {'y': Array(0.7570488, dtype=float32)}}, {'ibc0': {'y': Array(0.7570488, dtype=float32)}},
{'ibc1': {'y': Array(0.02982451, dtype=float32)}}, {'ibc1': {'y': Array(0.02982451, dtype=float32)}},
{'ibc2': {'y': Array(0.25618497, dtype=float32)}}] {'ibc2': {'y': Array(0.25618497, dtype=float32)}}]
0 [2.00e+00 * meter2 / second]
1000 [0.03602879 * becquerel2, [0.04448503 * becquerel2, [{'y': Array(0.38794544, dtype=float32)}]
{'ibc0': {'y': Array(0.02735445, dtype=float32)}}, {'ibc0': {'y': Array(0.02735445, dtype=float32)}},
{'ibc1': {'y': Array(0.06501726, dtype=float32)}}, {'ibc1': {'y': Array(0.06501726, dtype=float32)}},
{'ibc2': {'y': Array(0.01995897, dtype=float32)}}] {'ibc2': {'y': Array(0.01995897, dtype=float32)}}]
1000 [1.97e+00 * meter2 / second]
2000 [0.01038404 * becquerel2, [0.01745677 * becquerel2, [{'y': Array(0.37819982, dtype=float32)}]
{'ibc0': {'y': Array(0.02291086, dtype=float32)}}, {'ibc0': {'y': Array(0.02291086, dtype=float32)}},
{'ibc1': {'y': Array(0.05443568, dtype=float32)}}, {'ibc1': {'y': Array(0.05443568, dtype=float32)}},
{'ibc2': {'y': Array(0.01564121, dtype=float32)}}] {'ibc2': {'y': Array(0.01564121, dtype=float32)}}]
2000 [1.93e+00 * meter2 / second]
3000 [0.00719014 * becquerel2, [0.01219053 * becquerel2, [{'y': Array(0.37957639, dtype=float32)}]
{'ibc0': {'y': Array(0.01583208, dtype=float32)}}, {'ibc0': {'y': Array(0.01583208, dtype=float32)}},
{'ibc1': {'y': Array(0.03816846, dtype=float32)}}, {'ibc1': {'y': Array(0.03816846, dtype=float32)}},
{'ibc2': {'y': Array(0.01334066, dtype=float32)}}] {'ibc2': {'y': Array(0.01334066, dtype=float32)}}]
3000 [1.87e+00 * meter2 / second]
4000 [0.00574172 * becquerel2, [0.01916098 * becquerel2, [{'y': Array(0.39443684, dtype=float32)}]
{'ibc0': {'y': Array(0.00819715, dtype=float32)}}, {'ibc0': {'y': Array(0.00819715, dtype=float32)}},
{'ibc1': {'y': Array(0.01961347, dtype=float32)}}, {'ibc1': {'y': Array(0.01961347, dtype=float32)}},
{'ibc2': {'y': Array(0.01037939, dtype=float32)}}] {'ibc2': {'y': Array(0.01037939, dtype=float32)}}]
4000 [1.79e+00 * meter2 / second]
5000 [0.00397846 * becquerel2, [0.03868386 * becquerel2, [{'y': Array(0.403426, dtype=float32)}]
{'ibc0': {'y': Array(0.00524556, dtype=float32)}}, {'ibc0': {'y': Array(0.00524556, dtype=float32)}},
{'ibc1': {'y': Array(0.00908885, dtype=float32)}}, {'ibc1': {'y': Array(0.00908885, dtype=float32)}},
{'ibc2': {'y': Array(0.00787205, dtype=float32)}}] {'ibc2': {'y': Array(0.00787205, dtype=float32)}}]
5000 [1.70e+00 * meter2 / second]
6000 [0.00152285 * becquerel2, [0.07867768 * becquerel2, [{'y': Array(0.3750372, dtype=float32)}]
{'ibc0': {'y': Array(0.00280839, dtype=float32)}}, {'ibc0': {'y': Array(0.00280839, dtype=float32)}},
{'ibc1': {'y': Array(0.00285654, dtype=float32)}}, {'ibc1': {'y': Array(0.00285654, dtype=float32)}},
{'ibc2': {'y': Array(0.00617229, dtype=float32)}}] {'ibc2': {'y': Array(0.00617229, dtype=float32)}}]
6000 [1.59e+00 * meter2 / second]
7000 [0.00042557 * becquerel2, [0.16960475 * becquerel2, [{'y': Array(0.32183775, dtype=float32)}]
{'ibc0': {'y': Array(0.00137896, dtype=float32)}}, {'ibc0': {'y': Array(0.00137896, dtype=float32)}},
{'ibc1': {'y': Array(0.00036345, dtype=float32)}}, {'ibc1': {'y': Array(0.00036345, dtype=float32)}},
{'ibc2': {'y': Array(0.00481733, dtype=float32)}}] {'ibc2': {'y': Array(0.00481733, dtype=float32)}}]
7000 [1.49e+00 * meter2 / second]
8000 [0.00017074 * becquerel2, [0.19776653 * becquerel2, [{'y': Array(0.26631635, dtype=float32)}]
{'ibc0': {'y': Array(0.00086597, dtype=float32)}}, {'ibc0': {'y': Array(0.00086597, dtype=float32)}},
{'ibc1': {'y': Array(7.828907e-05, dtype=float32)}}, {'ibc1': {'y': Array(7.828907e-05, dtype=float32)}},
{'ibc2': {'y': Array(0.00348265, dtype=float32)}}] {'ibc2': {'y': Array(0.00348265, dtype=float32)}}]
8000 [1.38e+00 * meter2 / second]
9000 [0.00010915 * becquerel2, [0.14258294 * becquerel2, [{'y': Array(0.19723569, dtype=float32)}]
{'ibc0': {'y': Array(0.00049594, dtype=float32)}}, {'ibc0': {'y': Array(0.00049594, dtype=float32)}},
{'ibc1': {'y': Array(7.553954e-05, dtype=float32)}}, {'ibc1': {'y': Array(7.553954e-05, dtype=float32)}},
{'ibc2': {'y': Array(0.00193216, dtype=float32)}}] {'ibc2': {'y': Array(0.00193216, dtype=float32)}}]
9000 [1.26e+00 * meter2 / second]
10000 [0.00038679 * becquerel2, [0.07152588 * becquerel2, [{'y': Array(0.12039716, dtype=float32)}]
{'ibc0': {'y': Array(0.00016165, dtype=float32)}}, {'ibc0': {'y': Array(0.00016165, dtype=float32)}},
{'ibc1': {'y': Array(7.3326264e-05, dtype=float32)}}, {'ibc1': {'y': Array(7.3326264e-05, dtype=float32)}},
{'ibc2': {'y': Array(0.0007023, dtype=float32)}}] {'ibc2': {'y': Array(0.0007023, dtype=float32)}}]
10000 [1.13e+00 * meter2 / second]
11000 [6.400991e-05 * becquerel2, [0.02994728 * becquerel2, [{'y': Array(0.05713889, dtype=float32)}]
{'ibc0': {'y': Array(8.80569e-05, dtype=float32)}}, {'ibc0': {'y': Array(8.80569e-05, dtype=float32)}},
{'ibc1': {'y': Array(4.1765466e-05, dtype=float32)}}, {'ibc1': {'y': Array(4.1765466e-05, dtype=float32)}},
{'ibc2': {'y': Array(0.00013529, dtype=float32)}}] {'ibc2': {'y': Array(0.00013529, dtype=float32)}}]
11000 [1.06e+00 * meter2 / second]
12000 [4.424834e-05 * becquerel2, [0.01685221 * becquerel2, [{'y': Array(0.03156196, dtype=float32)}]
{'ibc0': {'y': Array(4.9093396e-05, dtype=float32)}}, {'ibc0': {'y': Array(4.9093396e-05, dtype=float32)}},
{'ibc1': {'y': Array(1.958303e-05, dtype=float32)}}, {'ibc1': {'y': Array(1.958303e-05, dtype=float32)}},
{'ibc2': {'y': Array(2.9790845e-05, dtype=float32)}}] {'ibc2': {'y': Array(2.9790845e-05, dtype=float32)}}]
12000 [1.03e+00 * meter2 / second]
13000 [4.0583745e-05 * becquerel2, [0.01293554 * becquerel2, [{'y': Array(0.02287465, dtype=float32)}]
{'ibc0': {'y': Array(3.074142e-05, dtype=float32)}}, {'ibc0': {'y': Array(3.074142e-05, dtype=float32)}},
{'ibc1': {'y': Array(1.0277039e-05, dtype=float32)}}, {'ibc1': {'y': Array(1.0277039e-05, dtype=float32)}},
{'ibc2': {'y': Array(1.312225e-05, dtype=float32)}}] {'ibc2': {'y': Array(1.312225e-05, dtype=float32)}}]
13000 [1.01e+00 * meter2 / second]
14000 [2.6840251e-05 * becquerel2, [0.01152143 * becquerel2, [{'y': Array(0.01827432, dtype=float32)}]
{'ibc0': {'y': Array(2.6315587e-05, dtype=float32)}}, {'ibc0': {'y': Array(2.6315587e-05, dtype=float32)}},
{'ibc1': {'y': Array(6.6273933e-06, dtype=float32)}}, {'ibc1': {'y': Array(6.6273933e-06, dtype=float32)}},
{'ibc2': {'y': Array(5.9816884e-06, dtype=float32)}}] {'ibc2': {'y': Array(5.9816884e-06, dtype=float32)}}]
14000 [1.01e+00 * meter2 / second]
15000 [0.00012371 * becquerel2, [0.01070947 * becquerel2, [{'y': Array(0.01927234, dtype=float32)}]
{'ibc0': {'y': Array(2.5944038e-05, dtype=float32)}}, {'ibc0': {'y': Array(2.5944038e-05, dtype=float32)}},
{'ibc1': {'y': Array(7.3463248e-06, dtype=float32)}}, {'ibc1': {'y': Array(7.3463248e-06, dtype=float32)}},
{'ibc2': {'y': Array(1.579595e-05, dtype=float32)}}] {'ibc2': {'y': Array(1.579595e-05, dtype=float32)}}]
15000 [1.00e+00 * meter2 / second]
16000 [1.8782257e-05 * becquerel2, [0.010138 * becquerel2, [{'y': Array(0.01481783, dtype=float32)}]
{'ibc0': {'y': Array(2.1143982e-05, dtype=float32)}}, {'ibc0': {'y': Array(2.1143982e-05, dtype=float32)}},
{'ibc1': {'y': Array(4.4593826e-06, dtype=float32)}}, {'ibc1': {'y': Array(4.4593826e-06, dtype=float32)}},
{'ibc2': {'y': Array(3.7475588e-06, dtype=float32)}}] {'ibc2': {'y': Array(3.7475588e-06, dtype=float32)}}]
16000 [1.00e+00 * meter2 / second]
17000 [1.5538082e-05 * becquerel2, [0.00959209 * becquerel2, [{'y': Array(0.01383823, dtype=float32)}]
{'ibc0': {'y': Array(1.9341458e-05, dtype=float32)}}, {'ibc0': {'y': Array(1.9341458e-05, dtype=float32)}},
{'ibc1': {'y': Array(4.0253426e-06, dtype=float32)}}, {'ibc1': {'y': Array(4.0253426e-06, dtype=float32)}},
{'ibc2': {'y': Array(3.624856e-06, dtype=float32)}}] {'ibc2': {'y': Array(3.624856e-06, dtype=float32)}}]
17000 [1.00e+00 * meter2 / second]
18000 [1.4605197e-05 * becquerel2, [0.00903223 * becquerel2, [{'y': Array(0.01343373, dtype=float32)}]
{'ibc0': {'y': Array(1.7818755e-05, dtype=float32)}}, {'ibc0': {'y': Array(1.7818755e-05, dtype=float32)}},
{'ibc1': {'y': Array(3.7411664e-06, dtype=float32)}}, {'ibc1': {'y': Array(3.7411664e-06, dtype=float32)}},
{'ibc2': {'y': Array(3.8074975e-06, dtype=float32)}}] {'ibc2': {'y': Array(3.8074975e-06, dtype=float32)}}]
18000 [1.00e+00 * meter2 / second]
19000 [0.00020008 * becquerel2, [0.00830668 * becquerel2, [{'y': Array(0.01487183, dtype=float32)}]
{'ibc0': {'y': Array(3.245175e-05, dtype=float32)}}, {'ibc0': {'y': Array(3.245175e-05, dtype=float32)}},
{'ibc1': {'y': Array(1.4154613e-05, dtype=float32)}}, {'ibc1': {'y': Array(1.4154613e-05, dtype=float32)}},
{'ibc2': {'y': Array(1.382081e-05, dtype=float32)}}] {'ibc2': {'y': Array(1.382081e-05, dtype=float32)}}]
19000 [1.00e+00 * meter2 / second]
20000 [1.2453206e-05 * becquerel2, [0.00797975 * becquerel2, [{'y': Array(0.01158835, dtype=float32)}]
{'ibc0': {'y': Array(1.5657448e-05, dtype=float32)}}, {'ibc0': {'y': Array(1.5657448e-05, dtype=float32)}},
{'ibc1': {'y': Array(3.3342942e-06, dtype=float32)}}, {'ibc1': {'y': Array(3.3342942e-06, dtype=float32)}},
{'ibc2': {'y': Array(2.7141502e-06, dtype=float32)}}] {'ibc2': {'y': Array(2.7141502e-06, dtype=float32)}}]
20000 [1.00e+00 * meter2 / second]
21000 [1.0425839e-05 * becquerel2, [0.00742463 * becquerel2, [{'y': Array(0.01137655, dtype=float32)}]
{'ibc0': {'y': Array(1.4240931e-05, dtype=float32)}}, {'ibc0': {'y': Array(1.4240931e-05, dtype=float32)}},
{'ibc1': {'y': Array(3.172249e-06, dtype=float32)}}, {'ibc1': {'y': Array(3.172249e-06, dtype=float32)}},
{'ibc2': {'y': Array(2.8847342e-06, dtype=float32)}}] {'ibc2': {'y': Array(2.8847342e-06, dtype=float32)}}]
21000 [1.00e+00 * meter2 / second]
22000 [1.3698635e-05 * becquerel2, [0.00690996 * becquerel2, [{'y': Array(0.01074506, dtype=float32)}]
{'ibc0': {'y': Array(1.3334024e-05, dtype=float32)}}, {'ibc0': {'y': Array(1.3334024e-05, dtype=float32)}},
{'ibc1': {'y': Array(3.3594083e-06, dtype=float32)}}, {'ibc1': {'y': Array(3.3594083e-06, dtype=float32)}},
{'ibc2': {'y': Array(2.9274486e-06, dtype=float32)}}] {'ibc2': {'y': Array(2.9274486e-06, dtype=float32)}}]
22000 [1.00e+00 * meter2 / second]
23000 [1.260023e-05 * becquerel2, [0.00642458 * becquerel2, [{'y': Array(0.01045308, dtype=float32)}]
{'ibc0': {'y': Array(1.2438575e-05, dtype=float32)}}, {'ibc0': {'y': Array(1.2438575e-05, dtype=float32)}},
{'ibc1': {'y': Array(2.9666814e-06, dtype=float32)}}, {'ibc1': {'y': Array(2.9666814e-06, dtype=float32)}},
{'ibc2': {'y': Array(2.9300436e-06, dtype=float32)}}] {'ibc2': {'y': Array(2.9300436e-06, dtype=float32)}}]
23000 [1.00e+00 * meter2 / second]
24000 [8.246606e-06 * becquerel2, [0.00602244 * becquerel2, [{'y': Array(0.00997281, dtype=float32)}]
{'ibc0': {'y': Array(1.1696405e-05, dtype=float32)}}, {'ibc0': {'y': Array(1.1696405e-05, dtype=float32)}},
{'ibc1': {'y': Array(2.636282e-06, dtype=float32)}}, {'ibc1': {'y': Array(2.636282e-06, dtype=float32)}},
{'ibc2': {'y': Array(2.374021e-06, dtype=float32)}}] {'ibc2': {'y': Array(2.374021e-06, dtype=float32)}}]
24000 [1.00e+00 * meter2 / second]
25000 [1.1195777e-05 * becquerel2, [0.00564192 * becquerel2, [{'y': Array(0.01005104, dtype=float32)}]
{'ibc0': {'y': Array(1.1166664e-05, dtype=float32)}}, {'ibc0': {'y': Array(1.1166664e-05, dtype=float32)}},
{'ibc1': {'y': Array(2.4298395e-06, dtype=float32)}}, {'ibc1': {'y': Array(2.4298395e-06, dtype=float32)}},
{'ibc2': {'y': Array(2.711555e-06, dtype=float32)}}] {'ibc2': {'y': Array(2.711555e-06, dtype=float32)}}]
25000 [1.00e+00 * meter2 / second]
26000 [9.503363e-06 * becquerel2, [0.0052563 * becquerel2, [{'y': Array(0.00906924, dtype=float32)}]
{'ibc0': {'y': Array(1.0266521e-05, dtype=float32)}}, {'ibc0': {'y': Array(1.0266521e-05, dtype=float32)}},
{'ibc1': {'y': Array(2.6634286e-06, dtype=float32)}}, {'ibc1': {'y': Array(2.6634286e-06, dtype=float32)}},
{'ibc2': {'y': Array(2.141071e-06, dtype=float32)}}] {'ibc2': {'y': Array(2.141071e-06, dtype=float32)}}]
26000 [1.00e+00 * meter2 / second]
27000 [6.5200206e-06 * becquerel2, [0.00498187 * becquerel2, [{'y': Array(0.00870219, dtype=float32)}]
{'ibc0': {'y': Array(1.0096963e-05, dtype=float32)}}, {'ibc0': {'y': Array(1.0096963e-05, dtype=float32)}},
{'ibc1': {'y': Array(2.105438e-06, dtype=float32)}}, {'ibc1': {'y': Array(2.105438e-06, dtype=float32)}},
{'ibc2': {'y': Array(1.7404262e-06, dtype=float32)}}] {'ibc2': {'y': Array(1.7404262e-06, dtype=float32)}}]
27000 [1.00e+00 * meter2 / second]
28000 [6.0612156e-06 * becquerel2, [0.00469941 * becquerel2, [{'y': Array(0.00836593, dtype=float32)}]
{'ibc0': {'y': Array(9.4506e-06, dtype=float32)}}, {'ibc0': {'y': Array(9.4506e-06, dtype=float32)}},
{'ibc1': {'y': Array(1.9978488e-06, dtype=float32)}}, {'ibc1': {'y': Array(1.9978488e-06, dtype=float32)}},
{'ibc2': {'y': Array(1.6832313e-06, dtype=float32)}}] {'ibc2': {'y': Array(1.6832313e-06, dtype=float32)}}]
28000 [1.00e+00 * meter2 / second]
29000 [0.00027426 * becquerel2, [0.00477805 * becquerel2, [{'y': Array(0.01418097, dtype=float32)}]
{'ibc0': {'y': Array(1.648501e-05, dtype=float32)}}, {'ibc0': {'y': Array(1.648501e-05, dtype=float32)}},
{'ibc1': {'y': Array(6.1632722e-06, dtype=float32)}}, {'ibc1': {'y': Array(6.1632722e-06, dtype=float32)}},
{'ibc2': {'y': Array(2.5690164e-05, dtype=float32)}}] {'ibc2': {'y': Array(2.5690164e-05, dtype=float32)}}]
29000 [1.00e+00 * meter2 / second]
30000 [5.3968092e-06 * becquerel2, [0.00423714 * becquerel2, [{'y': Array(0.00768072, dtype=float32)}]
{'ibc0': {'y': Array(8.529474e-06, dtype=float32)}}, {'ibc0': {'y': Array(8.529474e-06, dtype=float32)}},
{'ibc1': {'y': Array(1.7662005e-06, dtype=float32)}}, {'ibc1': {'y': Array(1.7662005e-06, dtype=float32)}},
{'ibc2': {'y': Array(1.4625474e-06, dtype=float32)}}] {'ibc2': {'y': Array(1.4625474e-06, dtype=float32)}}]
30000 [1.00e+00 * meter2 / second]
31000 [5.086522e-06 * becquerel2, [0.00405679 * becquerel2, [{'y': Array(0.00739116, dtype=float32)}]
{'ibc0': {'y': Array(8.098868e-06, dtype=float32)}}, {'ibc0': {'y': Array(8.098868e-06, dtype=float32)}},
{'ibc1': {'y': Array(1.6670391e-06, dtype=float32)}}, {'ibc1': {'y': Array(1.6670391e-06, dtype=float32)}},
{'ibc2': {'y': Array(1.3792062e-06, dtype=float32)}}] {'ibc2': {'y': Array(1.3792062e-06, dtype=float32)}}]
31000 [1.00e+00 * meter2 / second]
32000 [9.037222e-06 * becquerel2, [0.00388475 * becquerel2, [{'y': Array(0.006628, dtype=float32)}]
{'ibc0': {'y': Array(8.564745e-06, dtype=float32)}}, {'ibc0': {'y': Array(8.564745e-06, dtype=float32)}},
{'ibc1': {'y': Array(1.6539137e-06, dtype=float32)}}, {'ibc1': {'y': Array(1.6539137e-06, dtype=float32)}},
{'ibc2': {'y': Array(1.3912552e-06, dtype=float32)}}] {'ibc2': {'y': Array(1.3912552e-06, dtype=float32)}}]
32000 [1.00e+00 * meter2 / second]
33000 [4.528527e-06 * becquerel2, [0.00375882 * becquerel2, [{'y': Array(0.0068511, dtype=float32)}]
{'ibc0': {'y': Array(7.359239e-06, dtype=float32)}}, {'ibc0': {'y': Array(7.359239e-06, dtype=float32)}},
{'ibc1': {'y': Array(1.4748082e-06, dtype=float32)}}, {'ibc1': {'y': Array(1.4748082e-06, dtype=float32)}},
{'ibc2': {'y': Array(1.2449651e-06, dtype=float32)}}] {'ibc2': {'y': Array(1.2449651e-06, dtype=float32)}}]
33000 [1.00e+00 * meter2 / second]
34000 [4.695375e-06 * becquerel2, [0.00363632 * becquerel2, [{'y': Array(0.00661771, dtype=float32)}]
{'ibc0': {'y': Array(6.8333384e-06, dtype=float32)}}, {'ibc0': {'y': Array(6.8333384e-06, dtype=float32)}},
{'ibc1': {'y': Array(1.4989963e-06, dtype=float32)}}, {'ibc1': {'y': Array(1.4989963e-06, dtype=float32)}},
{'ibc2': {'y': Array(1.2258452e-06, dtype=float32)}}] {'ibc2': {'y': Array(1.2258452e-06, dtype=float32)}}]
34000 [1.00e+00 * meter2 / second]
35000 [0.00031871 * becquerel2, [0.00399784 * becquerel2, [{'y': Array(0.01087699, dtype=float32)}]
{'ibc0': {'y': Array(5.1616953e-05, dtype=float32)}}, {'ibc0': {'y': Array(5.1616953e-05, dtype=float32)}},
{'ibc1': {'y': Array(1.8963277e-05, dtype=float32)}}, {'ibc1': {'y': Array(1.8963277e-05, dtype=float32)}},
{'ibc2': {'y': Array(1.1703542e-05, dtype=float32)}}] {'ibc2': {'y': Array(1.1703542e-05, dtype=float32)}}]
35000 [1.00e+00 * meter2 / second]
36000 [3.8406342e-06 * becquerel2, [0.00347829 * becquerel2, [{'y': Array(0.0061718, dtype=float32)}]
{'ibc0': {'y': Array(6.3839334e-06, dtype=float32)}}, {'ibc0': {'y': Array(6.3839334e-06, dtype=float32)}},
{'ibc1': {'y': Array(1.249506e-06, dtype=float32)}}, {'ibc1': {'y': Array(1.249506e-06, dtype=float32)}},
{'ibc2': {'y': Array(1.0979719e-06, dtype=float32)}}] {'ibc2': {'y': Array(1.0979719e-06, dtype=float32)}}]
36000 [1.00e+00 * meter2 / second]
37000 [7.074466e-05 * becquerel2, [0.00337066 * becquerel2, [{'y': Array(0.00761305, dtype=float32)}]
{'ibc0': {'y': Array(1.2363613e-05, dtype=float32)}}, {'ibc0': {'y': Array(1.2363613e-05, dtype=float32)}},
{'ibc1': {'y': Array(6.2355684e-06, dtype=float32)}}, {'ibc1': {'y': Array(6.2355684e-06, dtype=float32)}},
{'ibc2': {'y': Array(4.710876e-06, dtype=float32)}}] {'ibc2': {'y': Array(4.710876e-06, dtype=float32)}}]
37000 [1.00e+00 * meter2 / second]
38000 [3.465391e-06 * becquerel2, [0.00336986 * becquerel2, [{'y': Array(0.00574788, dtype=float32)}]
{'ibc0': {'y': Array(5.8357455e-06, dtype=float32)}}, {'ibc0': {'y': Array(5.8357455e-06, dtype=float32)}},
{'ibc1': {'y': Array(1.135399e-06, dtype=float32)}}, {'ibc1': {'y': Array(1.135399e-06, dtype=float32)}},
{'ibc2': {'y': Array(1.0042679e-06, dtype=float32)}}] {'ibc2': {'y': Array(1.0042679e-06, dtype=float32)}}]
38000 [1.00e+00 * meter2 / second]
39000 [1.0268762e-05 * becquerel2, [0.0033686 * becquerel2, [{'y': Array(0.00545561, dtype=float32)}]
{'ibc0': {'y': Array(8.097706e-06, dtype=float32)}}, {'ibc0': {'y': Array(8.097706e-06, dtype=float32)}},
{'ibc1': {'y': Array(1.4723436e-06, dtype=float32)}}, {'ibc1': {'y': Array(1.4723436e-06, dtype=float32)}},
{'ibc2': {'y': Array(9.431725e-07, dtype=float32)}}] {'ibc2': {'y': Array(9.431725e-07, dtype=float32)}}]
39000 [1.00e+00 * meter2 / second]
40000 [4.2823112e-06 * becquerel2, [0.00333381 * becquerel2, [{'y': Array(0.0054828, dtype=float32)}]
{'ibc0': {'y': Array(5.738444e-06, dtype=float32)}}, {'ibc0': {'y': Array(5.738444e-06, dtype=float32)}},
{'ibc1': {'y': Array(9.648383e-07, dtype=float32)}}, {'ibc1': {'y': Array(9.648383e-07, dtype=float32)}},
{'ibc2': {'y': Array(9.519137e-07, dtype=float32)}}] {'ibc2': {'y': Array(9.519137e-07, dtype=float32)}}]
40000 [1.00e+00 * meter2 / second]
41000 [3.582141e-06 * becquerel2, [0.00330048 * becquerel2, [{'y': Array(0.00508944, dtype=float32)}]
{'ibc0': {'y': Array(5.472003e-06, dtype=float32)}}, {'ibc0': {'y': Array(5.472003e-06, dtype=float32)}},
{'ibc1': {'y': Array(9.464065e-07, dtype=float32)}}, {'ibc1': {'y': Array(9.464065e-07, dtype=float32)}},
{'ibc2': {'y': Array(7.4483506e-07, dtype=float32)}}] {'ibc2': {'y': Array(7.4483506e-07, dtype=float32)}}]
41000 [1.00e+00 * meter2 / second]
42000 [7.568629e-06 * becquerel2, [0.00326802 * becquerel2, [{'y': Array(0.0046458, dtype=float32)}]
{'ibc0': {'y': Array(5.431604e-06, dtype=float32)}}, {'ibc0': {'y': Array(5.431604e-06, dtype=float32)}},
{'ibc1': {'y': Array(1.0235344e-06, dtype=float32)}}, {'ibc1': {'y': Array(1.0235344e-06, dtype=float32)}},
{'ibc2': {'y': Array(7.4398366e-07, dtype=float32)}}] {'ibc2': {'y': Array(7.4398366e-07, dtype=float32)}}]
42000 [1.00e+00 * meter2 / second]
43000 [4.5585504e-05 * becquerel2, [0.00319802 * becquerel2, [{'y': Array(0.00467657, dtype=float32)}]
{'ibc0': {'y': Array(5.951851e-06, dtype=float32)}}, {'ibc0': {'y': Array(5.951851e-06, dtype=float32)}},
{'ibc1': {'y': Array(2.2854892e-06, dtype=float32)}}, {'ibc1': {'y': Array(2.2854892e-06, dtype=float32)}},
{'ibc2': {'y': Array(3.2231546e-06, dtype=float32)}}] {'ibc2': {'y': Array(3.2231546e-06, dtype=float32)}}]
43000 [1.00e+00 * meter2 / second]
44000 [1.7233344e-05 * becquerel2, [0.00329324 * becquerel2, [{'y': Array(0.00528376, dtype=float32)}]
{'ibc0': {'y': Array(5.196705e-06, dtype=float32)}}, {'ibc0': {'y': Array(5.196705e-06, dtype=float32)}},
{'ibc1': {'y': Array(1.7772775e-06, dtype=float32)}}, {'ibc1': {'y': Array(1.7772775e-06, dtype=float32)}},
{'ibc2': {'y': Array(1.7591086e-06, dtype=float32)}}] {'ibc2': {'y': Array(1.7591086e-06, dtype=float32)}}]
44000 [1.00e+00 * meter2 / second]
45000 [2.5381134e-06 * becquerel2, [0.00331884 * becquerel2, [{'y': Array(0.00453062, dtype=float32)}]
{'ibc0': {'y': Array(4.551063e-06, dtype=float32)}}, {'ibc0': {'y': Array(4.551063e-06, dtype=float32)}},
{'ibc1': {'y': Array(8.1471774e-07, dtype=float32)}}, {'ibc1': {'y': Array(8.1471774e-07, dtype=float32)}},
{'ibc2': {'y': Array(6.6565326e-07, dtype=float32)}}] {'ibc2': {'y': Array(6.6565326e-07, dtype=float32)}}]
45000 [1.00e+00 * meter2 / second]
46000 [9.146097e-05 * becquerel2, [0.00332611 * becquerel2, [{'y': Array(0.00681314, dtype=float32)}]
{'ibc0': {'y': Array(1.28242e-05, dtype=float32)}}, {'ibc0': {'y': Array(1.28242e-05, dtype=float32)}},
{'ibc1': {'y': Array(6.6814805e-06, dtype=float32)}}, {'ibc1': {'y': Array(6.6814805e-06, dtype=float32)}},
{'ibc2': {'y': Array(5.115698e-06, dtype=float32)}}] {'ibc2': {'y': Array(5.115698e-06, dtype=float32)}}]
46000 [1.00e+00 * meter2 / second]
47000 [2.7379099e-06 * becquerel2, [0.00336373 * becquerel2, [{'y': Array(0.00429155, dtype=float32)}]
{'ibc0': {'y': Array(4.344931e-06, dtype=float32)}}, {'ibc0': {'y': Array(4.344931e-06, dtype=float32)}},
{'ibc1': {'y': Array(7.400954e-07, dtype=float32)}}, {'ibc1': {'y': Array(7.400954e-07, dtype=float32)}},
{'ibc2': {'y': Array(5.937529e-07, dtype=float32)}}] {'ibc2': {'y': Array(5.937529e-07, dtype=float32)}}]
47000 [1.00e+00 * meter2 / second]
48000 [0.00013315 * becquerel2, [0.00377896 * becquerel2, [{'y': Array(0.00817893, dtype=float32)}]
{'ibc0': {'y': Array(7.9199735e-06, dtype=float32)}}, {'ibc0': {'y': Array(7.9199735e-06, dtype=float32)}},
{'ibc1': {'y': Array(2.2944569e-06, dtype=float32)}}, {'ibc1': {'y': Array(2.2944569e-06, dtype=float32)}},
{'ibc2': {'y': Array(1.2221748e-05, dtype=float32)}}] {'ibc2': {'y': Array(1.2221748e-05, dtype=float32)}}]
48000 [1.00e+00 * meter2 / second]
49000 [2.3180658e-06 * becquerel2, [0.00342008 * becquerel2, [{'y': Array(0.00412427, dtype=float32)}]
{'ibc0': {'y': Array(3.955222e-06, dtype=float32)}}, {'ibc0': {'y': Array(3.955222e-06, dtype=float32)}},
{'ibc1': {'y': Array(6.883399e-07, dtype=float32)}}, {'ibc1': {'y': Array(6.883399e-07, dtype=float32)}},
{'ibc2': {'y': Array(6.2362477e-07, dtype=float32)}}] {'ibc2': {'y': Array(6.2362477e-07, dtype=float32)}}]
49000 [1.00e+00 * meter2 / second]
50000 [3.457769e-06 * becquerel2, [0.00347083 * becquerel2, [{'y': Array(0.0041982, dtype=float32)}]
{'ibc0': {'y': Array(3.7689515e-06, dtype=float32)}}, {'ibc0': {'y': Array(3.7689515e-06, dtype=float32)}},
{'ibc1': {'y': Array(6.474415e-07, dtype=float32)}}, {'ibc1': {'y': Array(6.474415e-07, dtype=float32)}},
{'ibc2': {'y': Array(8.447834e-07, dtype=float32)}}] {'ibc2': {'y': Array(8.447834e-07, dtype=float32)}}]
50000 [1.00e+00 * meter2 / second]
Best trainer at step 49000:
train loss: 7.59e-06
test loss: 3.43e-03
test metric: [{'y': Array(0., dtype=float32)}]
'train' took 49.581476 s
Saving loss history to D:\codes\projects\pinnx\docs\unit-examples-inverse\loss.dat ...
Saving checkpoint into D:\codes\projects\pinnx\docs\unit-examples-inverse\loss.dat
Saving training data to D:\codes\projects\pinnx\docs\unit-examples-inverse\train.dat ...
Saving checkpoint into D:\codes\projects\pinnx\docs\unit-examples-inverse\train.dat
Saving test data to D:\codes\projects\pinnx\docs\unit-examples-inverse\test.dat ...
Saving checkpoint into D:\codes\projects\pinnx\docs\unit-examples-inverse\test.dat