# How to load a pt file?

**URL:** <https://discuss.pytorch.org/t/how-to-load-a-pt-file/139849>\
**Category:** vision\
**Created:** [December 21, 2021, 4:34am UTC](https://discuss.pytorch.org/t/how-to-load-a-pt-file/139849 "2021-12-21T04:34:40Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![friendlymaninthiswor](https://discuss.pytorch.org/user_avatar/discuss.pytorch.org/friendlymaninthiswor/32/45115_2.png) [@friendlymaninthiswor](https://discuss.pytorch.org/u/friendlymaninthiswor)\
**Post date:** [December 21, 2021, 4:34am UTC](https://discuss.pytorch.org/t/how-to-load-a-pt-file/139849/1 "2021-12-21T04:34:40Z")

</div>

Okay so I have a pt file that I got from Roboflow. My question is, how do I load it into a script?

---

<div class="post-metadata">

**Author:** ![ptrblck](https://discuss.pytorch.org/user_avatar/discuss.pytorch.org/ptrblck/32/1823_2.png) [@ptrblck](https://discuss.pytorch.org/u/ptrblck)\
**Post date:** [December 21, 2021, 5:54am UTC](https://discuss.pytorch.org/t/how-to-load-a-pt-file/139849/2 "2021-12-21T05:54:40Z")

</div>

Assuming the file was stored via `torch.save` you could use `torch.load` to load it.
