hacker news Hacker News
  1. new
  2. show
  3. ask
  4. jobs
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).

loading...