Tensorflow with TMVA

I understand that the canonical way to do machine learning using TMVA is to generate a model in keras, save it to file, then load it into TMVA so that it can be trained. However, Keras is severely lacking in metrics that are pertinent to my study (they basically only have accuracy at this point whereas I need access to precision and recall metrics). I’m wondering if anyone has tried to define a model in tensorflow, save it to file, then load it into TMVA and proceed as usual. Can this work?


Currently we support only Keras model for training and then inference, but we are planning to extend this also to pure Tensorflow in a near future.
Are you interested in both training and evaluate in TMVA or just the inference part ?


Thank you for your response, I am not sure I understand your question. All the training and evaluation is taking place in TMVA, I am not aware of a way to use keras on its own to read root files and train on their data.


Ah I take it you use TMVA both for training and inference then, thanks for the clarification!

(For you interest it is possible to read root-files in python using packages root_numpy, uproot and possibly more that I am not aware of. These are however supported externally so we cannot give you any support for them here in this forum.)


This is news to me, thank you for the resources!