# Understanding tensor.backwards()

**URL:** <https://discuss.pytorch.org/t/understanding-tensor-backwards/85269>\
**Category:** autograd\
**Created:** [June 12, 2020, 8:56pm UTC](https://discuss.pytorch.org/t/understanding-tensor-backwards/85269 "2020-06-12T20:56:38Z")\
**Posts on this page:** 1\
**Showing post:** 6

<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:** [June 20, 2020, 7:35am UTC](https://discuss.pytorch.org/t/understanding-tensor-backwards/85269/6 "2020-06-20T07:35:40Z")

</div>

If you are trying to calculate the `dLoss/dLoss`, then it would be `torch.ones`, that’s correct.  
For other use cases it might be different. Recently such a use case was described [here](https://discuss.pytorch.org/t/propagate-manually-computed-gradients/85884).

---

_[View the full topic](https://discuss.pytorch.org/t/understanding-tensor-backwards/85269)._
