# Why there isn't a method named torch.softmax

**URL:** <https://discuss.pytorch.org/t/why-there-isnt-a-method-named-torch-softmax/90554>\
**Category:** Uncategorized\
**Created:** [July 26, 2020, 2:58am UTC](https://discuss.pytorch.org/t/why-there-isnt-a-method-named-torch-softmax/90554 "2020-07-26T02:58:35Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

**Author:** ![tom](https://discuss.pytorch.org/user_avatar/discuss.pytorch.org/tom/32/3162_2.png) [@tom](https://discuss.pytorch.org/u/tom)\
**Post date:** [July 26, 2020, 7:49pm UTC](https://discuss.pytorch.org/t/why-there-isnt-a-method-named-torch-softmax/90554/2 "2020-07-26T19:49:57Z")

</div>

So the idea is to put more deep-learning-oriented functions in `torch.nn.functional` and keep general-purpose functions in under torch directly. `softmax` was deemed to fall into the former, `sigmoid` in the latter category.  
While there is `torch.softmax`, this is by accident (which is why it is not documented) rather than as a design (previous version of PyTorch didn’t have the fancy `torch._C._nn` module to put the `C++`-implementations of `torch.nn.functional`-functions). I would advise to only use the documented variants to stay out of trouble should someone start to clean up.

Best regards

Thomas

---

_[View the full topic](https://discuss.pytorch.org/t/why-there-isnt-a-method-named-torch-softmax/90554)._
