# How to properly display Pytorch's math notation inside docstring?

When looking at the docstring of Pytorch functions, the math notations are not properly displayed, e.g.: https://pytorch.org/docs/stable/_modules/torch/nn/modules/loss.html

.. math::
\text{loss}(x, class) = weight[class] \left(-x[class] + \log\left(\sum_j \exp(x[j])\right)\right)


Only if I use my IDE to display the documentation, it renders the latex notation properly.

Is there any switch for displaying math on the website?