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

[Feature suggestion] Support documentation-only names in repeat (and rearrange) #352

Open
fzimmermann89 opened this issue Nov 28, 2024 · 0 comments

Comments

@fzimmermann89
Copy link

Jaxtyping has documentation-only names.
For example channel=2
Here, the name before the = is completely ignored and only serves a documentation purpose. The code behaves as-if there was only the anonymous number written.

instead of

repeat(tensor, "x -> 1 1 x")

which lacks any information about what the new axes are, and

repeat(tensor, "x -> batch channel x", batch=1, channel=1)

which makes it less obvious that the operation is an unsqueeze,
it would be nice if one could write:

repeat(tensor, "x -> batch=1 channel=1 x")

Would this be something to consider for einops as well?
(I haven't seen an issue discussing this, if I missed it -- sorry!)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant