Skip to content

Replicates the formatting of PyTorch’s native tensor print output, but adds color-coded brackets by tensor dimension making them easier to read.

Notifications You must be signed in to change notification settings

catch-twenty-two/colorize_torch_tensor

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Torch Tensor Highlighter

Torch Tensor Highlighter is a Python utility that displays PyTorch tensors with colored highlighted brackets which indicate dimensionality. It can be used as a learning tool to more easily visualize dimensions in the output or is also great for debugging in either jupyter notebook or on the command line.

It replicates the formatting of PyTorch’s native tensor output, but adds color-coded brackets by tensor dimension.


Installation

Clone the repository and run the pip install script:

pip install .

You're good to go!

CLI

screen capture

Jupyter Notebook

screen capture

About

Replicates the formatting of PyTorch’s native tensor print output, but adds color-coded brackets by tensor dimension making them easier to read.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages