I have build a model using the low-level tensorflow API that has only a couple of variables (about 10) that I want to optimize. Therefore I want to implement a custom loss function that produces noisy loss values (kind of like a simulation based optimization approach).
Usually I would a derivative free optimizer like the SPSA optimizer.
Is there a way to implement a loss function that is not differentiable and an optimizer like SPSA with the low-level tensorflow API?
PS: One might ask why use tensorflow for this? This is because I want to use tensorflow for convenient saving of the model and tensorboard for convenient and comprehensive visualization. Also I want to be able to switch and compare different models in a standardized framework.
I think SPSA will work with non-differentiable functions also. For SPSA implementation: https://github.com/fraunhofer-iais/tensorflow_spsa
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With