I'm training a neural network on the results of a CFD simulation (or rather, 300-ish simulations with different initial conditions). The dataset contains the values for temperature, density, velocity, etc. at equidistant points on a known line segment (along a single spatial dimension) at each tick of the simulation. I also have some "metadata" i.e. some simulation parameters in each instance of the simulation. (like the initial conditions, the environmental conditions, etc.).
From what I understand, this is similar to image data (except it's 1D and we have physical quantities instead of RGB values); perhaps, I should melt the dataset and even use time as a second "dimension" rather than a column/feature. And from what I understand, a convolutional architecture might be the best option for such spatial/spatiotemporal data. I'll provide a simplified example of my dataframe at the bottom of this post.
In either case, my dataframe will have some non-spatial columns which are not to be used in the convolution (I'd probably use some fully connected Dense neurons for them), and others which are to be used (I'd probably use some Conv1D or Conv2D neurons for them). How do I build this kind of architecture on TensorFlow? I don't think the Sequential API can have parallel branches with different behaviours, right?
A simplified example:
--------------------------------------------------------------------------
| Time | Initial conditions | T1 | T2 | T3 | V1 | V2 | V3 | D1 | D2 | D3 |
|------|--------------------|----|----|----|----|----|----|----|----|----|
| 1 | 100 | 20 | 21 | 22 | 3 | 5 | 6 | 10 | 10 | 11 |
| 2 | 100 | 19 | 21 | 21 | 4 | 6 | 7 | 10 | 9 | 10 |
| ... | 100 | ... |
x1
is the value of the quantity x
at a known point 1
. Imagine hundreds of such CSV files each having different initial conditions (these are also numerical, not categorical). I can load them and join them melt columns into rows or vice-versa, no problem, I know the syntax for that. But TL;DR my 2 questions are:
- Should I melt the time column into separate columns for each timestep (assuming I have sufficient computational power to handle such a wide dataset)?
- How do I convolve the temperature columns, and the velocity columns, and the density columns (and perhaps the timestep columns), while leaving the initial conditions as independent inputs?
Sorry. Kinda new to neural network coding, especially convolutional ones. If there are any helpful resources for a newbie, please send them my way! I've only worked with Dense layers and Sequential architectures before. And no heterogeneous layers.