-
Notifications
You must be signed in to change notification settings - Fork 24.3k
torch.Tensor.repeat is divergent from np.repeat #50013
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
@ezyang suggests adding an example of how old code using this behavior would be modified to use this new behavior. What would the release notes be? |
yes, currently tile and repeat do the same thing the only difference is that repeat will not except the input tuple of lesser dimensions then tensor. Tile overcome this by assuming that user want to extend the dimensions to initial if input tuple is of lesser dimension. also Tile is implemented with help of repeat function. I want to contribute but the issue being that I am unable to build at my side. |
Hi @Hitansh159, thanks for your interest, but this issue is currently only for discussion. We have not decided to do any work here, yet. It'd be great to have you contribute to PyTorch, though. You may want to look at this query of issues for something to start with: https://github.com/pytorch/pytorch/issues?q=is%3Aissue+is%3Aopen+label%3A%22good+first+issue%22 and check out our contribution guide here: https://pytorch.org/docs/stable/community/contribution_guide.html. I'm sorry that you're having a problem building PyTorch. I'm not familiar with building on Windows, but if you're experiencing an issue then you may want to look at the PyTorch Forums (https://discuss.pytorch.org/) or ask a new question there, or if you believe you're encountering a bug in PyTorch on Windows then you can file an issue here describing the failure you're seeing. |
Uh oh!
There was an error while loading. Please reload this page.
torch.Tensor.repeat, as its documentation notes, is divergent from np.repeat but similar to np.tile. Now that torch.tile is implemented, we can deprecate torch.repeat in favor of torch.tile by doing the following:
torch.Tensor.repeat
in favor of torch.tile for a releasenp.repeat is a top 50 NumPy function, and torch.Tensor.repeat (note that torch.repeat does not exist) is popular with hundreds of uses within Facebook.
cc @ezyang @gchanan @zou3519 @bdhirsh @jbschlosser @mruberry @rgommers @heitorschueroff
The text was updated successfully, but these errors were encountered: