Add generator argument in torch.randn signature (#102075)

Fix the document issue of `torch.randn`

Pull Request resolved: https://github.com/pytorch/pytorch/pull/102075
Approved by: https://github.com/kit1980, https://github.com/soulitzer
This commit is contained in:
Liang Hou
2023-06-14 23:37:15 +00:00
committed by PyTorch MergeBot
parent a0885dff98
commit e82616d900

View File

@ -9159,7 +9159,7 @@ Keyword args:
add_docstr(
torch.randn,
"""
randn(*size, *, out=None, dtype=None, layout=torch.strided, device=None, requires_grad=False, \
randn(*size, *, generator=None, out=None, dtype=None, layout=torch.strided, device=None, requires_grad=False, \
pin_memory=False) -> Tensor
"""
+ r"""