Skip to main content
torch.js has not been released yet.
torch.js logotorch.js logotorch.js
PlaygroundContact
Login
Documentation
IntroductionType SafetyTensor ExpressionsTensor IndexingEinsumEinopsAutogradTraining a ModelProfiling & MemoryPyTorch MigrationBest PracticesRuntimesPerformancePyTorch CompatibilityBenchmarksDType Coverage
IntroductionRenderer GalleryRenderersAnalysis
torch.js· 2026
LegalTerms of UsePrivacy Policy
  1. docs
  2. Viz
  3. Renderer Gallery

Renderer Gallery

Browse all available renderers in @torchjsorg/viz. Each card shows a live preview rendered with mock data. Click to view full documentation.

These are low-level WebGPU renderers, not React components. For React apps, see the react-ui gallery which wraps these renderers with convenient React interfaces.

Tensor Visualization

Renderers for visualizing tensor data directly from GPU memory.

Tensor
View Docs

HeatmapRenderer

Render 2D tensors as color-mapped heatmaps with zero-copy GPU access

Tensor
View Docs

FeatureMapGridRenderer

Display CNN feature maps in a grid layout showing channel activations

Tensor
View Docs

KernelGridRenderer

Visualize convolutional kernels and filters from neural networks

Training & Metrics

Renderers for monitoring model training and displaying performance metrics.

Training
View Docs

LineChartRenderer

Plot time series data with support for multiple series and streaming updates

Training
View Docs

TrainingDashboard

Multi-panel dashboard for real-time training visualization

Training
View Docs

CurveRenderer

Draw ROC curves, PR curves, and other evaluation metrics

Training
View Docs

BoxPlotRenderer

Statistical box plots showing distribution quartiles and outliers

Training
View Docs

HistogramRenderer

Render distribution histograms with customizable binning

Model Analysis

Renderers for understanding model behavior and interpretability.

Analysis
View Docs

AttentionFlowRenderer

Visualize transformer attention patterns between tokens

Analysis
View Docs

GradientFlowRenderer

Display gradient magnitudes through network layers

Analysis
View Docs

SaliencyMapRenderer

Overlay saliency maps on input images for model interpretability

Analysis
View Docs

ConfusionMatrixRenderer

Render classification confusion matrices with normalization options

Analysis
View Docs

ModelArchitectureRenderer

Visualize neural network architecture as interactive diagrams

Embedding & Dimensionality Reduction

Renderers for visualizing high-dimensional data in 2D/3D space.

Embedding
View Docs

PointCloudRenderer

Interactive 3D point cloud with rotation, zoom, and color mapping

Embedding
View Docs

EmbeddingRenderer

2D/3D embedding visualization with clustering and labels

Graph & Network Visualization

Renderers for displaying relational and hierarchical data.

Graph
View Docs

NetworkGraphRenderer

Force-directed graph layout for network visualization

Graph
View Docs

SankeyRenderer

Sankey diagrams for flow visualization between categories

Graph
View Docs

DendrogramRenderer

Hierarchical clustering dendrograms for cluster analysis

Analysis Utilities

The viz package also includes GPU-accelerated analysis functions for dimensionality reduction and clustering.

Analysis
View Docs

PCA

Principal Component Analysis

Analysis
View Docs

t-SNE

t-Distributed Stochastic Neighbor Embedding

Analysis
View Docs

UMAP

Uniform Manifold Approximation

Analysis
View Docs

K-Means

K-Means Clustering

Analysis
View Docs

DBSCAN

Density-Based Clustering

Analysis
View Docs

Hierarchical

Hierarchical Clustering

Analysis
View Docs

KDE

Kernel Density Estimation

Analysis
View Docs

Statistics

Compute tensor statistics

Usage Example

All renderers follow a consistent pattern:

import { HeatmapRenderer, createCanvasTarget } from '@torchjsorg/viz';
import torch from '@torchjsorg/torch.js';

await torch.init();

// Create tensor data
const attention = torch.rand(64, 64);

// Create renderer and target
const renderer = new HeatmapRenderer();
const canvas = document.getElementById('viz') as HTMLCanvasElement;
const target = createCanvasTarget(canvas);

// Render with options
renderer.render(attention, {
  target,
  colormap: 'viridis',
  showColorbar: true,
});

// Export to image
const blob = await target.toBlob('png');

More Resources

  • Renderers Guide - Detailed documentation for each renderer
  • Analysis Guide - GPU-accelerated analysis functions
  • React UI Gallery - Higher-level React components that wrap these renderers
Previous
Introduction
Next
Renderers