-
Notifications
You must be signed in to change notification settings - Fork 105
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[FeatureRequest] Option to set model callback at any time #270
Comments
Let's discuss your proposal and how it can be implemented in your application. What if the existing Callback field will be converted from protected to public, does it solve the existing problem? |
@rychuelektryk could you please comment on this thread? |
Hi @zaleslaw , and sorry for late response I think that from architectural point of view passing callback at compile stage is at least inconvenient. Model compilation can be located in very different place in code than fit/predict/evaluate. The need for listening for fit/predict/evaluate events probably emerges somewhere around calls to fit/predict/evaluate methods and I feel that it would be most natural to pass dedicated callbacks(FitCallback, PredictCallback, EvaluateCallback) as last parameter to invocation of those methods. So in this approach there would be one callback per invocation. Sorry that my current proposition is different than what I initially requested creating this thread. |
So, I don't see any objection to applying this principle of different callbacks after compilation, it's interesting to see how the KFold is implemented with KotlinDL and probably it will be added in the future release of KotlinDL in the next few months (and probably will be available in early alpha versions of the framework) I'll fix this issue and hope to get a feedback from you about implementation |
Hi,
Right now you can only set callback when compiling model. Can you add option to set callback independently to compilation? Alternatively maybe fit method could accept callback?
My case:
I have a kfold evaluation method which accepts already compiled Functional model as a parameter. During fit I want to analyse whether to stop early due to overfitting. In order to do that I need to analyse model callbacks. It would be great if I could set my callback inside my kfold evaluation method on already compiled model.
The text was updated successfully, but these errors were encountered: