I am trying to load a TensorFlow Keras model file (in h5 format) using the BookMethod and type as “PyKerasNN”. But this seems to be crashing . This has worked with plain Keras but doesn’t work with TensorFlow Keras. My versions are ROOT 6.22/00, TensorFlow 2.1.0 and python 3.7.6.
I think it is coming from the TMVA::MethodPyKeras class where TMVA calls the ‘Keras.models.load_model’ . This seems to conflict with python3 as keras is now integrated into TensorFlow. On lxplus, only tensor flow keras is supported starting from python3.
Could you please look into this and do the possible fix? Please let me know if you need any other information from my side.
 - Part of the error message is pasted here -
: Using TensorFlow backend - setting special configuration options
: Using Tensorflow version 2
: Failed to run python code: model = keras.models.load_model(‘model.h5’)