tBuLi / symfit

Symbolic Fitting; fitting as it should be.
http://symfit.readthedocs.org
MIT License
233 stars 17 forks source link

Support for tensorflow BFGS and DifferentialEvolution minimizers #303

Closed Jhsmit closed 4 years ago

Jhsmit commented 4 years ago

This PR adds an initial implementation of minimization with Tensorflow and is the result of a coding session with @tBuLi

This allows for GPU fitting support if tensorflow-gpu is installed and can provide up to (at least) 10-fold performance increase.

Current improvement for BFGS is 10-fold speed increase for big datasets, where a pure tensorflow implementation gives a 30-fold speed increase. This difference is likely due to the implementation of the objective functions and the overhead incurred here, and likely this can be further improved by factory functions which make the objective function.

This may solve #206 depending on the minimizers used. Future updates may include a TensorFlow ODE solver and other minimizers.