TensorDiffEq
TensorDiffEq copied to clipboard
Reproducibility
Dear @levimcclenny,
Have you considered in adapt TensorDiffEq to be deterministic? In the way the code is implemented, we can find two sources of randomness:
- The function
Domain.generate_collocation_points
has a random number generation - The TensorFlow training procedure (weights initialization and possibility of the use o random batches)
Both sources of randomness can be solved with not much effort. We can define a random state for the first one that can be passed to the function Domain.generate_collocation_points
. For the second, we can use the implementation provided on Framework Determinism. I have used the procedures suggested by this code, and the results of TensorFlow are always reproducible (CPU or GPU, serial or distributed).
If you want, I can implement these two features.
Best Regards
@emiliocoutinho was this still something you were interested in?
@emiliocoutinho was this still something you were interested in?
Yes, @levimcclenny. I already have this implemented in my code. If you want, I can add this here as well.
I'll be interested to apply this in my code as well. Any suggestions? Thanks!