# How to get model summary using Pytorch backend?

**URL:** <https://discuss.ray.io/t/how-to-get-model-summary-using-pytorch-backend/2064>\
**Category:** RLlib\
**Created:** [May 6, 2021, 8:05am UTC](https://discuss.ray.io/t/how-to-get-model-summary-using-pytorch-backend/2064 "2021-05-06T08:05:31Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

**Author:** ![sven1977](https://sea2.discourse-cdn.com/flex020/user_avatar/discuss.ray.io/sven1977/32/53_2.png) [@sven1977](https://discuss.ray.io/u/sven1977)\
**Post date:** [May 6, 2021, 8:46am UTC](https://discuss.ray.io/t/how-to-get-model-summary-using-pytorch-backend/2064/2 "2021-05-06T08:46:03Z")

</div>

Hey @bug404 . If you have an RLlib Trainer object:

```auto
print(trainer.get_policy().model)

```

If you are using tune.run, try to add this line into ray/rllib/policy/torch\_policy.py:~164 (after we assign self.model to the 0th of the multi-GPU towers):

```auto
print(self.model)

```

---

_[View the full topic](https://discuss.ray.io/t/how-to-get-model-summary-using-pytorch-backend/2064)._
