Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2026-08-16 09:21:38

0001 // @(#)root/tmva/pymva $Id$
0002 // Author: Sanjiban Sengupta, 2021
0003 
0004 /**********************************************************************************
0005  * Project: TMVA - a Root-integrated toolkit for multivariate data analysis       *
0006  * Package: TMVA                                                                  *
0007  *                                                                                *
0008  *                                                                                *
0009  * Description:                                                                   *
0010  *      Functionality for parsing a saved Keras .H5 model into RModel object      *
0011  *                                                                                *
0012  * Authors (alphabetical):                                                        *
0013  *      Sanjiban Sengupta <sanjiban.sg@gmail.com>                                 *
0014  *                                                                                *
0015  * Copyright (c) 2021:                                                            *
0016  *      CERN, Switzerland                                                         *
0017  *                                                                                *
0018  *                                                                                *
0019  * Redistribution and use in source and binary forms, with or without             *
0020  * modification, are permitted according to the terms listed in LICENSE           *
0021  * (see tmva/doc/LICENSE)                                                         *
0022  **********************************************************************************/
0023 
0024 
0025 #ifndef TMVA_SOFIE_RMODELPARSER_KERAS
0026 #define TMVA_SOFIE_RMODELPARSER_KERAS
0027 
0028 #include "TMVA/RModel.hxx"
0029 #include "TMVA/SOFIE_common.hxx"
0030 #include "TMVA/Types.h"
0031 #include "TMVA/OperatorList.hxx"
0032 
0033 #include "Rtypes.h"
0034 #include "TString.h"
0035 
0036 
0037 namespace TMVA::Experimental::SOFIE::PyKeras {
0038 
0039 /// Parser function for translating Keras .h5 model into a RModel object.
0040 /// Accepts the file location of a Keras model and returns the
0041 /// equivalent RModel object.
0042 /// One can specify as option a batch size that can be used when the input Keras model
0043 /// has not a defined input batch size : e.g. for input = (input_dim,)
0044 RModel Parse(std::string filename, int batch_size = -1);
0045 
0046 } // namespace TMVA::Experimental::SOFIE::PyKeras
0047 
0048 #endif //TMVA_PYMVA_RMODELPARSER_KERAS