I am trying to set up a physics-informed neural network in Python with deepXDE using a pytorch backend. My problem is quite simple and consists of only 2 points in the domain with 3 inputs (time, space, area) and 1 output (pressure).
I have the following:
# Computational geometry
geom = dde.geometry.Interval(L - dz, L)
timedomain = dde.geometry.TimeDomain(0, T)
geomtime = dde.geometry.GeometryXTime(geom, timedomain)
# [ t, z, A]
initial_points = np.array([[0.0, 0.0, 1.0],
[0.0, 1.0, 1.1]])
# [ p]
initial_values = np.array([[10],
[11]])
# Create initial conditions using PointSetBC
initial_cond = dde.icbc.PointSetBC(initial_points, initial_values, component=0)
data = dde.data.TimePDE(
geomtime,
pde,
[initial_cond],
num_domain=2,
num_boundary=0,
num_initial=2,
num_test=2,
)
When the code is run I get an error concatenating x_train (size 2×3) and x_train_all (size 4×2).
I’ve tried stepping through my code and the internal function of deepXDE. x_train appears to be initialized using the dimensions of geomtime (which is 2 because I didn’t think I needed to include area in there) but this might be the issue.
Any advice would be much appreciated!
Brennen Carr is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.