Skip to content

Show HN: Easily visualize torch, Jax, tf, NumPy, etc. tensors

github.com/hardik-vala
4 pointsHardikValadiscuss
On HN

hey hn, wrote a python library for myself to visualize tensors. Makes learning and debugging deep learning code so much easier. Works seamlessly with colab/jupyter notebooks, and other python contexts. It's built on top of the graphics backend, chalk (https://chalk-diagrams.github.io/).

why?

Understanding deep learning code is hard—especially when it's foreign, because it's hard to imagine tensor manipulations, e.g. `F.conv2d(x.unsqueeze(1), w.transpose(-1, -2)).squeeze().view(B, L, -1)` in your head. Printing shapes and tensor values only get me so far. tensordiagram lets me quickly diagram tensors.

Other python libraries for creating tensor diagrams are either too physics and math focused, not notebook-friendly, limited to visualizing single tensors, and/or serve a wider purpose (so have a steep learning curve).

Comments

No comments yet.

AboutSource Built by g1lg1l

Hackerly is an independent reader for Hacker News, built on the public HN API. Not affiliated with Y Combinator.