lululxvi / deeponet

Learning nonlinear operators via DeepONet
Other
471 stars 129 forks source link

How is time encoded in the pendulum example? #44

Open ahof1704 opened 3 months ago

ahof1704 commented 3 months ago

Hi,

I would like to use DeepOnet to analyze a dataset that consists of measurements done in several locations simultaneously. Thus, the shape of the input array is [time_points, spatial_coordinate].

I thought I would look at the pendulum example to understand how I can use DeepOnet for my application, but I am confused by the dimensions in the generated data. I am using the default parameters to generate the data:

# data
T = 3
s0 = [0, 0]
sensor_in = 100
sensor_out = 100
length_scale = 0.2
train_num = 1000
test_num = 10000
# seq2seq
cell = 'GRU' # 'RNN', 'LSTM' or 'GRU'
hidden_size = 5
# training
lr = 0.001
iterations = 100000
print_every = 1000

The generated arrays have shapes:

X_train: (1000, 100, 1)
y_train: (1000, 100, 1)

I assumed this array would be 1000 time points for 100 locations, but a quick inspection of X shows that none of the dimensions seems to indicate time as it is discontinuous. How is time encoded in this experiment? Is it assumed to be uniformly sampled?

Also, if you have any suggestions on how I could use DeepOnet to analyze the data I described above, I would highly appreciate it.

Thanks!

rtali-ia commented 2 months ago

Yes. I have the same question. I think the authors should explain the datasets if they want people to use their approach.

lululxvi commented 2 weeks ago

It could be helpful to check this paper https://doi.org/10.1016/j.cma.2022.114778