Browse Source

docs(mge/functional): fix docs error and refine description

GitOrigin-RevId: 62da6f0d60
tags/v0.4.0
Megvii Engine Team Xinran Xu 5 years ago
parent
commit
5d32db8a10
2 changed files with 5 additions and 1 deletions
  1. +4
    -0
      python_module/megengine/functional/elemwise.py
  2. +1
    -1
      python_module/megengine/functional/nn.py

+ 4
- 0
python_module/megengine/functional/elemwise.py View File

@@ -257,6 +257,7 @@ def isnan(inp: Tensor) -> Tensor:
Examples:

.. testcode::

from megengine import tensor
import megengine.functional as F

@@ -265,6 +266,7 @@ def isnan(inp: Tensor) -> Tensor:
print(F.isnan(x))

.. testoutput::

Tensor([0 1 0], dtype=uint8)

"""
@@ -280,6 +282,7 @@ def isinf(inp: Tensor) -> Tensor:
Examples:

.. testcode::

from megengine import tensor
import megengine.functional as F

@@ -288,6 +291,7 @@ def isinf(inp: Tensor) -> Tensor:
print(F.isinf(x))

.. testoutput::

Tensor([0 1 0], dtype=uint8)

"""


+ 1
- 1
python_module/megengine/functional/nn.py View File

@@ -546,7 +546,7 @@ def eye(
comp_graph: Optional[CompGraph] = None
) -> Tensor:
"""
Fills the 2-dimensional input :class:`SymbolVar` with the identity matrix.
Returns a 2D tensor with ones on the diagonal and zeros elsewhere.

:param n: The number of rows
:param m: The number of columns. Default: None


Loading…
Cancel
Save