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.2.0.tar.gz (48.4 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.2.0-py3-none-any.whl (9.1 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for vizy-0.2.0.tar.gz
Algorithm Hash digest
SHA256 bdb12bc44c1198020ca54e81cff4a7d1d3ec9d282c48351306149f714e1a2d2b
MD5 9d8883182fd385ecd006362b9f176c71
BLAKE2b-256 55c23bc4661c9dfb7e7de9b251d56e003e0de4451c0311614aded6e393a06d0d

See more details on using hashes here.

File details

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

File metadata

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

File hashes

Hashes for vizy-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 04332677a2f6c389655d3b7f8133ec39069d569909fb55e2e5e81df382f281f7
MD5 a93ee049cf700d1091617548c8889962
BLAKE2b-256 153bd376c541c239cddc3cd4edc9d88cd70eb55ccfd44941edd1d9fd3226a03b

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