Skip to content
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

Shape with holes #770

Merged
merged 3 commits into from
Sep 8, 2023
Merged

Shape with holes #770

merged 3 commits into from
Sep 8, 2023

Conversation

LaurentMazare
Copy link
Collaborator

This is a quality of life improvement allowing a construction similar to pytorch use of -1 when reshaping a tensor, e.g. t.reshape(5, 2, -1), here we use () instead of -1 so as to still be able to use usize and to ensure at compile time that there is as single hole, so the equivalent construction becomes t.reshape((5, 2, ()))?.

@LaurentMazare LaurentMazare merged commit 0e250ae into main Sep 8, 2023
11 checks passed
@LaurentMazare LaurentMazare deleted the shape-with-holes branch September 8, 2023 07:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant