# Is ROOT TMVA supporting Recurrent/Convolution Neural Network?

**URL:** <https://root-forum.cern.ch/t/is-root-tmva-supporting-recurrent-convolution-neural-network/35526>\
**Category:** TMVA\
**Created:** [August 6, 2019, 12:33pm UTC](https://root-forum.cern.ch/t/is-root-tmva-supporting-recurrent-convolution-neural-network/35526 "2019-08-06T12:33:39Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![wellatiger](https://root-forum.cern.ch/user_avatar/root-forum.cern.ch/wellatiger/32/15619_2.png) [@wellatiger](https://root-forum.cern.ch/u/wellatiger)\
**Post date:** [August 6, 2019, 12:33pm UTC](https://root-forum.cern.ch/t/is-root-tmva-supporting-recurrent-convolution-neural-network/35526/1 "2019-08-06T12:33:39Z")

</div>

Hello all,

Is ROOT TMVA supporting Recurrent/LSTM/Convolution Neural Network?

Thank you,

---

<div class="post-metadata">

**Author:** ![bellenot](https://root-forum.cern.ch/user_avatar/root-forum.cern.ch/bellenot/32/29217_2.png) [@bellenot](https://root-forum.cern.ch/u/bellenot)\
**Post date:** [August 6, 2019, 3:09pm UTC](https://root-forum.cern.ch/t/is-root-tmva-supporting-recurrent-convolution-neural-network/35526/2 "2019-08-06T15:09:17Z")

</div>

I think @moneta or @sitong should know …

---

<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:** [August 6, 2019, 5:28pm UTC](https://root-forum.cern.ch/t/is-root-tmva-supporting-recurrent-convolution-neural-network/35526/3 "2019-08-06T17:28:31Z")

</div>

Hi

We have currently a vanilla implementation for RNN, but not yet working on GPU, and we are including now LSTM and GRU. They will be available in the master soon, we have already a PR we are reviewing, (see [https://github.com/root-project/root/pull/3924](https://github.com/root-project/root/pull/3924))

Convolutional networks are already supported both on CPU and GPU.  
An example for convolution rural network is this notebook:

> <https://github.com/lmoneta/tmva-tutorial/blob/master/notebooks/TMVA_CNN_Classification.ipynb>

Lorenzo

---

<div class="post-metadata">

**Author:** ![wellatiger](https://root-forum.cern.ch/user_avatar/root-forum.cern.ch/wellatiger/32/15619_2.png) [@wellatiger](https://root-forum.cern.ch/u/wellatiger)\
**Post date:** [August 7, 2019, 2:48pm UTC](https://root-forum.cern.ch/t/is-root-tmva-supporting-recurrent-convolution-neural-network/35526/4 "2019-08-07T14:48:30Z")

</div>

Thank you very much for your reply,

I just curious how to you prepare the data for the RNN, it should be 3D tensor `(batch_size, time_steps, features)` and TMVA data-loader accepts TTrees.

Thank you in advance,  
Waleed
