# Evaluating pytorch .pt model with TMVA::Reader

**URL:** <https://root-forum.cern.ch/t/evaluating-pytorch-pt-model-with-tmva-reader/50647>\
**Category:** TMVA\
**Created:** [July 4, 2022, 7:16am UTC](https://root-forum.cern.ch/t/evaluating-pytorch-pt-model-with-tmva-reader/50647 "2022-07-04T07:16:10Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Sam\_Bein](https://root-forum.cern.ch/user_avatar/root-forum.cern.ch/sam_bein/32/30184_2.png) [@Sam\_Bein](https://root-forum.cern.ch/u/Sam_Bein)\
**Post date:** [July 4, 2022, 7:16am UTC](https://root-forum.cern.ch/t/evaluating-pytorch-pt-model-with-tmva-reader/50647/1 "2022-07-04T07:16:11Z")

</div>

After following the PyTorch tutorial[1], I’m wondering about the recommended way to evaluate a pre-made .pt file using TMVA, e.g., that someone has trained independently of ROOT. I’d like to pick up the model.pt and use it my for own production based on a c++ script that runs TMVA. Normally I use the TMVA::Reader object, with method EvaluateMVA(). Is this possible when using a .pt file, or some other way using c++?

[1] new user, not able to link: “Tutorial: TMVA PyTorch Interface”

---

<div class="post-metadata">

**Author:** ![etejedor](https://root-forum.cern.ch/letter_avatar_proxy/v4/letter/e/e79b87/32.png) [@etejedor](https://root-forum.cern.ch/u/etejedor)\
**Post date:** [July 4, 2022, 7:33am UTC](https://root-forum.cern.ch/t/evaluating-pytorch-pt-model-with-tmva-reader/50647/2 "2022-07-04T07:33:56Z")

</div>

Hello,

@moneta could you answer this one? Thanks!

---

<div class="post-metadata">

**Author:** ![Sam\_Bein](https://root-forum.cern.ch/user_avatar/root-forum.cern.ch/sam_bein/32/30184_2.png) [@Sam\_Bein](https://root-forum.cern.ch/u/Sam_Bein)\
**Post date:** [July 4, 2022, 11:28am UTC](https://root-forum.cern.ch/t/evaluating-pytorch-pt-model-with-tmva-reader/50647/3 "2022-07-04T11:28:59Z")

</div>

Hi, thanks in advance!
