# Is it possible to skip the correlation computation before CNN training?

**URL:** <https://root-forum.cern.ch/t/is-it-possible-to-skip-the-correlation-computation-before-cnn-training/34593>\
**Category:** TMVA\
**Created:** [June 14, 2019, 5:36am UTC](https://root-forum.cern.ch/t/is-it-possible-to-skip-the-correlation-computation-before-cnn-training/34593 "2019-06-14T05:36:29Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Hercules\_Jack](https://root-forum.cern.ch/user_avatar/root-forum.cern.ch/hercules_jack/32/19354_2.png) [@Hercules\_Jack](https://root-forum.cern.ch/u/Hercules_Jack)\
**Post date:** [June 14, 2019, 5:36am UTC](https://root-forum.cern.ch/t/is-it-possible-to-skip-the-correlation-computation-before-cnn-training/34593/1 "2019-06-14T05:36:29Z")

</div>

Hi, I’m using TMVA::DNN::CNN to train a classifier. My data is some 2×60×60 images. I found that even if I set “Transformations=I” (i.e. identity transformation without decorrelation) , it still computes the 7200×7200 correlation matrix at the beginning, which is very time-consuming. Could anyone tell me if it’s possible to skip this process before training CNN?

---

<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:** [June 14, 2019, 7:14am UTC](https://root-forum.cern.ch/t/is-it-possible-to-skip-the-correlation-computation-before-cnn-training/34593/2 "2019-06-14T07:14:32Z")

</div>

Hi

You can add this option to the DataLoader::PrepareTrainingAndTestTree function:

`!CalcCorrelations`

This should skip that computations. If you have still problems please let me know  
Best regards  
Lorenzo

---

<div class="post-metadata">

**Author:** ![Hercules\_Jack](https://root-forum.cern.ch/user_avatar/root-forum.cern.ch/hercules_jack/32/19354_2.png) [@Hercules\_Jack](https://root-forum.cern.ch/u/Hercules_Jack)\
**Post date:** [June 14, 2019, 6:09pm UTC](https://root-forum.cern.ch/t/is-it-possible-to-skip-the-correlation-computation-before-cnn-training/34593/3 "2019-06-14T18:09:39Z")

</div>

That works for me. Thanks a lot! 😀
