# Crashing when using pyroot and simple neural network in Keras via TMVA

**URL:** <https://root-forum.cern.ch/t/crashing-when-using-pyroot-and-simple-neural-network-in-keras-via-tmva/25666>\
**Category:** TMVA\
**Tags:** python\
**Created:** [July 24, 2017, 8:27am UTC](https://root-forum.cern.ch/t/crashing-when-using-pyroot-and-simple-neural-network-in-keras-via-tmva/25666 "2017-07-24T08:27:11Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Danny\_Lee](https://root-forum.cern.ch/letter_avatar_proxy/v4/letter/d/45deac/32.png) [@Danny\_Lee](https://root-forum.cern.ch/u/Danny_Lee)\
**Post date:** [July 24, 2017, 8:27am UTC](https://root-forum.cern.ch/t/crashing-when-using-pyroot-and-simple-neural-network-in-keras-via-tmva/25666/1 "2017-07-24T08:27:11Z")

</div>

So I am using pyroot with the tmva feature through it to train a simple neural network constructed using KERAS (1 hidden layer with 3 neutron,5 input and 2 output). The training data is in `.root` with about 10^5 events.

However whenever I try to train it, my desktop freezes which I suspect that I may lack in memory. However this is weird as the number of weights for the network should not have used up so much memory given that it is just a simple neural network.

Has anyone faces the same problem when using tmva in pyroot to train a neural network from Keras?

---

<div class="post-metadata">

**Author:** ![kialbert](https://root-forum.cern.ch/user_avatar/root-forum.cern.ch/kialbert/32/16537_2.png) [@kialbert](https://root-forum.cern.ch/u/kialbert)\
**Post date:** [August 2, 2017, 10:09am UTC](https://root-forum.cern.ch/t/crashing-when-using-pyroot-and-simple-neural-network-in-keras-via-tmva/25666/2 "2017-08-02T10:09:38Z")

</div>

Hi,

Could you provide the set-up (code + some input root file) so we can reproduce it?

Cheers,  
Kim

---

<div class="post-metadata">

**Author:** ![Danny\_Lee](https://root-forum.cern.ch/letter_avatar_proxy/v4/letter/d/45deac/32.png) [@Danny\_Lee](https://root-forum.cern.ch/u/Danny_Lee)\
**Post date:** [August 2, 2017, 10:29am UTC](https://root-forum.cern.ch/t/crashing-when-using-pyroot-and-simple-neural-network-in-keras-via-tmva/25666/3 "2017-08-02T10:29:41Z")

</div>

Hey Kim,

I actually managed to found out the reason why its crashing, it seem that the tmva for it to run in my machine, I cannot let it handle more than ~10 variables/branches as anything more than it just straight up crashes(probably due to amount of events I have? ~10^5 and above). I am actually going to transition into purely python and just using root\_pandas/root\_numpy which depend on ROOT as there are some ML tools that I am thinking of testing it which are available mostly in python.

Thanks for the reply though

Danny
