Open wallscheid opened 1 year ago
Wouldn't it be much more efficient to initialize the predict()of each mini-batch based on the initial condition of that specific mini-batch and, therefore, save the ODE solver's overhead?
Yes. It's just a demonstration. Maybe we can make a better example.
In the provided example on mini-batching (https://docs.sciml.ai/SciMLSensitivity/dev/examples/neural_ode/minibatch/) the loss function, prediction model and the initial conditions are
Due to the split in multiple mini-batches, the initial condition and the starting time of each mini-batch is different, compare:
If I got it right, the ODE solver needs to provide intermediate solutions within
predict()
always starting from t=0 until the actual mini-batch timeframe beginns, e.g., for the third mini-batch which starts at roughly 2 seconds, the ODE solver needs to process everything from t=0...2 seconds as an overhead since the actual loss is calculcated for the timeframe t=2...3 seconds.Wouldn't it be much more efficient to initialize the
predict()
of each mini-batch based on the initial condition of that specific mini-batch and, therefore, save the ODE solver's overhead?