-
Notifications
You must be signed in to change notification settings - Fork 27.7k
[docs] Unclear arg spec for torch.full #34210
Copy link
Copy link
Open
Labels
module: docsRelated to our documentation, both in docs/ and docblocksRelated to our documentation, both in docs/ and docblocksmodule: numpyRelated to numpy support, and also numpy compatibility of our operatorsRelated to numpy support, and also numpy compatibility of our operatorstriagedThis issue has been looked at a team member, and triaged and prioritized into an appropriate moduleThis issue has been looked at a team member, and triaged and prioritized into an appropriate module
Metadata
Metadata
Assignees
Labels
module: docsRelated to our documentation, both in docs/ and docblocksRelated to our documentation, both in docs/ and docblocksmodule: numpyRelated to numpy support, and also numpy compatibility of our operatorsRelated to numpy support, and also numpy compatibility of our operatorstriagedThis issue has been looked at a team member, and triaged and prioritized into an appropriate moduleThis issue has been looked at a team member, and triaged and prioritized into an appropriate module
https://pytorch.org/docs/master/torch.html?highlight=torch%20full#torch.full
fill_value – the number to fill the output tensor with.the arg spec or the arg description doesn't specify if the "number" must be Python scalar or if Torch scalar is also fine. It also doesn't specify if the device of the Torch scalar must match the device passed to the
full(...)call and if gradient tofill_valueis backpropped, Wordingnumberis quite vague.Also argument name
sizeis used - maybe better to replace it withshape?shapeproperty name was adopted long time ago, and even NumPy usesshapein the similar method: https://docs.scipy.org/doc/numpy/reference/generated/numpy.full.html