Hi TMVA experts,
I want to use TMVA as an interface for Keras. I have no problems in the training, but since my method needs to be deployed in a system where I do not control the root release (i.e. in a system with no tensorflow and keras available) I want to use the standalone c++ class option.
The problem is that the above-mentioned class simply does not work. When I try to use it I get these error:
/home/alberto/Desktop/training/dataset/weights/TMVAClassification_DNN_Barrel.class.C:291:34: error: extra qualification on member 'GetMvaValue'
inline double ReadDNN_Barrel::GetMvaValue( const std::vector<double>& inputValues ) const
~~~~~~~~~~~~~~~~^
/home/alberto/Desktop/training/dataset/weights/TMVAClassification_DNN_Barrel.class.C:291:34: error: class member cannot be redeclared
/home/alberto/Desktop/training/dataset/weights/TMVAClassification_DNN_Barrel.class.C:235:11: note: previous declaration is here
double GetMvaValue( const std::vector<double>& inputValues ) const;
^
/home/alberto/Desktop/training/dataset/weights/TMVAClassification_DNN_Barrel.class.C:331:29: error: extra qualification on member 'InitTransform_1'
inline void ReadDNN_Barrel::InitTransform_1()
~~~~~~~~~~~~~~~~^
/home/alberto/Desktop/training/dataset/weights/TMVAClassification_DNN_Barrel.class.C:331:29: error: class member cannot be redeclared
/home/alberto/Desktop/training/dataset/weights/TMVAClassification_DNN_Barrel.class.C:257:9: note: previous declaration is here
void InitTransform_1();
^
/home/alberto/Desktop/training/dataset/weights/TMVAClassification_DNN_Barrel.class.C:487:29: error: extra qualification on member 'Transform_1'
inline void ReadDNN_Barrel::Transform_1( std::vector<double>& iv, int cls) const
~~~~~~~~~~~~~~~~^
/home/alberto/Desktop/training/dataset/weights/TMVAClassification_DNN_Barrel.class.C:487:29: error: class member cannot be redeclared
/home/alberto/Desktop/training/dataset/weights/TMVAClassification_DNN_Barrel.class.C:258:9: note: previous declaration is here
void Transform_1( std::vector<double> & iv, int sigOrBgd ) const;
^
/home/alberto/Desktop/training/dataset/weights/TMVAClassification_DNN_Barrel.class.C:572:29: error: extra qualification on member 'InitTransform_2'
inline void ReadDNN_Barrel::InitTransform_2()
~~~~~~~~~~~~~~~~^
/home/alberto/Desktop/training/dataset/weights/TMVAClassification_DNN_Barrel.class.C:572:29: error: class member cannot be redeclared
/home/alberto/Desktop/training/dataset/weights/TMVAClassification_DNN_Barrel.class.C:259:9: note: previous declaration is here
void InitTransform_2();
^
/home/alberto/Desktop/training/dataset/weights/TMVAClassification_DNN_Barrel.class.C:196772:29: error: extra qualification on member 'Transform_2'
inline void ReadDNN_Barrel::Transform_2( std::vector<double>& iv, int clsIn) const
~~~~~~~~~~~~~~~~^
/home/alberto/Desktop/training/dataset/weights/TMVAClassification_DNN_Barrel.class.C:196772:29: error: class member cannot be redeclared
/home/alberto/Desktop/training/dataset/weights/TMVAClassification_DNN_Barrel.class.C:260:9: note: previous declaration is here
void Transform_2( std::vector<double> & iv, int sigOrBgd ) const;
^
/home/alberto/Desktop/training/dataset/weights/TMVAClassification_DNN_Barrel.class.C:196879:29: error: extra qualification on member 'InitTransform_3'
inline void ReadDNN_Barrel::InitTransform_3()
~~~~~~~~~~~~~~~~^
/home/alberto/Desktop/training/dataset/weights/TMVAClassification_DNN_Barrel.class.C:196879:29: error: class member cannot be redeclared
/home/alberto/Desktop/training/dataset/weights/TMVAClassification_DNN_Barrel.class.C:261:9: note: previous declaration is here
void InitTransform_3();
^
/home/alberto/Desktop/training/dataset/weights/TMVAClassification_DNN_Barrel.class.C:197035:29: error: extra qualification on member 'Transform_3'
inline void ReadDNN_Barrel::Transform_3( std::vector<double>& iv, int cls) const
~~~~~~~~~~~~~~~~^
/home/alberto/Desktop/training/dataset/weights/TMVAClassification_DNN_Barrel.class.C:197035:29: error: class member cannot be redeclared
/home/alberto/Desktop/training/dataset/weights/TMVAClassification_DNN_Barrel.class.C:262:9: note: previous declaration is here
void Transform_3( std::vector<double> & iv, int sigOrBgd ) const;
^
/home/alberto/Desktop/training/dataset/weights/TMVAClassification_DNN_Barrel.class.C:197118:29: error: extra qualification on member 'InitTransform'
inline void ReadDNN_Barrel::InitTransform()
~~~~~~~~~~~~~~~~^
/home/alberto/Desktop/training/dataset/weights/TMVAClassification_DNN_Barrel.class.C:197118:29: error: class member cannot be redeclared
/home/alberto/Desktop/training/dataset/weights/TMVAClassification_DNN_Barrel.class.C:263:9: note: previous declaration is here
void InitTransform();
^
/home/alberto/Desktop/training/dataset/weights/TMVAClassification_DNN_Barrel.class.C:197126:29: error: extra qualification on member 'Transform'
inline void ReadDNN_Barrel::Transform( std::vector<double>& iv, int sigOrBgd ) const
~~~~~~~~~~~~~~~~^
/home/alberto/Desktop/training/dataset/weights/TMVAClassification_DNN_Barrel.class.C:197126:29: error: class member cannot be redeclared
/home/alberto/Desktop/training/dataset/weights/TMVAClassification_DNN_Barrel.class.C:264:9: note: previous declaration is here
void Transform( std::vector<double> & iv, int sigOrBgd ) const;
^
In file included from input_line_10:1:
/home/alberto/Desktop/training/validationClass.C:17:7: error: member 'ReadDNN_Barrel' has the same name as its class
class ReadDNN_Barrel;
^
fatal error: too many errors emitted, stopping now [-ferror-limit=]
I have already read this topic:
but no solutions to the problem were reported.
This is my code:
validationClass.C (8.2 KB)
The class is pretty big so I have uploaded it on dropbox:
https://www.dropbox.com/s/df1dt777sm1lied/TMVAClassification_DNN_Barrel.class.C?dl=0
Do you have any idea how to solve this problem? (or to make the method work with the Reader in a system with no keras and tensorflow)
Thank you,
Alberto