question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Hey! Loving einops, so much that now I feel a bit sad about standard einsum not being able to use descriptive names for dimensions. It would be amazing if einops implemented einsum with the same conveniences.

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Reactions:20
  • Comments:26 (23 by maintainers)

github_iconTop GitHub Comments

8reactions
cgarciaecommented, Nov 3, 2020

Hey @arogozhnikov, I’d already seen the WeightedEinsum layer, its very nice! I still think it would useful to have the functional version for the operation.

7reactions
MilesCranmercommented, Oct 25, 2020

+1 to this! My code right now is a mix of einops and torch.einsum, but I think it would be very nice/consistent if it was all the same syntax through einops. As the name einops suggests, I half expected einsum to be included when I tried it the first time.

I think a wrapper could start off by just being something that takes, e.g.,

einops.einsum(x, y, 'time i j, time i k -> time i k')

and simply parses it into usual einsum notation (for each corresponding backend):

torch.einsum("aij,ajk->aik", x, y)

Maybe eventually there could be cool features to consider related to the other syntax innovations in this awesome package.

Cheers! Miles

Read more comments on GitHub >

github_iconTop Results From Across the Web

Writing better code with pytorch+einops
Writing a better code with pytorch and einops. Rewriting building blocks of deep learning. Now let's get to examples from real world. These...
Read more >
Understanding einsum for Deep learning: implement a ...
Learn about the einsum notation and einops by coding a custom multi-head self-attention unit and a transformer block.
Read more >
Einops: Clear and Reliable Tensor Manipulations with ...
Einsum implementations suffer from non-aligned support for spaces between names, and capitals. List inputs. Einops can accept a list of tensors ...
Read more >
Leveraging Einsum to Improve Your Deep Learning Codes
I recently stumbled upon the term “einops” and “einsum” while implementing some ideas I have for my graduation thesis on time series ...
Read more >
A basic introduction to NumPy's einsum
Looking at the documentation - einops seems to only implement operations on a single tensor, so it's quite far from a general replacement...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found