# Torch.no\_grad() affecting outputs/loss

**URL:** <https://discuss.pytorch.org/t/torch-no-grad-affecting-outputs-loss/28595>\
**Category:** autograd\
**Created:** [November 2, 2018, 11:09am UTC](https://discuss.pytorch.org/t/torch-no-grad-affecting-outputs-loss/28595 "2018-11-02T11:09:27Z")\
**Posts on this page:** 1\
**Showing post:** 3

<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:** [November 2, 2018, 8:25pm UTC](https://discuss.pytorch.org/t/torch-no-grad-affecting-outputs-loss/28595/3 "2018-11-02T20:25:24Z")

</div>

Could you post a small code snippet showing this problem?  
I would like to reproduce this issue, as it might be a bug, and couldn’t reproduce it so far.

---

_[View the full topic](https://discuss.pytorch.org/t/torch-no-grad-affecting-outputs-loss/28595)._
