---
title: "TypeNN Playground"
description: "Edit two small matrices and execute MatMul, Add, or ReLU with the actual TypeNN runtime in your browser."
url: https://nn.typeshade.dev/playground/
language: en
---

Run TypeNN in your browser

# Tensor Playground

Change the matrix values, choose an operation and backend, then run it through the TypeNN runtime bundled with this site.

TypeNN Runtime

## Inputs

Matrix A · 2 × 2 Matrix values

Matrix B · 2 × 2 Matrix values

ReLU(A × B)

Auto (WebGPU, then CPU)

Browser support varies. A software renderer is not a physical GPU benchmark.

Result

## ReLU(A × B)

Run an operation to see its output.

The result is read by an explicit data() call. Intermediate tensors are disposed after the read.

Equivalent TypeScript TypeScript · TypeNN API

```typescript
const device = await nn.device({ device: "auto" });
const a = device.tensor([1, 2, 3, 4], { shape: [2, 2] });
const b = device.tensor([5, 6, 7, 8], { shape: [2, 2] });
const output = a.matmul(b).relu();
const values = await output.data();
```

[Runtime source ↗](https://github.com/typeshade/typenn)

**What this runs:** the shipped TypeNN build and its TypeShade runtime. It is not a JavaScript reimplementation or a mock result.

The example is intentionally small. Runtime startup includes backend preparation; this page does not report its duration as a benchmark. Automatic mode tries WebGPU and falls back to CPU. WebGL2 must be selected explicitly.
