Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/pierric/fei-einops
https://github.com/pierric/fei-einops
Last synced: 16 days ago
JSON representation
- Host: GitHub
- URL: https://github.com/pierric/fei-einops
- Owner: pierric
- License: bsd-3-clause
- Created: 2021-01-31T21:57:59.000Z (almost 4 years ago)
- Default Branch: main
- Last Pushed: 2021-05-21T21:37:38.000Z (over 3 years ago)
- Last Synced: 2024-11-08T07:57:49.180Z (2 months ago)
- Language: Haskell
- Size: 31.3 KB
- Stars: 0
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# fei-einops
This package mimics the idea in [Einops](https://github.com/arogozhnikov/einops) libraryFor example:
- `rearrange t "h w c -> c h w" []` will transpose the tensor from HWC to CHW.
- `rearrange t "b n c -> b (n c) []"` will reshape the tensor by merging up the last 2 axes.
- `rearrange t "(b n) c -> b n c" [#b .== 2]` will reshape the tensor by decompose the 1st axis into 2, where the new axis `n` is calculated automatically.
- ...In most cases, the tensor can be `Symbol`, `NDArray` for mxnet.