Skip to main content

Tiny tensor visualiser: vz.plot(t) / vz.save(t)

Project description

vizy

Lightweight tensor visualizer for PyTorch and NumPy

Display or save any NumPy array or PyTorch tensor with a single line with ease:

import vizy

vizy.plot(tensor)               # shows image or grid
vizy.save("image.png", tensor)  # saves to file
vizy.save(tensor)               # saves to temp file and prints path
vizy.summary(tensor)            # prints info like res, dtype, device, range, etc.

Let's say you have a PyTorch tensor with shape (BS, 3, H, W). Instead of

plt.imshow(tensor.cpu().numpy()[0].transpose(1, 2, 0))
plt.imshow(tensor.cpu().numpy()[1].transpose(1, 2, 0))
...

You can just do:

vizy.plot(tensor)

Or if you are in an ssh session, you can just do:

vizy.save(tensor)

It will automatically save the tensor to a temporary file and print the path, so you can scp it to your local machine and visualize it.

Installation

pip install vizy

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

vizy-0.1.5.tar.gz (48.0 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

vizy-0.1.5-py3-none-any.whl (8.9 kB view details)

Uploaded Python 3

File details

Details for the file vizy-0.1.5.tar.gz.

File metadata

  • Download URL: vizy-0.1.5.tar.gz
  • Upload date:
  • Size: 48.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.6.14

File hashes

Hashes for vizy-0.1.5.tar.gz
Algorithm Hash digest
SHA256 9923d9ac3e624f7203de697a66d5f43e469280b1359d3cd0b437270e1f058dfb
MD5 143cc3134a1100b8b859bd4e90b4e077
BLAKE2b-256 5780ac6c7aa2bb075316dfc94c28c5a5f715a14521dbb98a1ab160621061110c

See more details on using hashes here.

File details

Details for the file vizy-0.1.5-py3-none-any.whl.

File metadata

  • Download URL: vizy-0.1.5-py3-none-any.whl
  • Upload date:
  • Size: 8.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.6.14

File hashes

Hashes for vizy-0.1.5-py3-none-any.whl
Algorithm Hash digest
SHA256 d8b0391b5831d6b06a3fb877986d63bb2e8c88d7bb6ef61c922de8f9c2ebda57
MD5 dd781d158e6d152cd5584db5e8303ac0
BLAKE2b-256 ea7ee935ab685ce71a0d72d3727c10b65a3315bcc46f0c0ec0b7c3d53937c1d5

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page