提交 86598767 编写于 作者: M Megvii Engine Team 提交者: Xinran Xu

docs(mge/functional): fix doctest

GitOrigin-RevId: cd23860ab8c5dbf9853dd00d869e64f13247c0fc
上级 4500faf1
......@@ -443,7 +443,7 @@ def one_hot(inp: Tensor, num_classes: int) -> Tensor:
import megengine.functional as F
inp = tensor(np.arange(1, 4, dtype=np.int32))
out = F.one_hot(inp)
out = F.one_hot(inp, num_classes=4)
print(out.numpy())
Outputs:
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册