Hacker Newsnew | past | comments | ask | show | jobs | submitlogin
Ask HN: How do you visualize tensors?
2 points by HardikVala 7 hours ago | hide | past | favorite | discuss
I constantly find myself having to print raw tensors (either by hand or dumping them to stdout), especially when reading pytorch / jax code, to understand the transformations, e.g. for something like,

`x = torch.randn(32, 3, 224, 224).unfold(2, 16, 16).unfold(3, 16, 16).reshape(32, 3, 196, 256).transpose(1, 2).reshape(32, 196, 768).view(32, 196, 12, 64).transpose(1, 2)`

How do folks visualize tensors to quickly understand data flow in complex NN's?





Consider applying for YC's Winter 2026 batch! Applications are open till Nov 10

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: