【问题标题】:How to properly display Pytorch's math notation inside docstring?如何在文档字符串中正确显示 Pytorch 的数学符号?
【发布时间】:2019-10-13 17:33:03
【问题描述】:

查看 Pytorch 函数的文档字符串时,数学符号未正确显示,例如: 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)

只有当我使用我的 IDE 来显示文档时,它才能正确呈现乳胶表示法。

网站上有显示数学的开关吗?

【问题讨论】:

    标签: python pytorch docstring


    【解决方案1】:

    除非您尝试通过 Greasemonkey 进行一些脚本注入,否则源代码中的文档不会呈现。 但首先请查看标准文档,您可以在其中找到rendered formula

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2023-03-29
      • 1970-01-01
      • 1970-01-01
      • 2021-10-01
      • 1970-01-01
      相关资源
      最近更新 更多