Skip to main content
torch.js has not been released yet.
torch.js logotorch.js logotorch.js
PlaygroundContact
Login
Back to Examples
Loading...
Back to Examples
torch.js· 2026
LegalTerms of UsePrivacy Policy

siamese-network

Learn to measure similarity between pairs of images using convolutional encoders

Image Pair Comparisons

Start training to see image pair comparisons
Idle
Epoch 0/50 • Batch 0-
loss
-
BCE Loss
-----StepLoss
-

Hyperparameters

0.0010
50
128

About Siamese Networks

Siamese networks learn to measure similarity between inputs by processing both through identical convolutional encoder networks, then comparing the resulting embeddings.

This example uses Conv2d layers to extract spatial features from MNIST digits. Green border = same digit, Red border = different.

Reading the Results

Same digit (should predict >50%)
Different digits (should predict <50%)
Logs
No output yet...