# What exactly does Loss.cuda() do?

**URL:** <https://discuss.pytorch.org/t/what-exactly-does-loss-cuda-do/7450>\
**Category:** Uncategorized\
**Created:** [September 15, 2017, 11:15pm UTC](https://discuss.pytorch.org/t/what-exactly-does-loss-cuda-do/7450 "2017-09-15T23:15:12Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![SpandanMadan](https://discuss.pytorch.org/user_avatar/discuss.pytorch.org/spandanmadan/32/1371_2.png) [@SpandanMadan](https://discuss.pytorch.org/u/SpandanMadan)\
**Post date:** [September 15, 2017, 11:15pm UTC](https://discuss.pytorch.org/t/what-exactly-does-loss-cuda-do/7450/1 "2017-09-15T23:15:12Z")

</div>

I’m asking because I’m wondering if my custom losses are working on GPU optimally.

If I move all the tensors on to the GPU by doing a .cuda() on them, is there anything else that model.cuda() does that I haven’t done?

---

<div class="post-metadata">

**Author:** ![smth](https://discuss.pytorch.org/user_avatar/discuss.pytorch.org/smth/32/13_2.png) [@smth](https://discuss.pytorch.org/u/smth)\
**Post date:** [September 28, 2017, 4:02pm UTC](https://discuss.pytorch.org/t/what-exactly-does-loss-cuda-do/7450/2 "2017-09-28T16:02:37Z")

</div>

Loss.cuda() doesn’t do anything. model.cuda() transfers it’s learnable parameters on to GPU, but losses usually dont have parameters.
