# The prediction probability given by TMVA DNN is all 0

**URL:** <https://root-forum.cern.ch/t/the-prediction-probability-given-by-tmva-dnn-is-all-0/57014>\
**Category:** TMVA\
**Tags:** tmva\
**Created:** [November 7, 2023, 9:09am UTC](https://root-forum.cern.ch/t/the-prediction-probability-given-by-tmva-dnn-is-all-0/57014 "2023-11-07T09:09:10Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![yhao](https://root-forum.cern.ch/letter_avatar_proxy/v4/letter/y/5fc32e/32.png) [@yhao](https://root-forum.cern.ch/u/yhao)\
**Post date:** [November 7, 2023, 9:09am UTC](https://root-forum.cern.ch/t/the-prediction-probability-given-by-tmva-dnn-is-all-0/57014/1 "2023-11-07T09:09:10Z")

</div>

Dear tmva users,  
I have trained DNN model using TMVA with ROOT6.20version.The model can application normally with ROOT6.18. But when I run it with ROOT6.20,the output is all zeros! I am extremely perplexed as to why changing the ROOT version would result in the same program being unable to produce the correct output.  
This my model and Application code  
[model.zip](https://root-forum.cern.ch/uploads/short-url/utNA6eKQGgycEzUswSknaLYund1.zip) (1.1 MB)  
[pion.C](https://root-forum.cern.ch/uploads/short-url/s3w2l4hpgHEeF1obCg50i42y6sd.C) (6.2 KB)  
[pionTrain.root](https://root-forum.cern.ch/uploads/short-url/qS5kVxTEq8nF2xHVPdzrbJV39js.root) (62.1 KB)

Thanks a lot!

---

<div class="post-metadata">

**Author:** ![moneta](https://root-forum.cern.ch/user_avatar/root-forum.cern.ch/moneta/32/19423_2.png) [@moneta](https://root-forum.cern.ch/u/moneta)\
**Post date:** [November 14, 2023, 4:10pm UTC](https://root-forum.cern.ch/t/the-prediction-probability-given-by-tmva-dnn-is-all-0/57014/2 "2023-11-14T16:10:04Z")

</div>

Hello,

Sorry for the late reply. I can confirm the problem and investigate it. It might be that we have deprecated the DNN method in TMVA in favour of the DL method, and this caused a problem evaluating old model. I will investigate this further.

I would suggest to trying using the `DL` method as shown in the tutorial `TMVAClassification.C` (see [ROOT: tutorials/tmva/TMVAClassification.C File Reference](https://root.cern.ch/doc/v620/TMVAClassification_8C.html))

Best regards

Lorenzo

---

<div class="post-metadata">

**Author:** ![moneta](https://root-forum.cern.ch/user_avatar/root-forum.cern.ch/moneta/32/19423_2.png) [@moneta](https://root-forum.cern.ch/u/moneta)\
**Post date:** [November 14, 2023, 4:49pm UTC](https://root-forum.cern.ch/t/the-prediction-probability-given-by-tmva-dnn-is-all-0/57014/3 "2023-11-14T16:49:41Z")

</div>

I have updated your weight file to work with the DL method. I attached here, in case you cannot re-train the method. This produces the same result as using 6.18

Lorenzo

[pion.C](https://root-forum.cern.ch/uploads/short-url/kDytFNKliIRhxmvWUbEtpLLRfO6.C) (6.3 KB)  
[weights.tar.gz](https://root-forum.cern.ch/uploads/short-url/oLFXQEd6HKitsQHIWIS3sPNugX5.gz) (1.1 MB)

---

<div class="post-metadata">

**Author:** ![yhao](https://root-forum.cern.ch/letter_avatar_proxy/v4/letter/y/5fc32e/32.png) [@yhao](https://root-forum.cern.ch/u/yhao)\
**Post date:** [November 17, 2023, 1:13pm UTC](https://root-forum.cern.ch/t/the-prediction-probability-given-by-tmva-dnn-is-all-0/57014/4 "2023-11-17T13:13:12Z")

</div>

Dear moneta:  
Thank you very much for your help, the model trained by DL can be used correctly!

Thanks a lot!
