Original Research

PyTorch Error Database

50+ real PyTorch errors collected from Stack Overflow, each with the exact error message, root cause analysis, fix code, and prevention tips. Searchable and filterable by category.

By Michael Lip · April 7, 2026 · Data from Stack Overflow API

52
Errors Documented
5
Categories
312K+
SO Views Analyzed
14
PyTorch Layers Covered
Showing 52 of 52 errors
#1 · shape_mismatch
RuntimeError: mat1 and mat2 shapes cannot be multiplied (64x512 and 256x10)
shape_mismatch
Layers: nn.Linear, nn.Flatten
The in_features of a Linear layer does not match the actual size of the input tensor's last dimension. After flattening a Conv2d output, the feature count often differs from what the Linear layer expects. In this example, the flatten produces 512 features but the Linear layer was configured with in_features=256.
# Bug: nn.Linear(256, 10) but flatten output is 512
# Fix: match in_features to actual flatten output
self.fc = nn.Linear(512, 10)

# Or calculate dynamically:
dummy = torch.zeros(1, 3, 32, 32)
dummy = self.features(dummy)
self.fc = nn.Linear(dummy.view(1, -1).shape[1], 10)
Prevention: Use HeyTensor's Flatten Calculator to compute the exact output size before defining your Linear layer, or use Chain Mode to trace shapes through your network.
SO: Related: tensors must be 2-D · 9,167 views
#2 · shape_mismatch
RuntimeError: Given groups=1, weight of size [64, 3, 7, 7], expected input[1, 1, 224, 224] to have 3 channels, but got 1 channels instead
shape_mismatch
Layers: nn.Conv2d
The Conv2d layer's in_channels does not match the number of channels in the input tensor. The model expects 3-channel (RGB) input but received a 1-channel (grayscale) image.
# Bug: model expects 3 channels, input has 1
# Fix option 1: change first conv layer
self.conv1 = nn.Conv2d(1, 64, kernel_size=7, stride=2, padding=3)

# Fix option 2: convert grayscale to 3-channel
x = x.repeat(1, 3, 1, 1)  # repeat grayscale across 3 channels
Prevention: Use HeyTensor's Conv2d Calculator to verify input channels match your first convolution layer's in_channels parameter.
SO: Common in transfer learning with pretrained models · 50K+ combined views across related questions
#3 · shape_mismatch
RuntimeError: Expected input batch_size (32) to match target batch_size (16)
shape_mismatch
Layers: Loss functions (CrossEntropyLoss, MSELoss)
The model output and target tensors have different batch sizes. This usually happens when the data loader returns mismatched batches, or when an accidental reshape changes the batch dimension during the forward pass.
# Bug: output has batch 32, target has batch 16
# Check shapes before loss computation:
print(f"Output: {output.shape}, Target: {target.shape}")

# Common fix: ensure data loader returns matching pairs
for inputs, targets in dataloader:
    outputs = model(inputs)
    assert outputs.shape[0] == targets.shape[0]
    loss = criterion(outputs, targets)
Prevention: Always verify your DataLoader's collate function preserves batch alignment. Print shapes at the beginning of your training loop during debugging.
SO: Commonly reported across classification tasks · 30K+ combined views
#4 · shape_mismatch
RuntimeError: shape '[32, 784]' is invalid for input of size 25088
shape_mismatch
Layers: Tensor.view, Tensor.reshape
The total number of elements in the requested shape does not equal the total elements in the tensor. Here 32 * 784 = 25,088, but only if the batch size is actually 32 and spatial dims produce 784. If the real tensor has a different size, the reshape fails.
# Bug: hardcoded reshape dimensions
x = x.view(32, 784)  # fails if batch != 32 or features != 784

# Fix: use -1 for automatic dimension inference
x = x.view(x.size(0), -1)  # auto-compute feature dim
# Or use nn.Flatten()
self.flatten = nn.Flatten()
Prevention: Never hardcode batch size in view/reshape. Use x.view(x.size(0), -1) or nn.Flatten() instead.
SO: Common in MLP and CNN architectures · 40K+ combined views
#5 · shape_mismatch
RuntimeError: Calculated padded input size per channel: (1 x 1). Kernel size: (3 x 3). Kernel size can't be greater than actual input size
shape_mismatch
Layers: nn.Conv2d, nn.MaxPool2d
After successive convolution and pooling layers, the spatial dimensions have shrunk to a size smaller than the kernel. For example, a 32x32 input through multiple stride-2 convolutions can reach 1x1, where a 3x3 kernel cannot be applied.
# Bug: too many downsampling layers for input size
# Input: 32x32 -> Conv(s=2) -> 16x16 -> Pool(2) -> 8x8 -> Conv(s=2) -> 4x4 -> Pool(2) -> 2x2 -> Conv(k=3) -> ERROR

# Fix: reduce kernel size, add padding, or use fewer downsampling layers
self.conv3 = nn.Conv2d(128, 256, kernel_size=1)  # 1x1 conv instead of 3x3
# Or add padding:
self.conv3 = nn.Conv2d(128, 256, kernel_size=3, padding=1)
Prevention: Use HeyTensor Chain Mode to trace spatial dimensions through every layer and catch this before running your code.
SO: Frequent with small input images (CIFAR-10, MNIST) · 25K+ combined views
#6 · shape_mismatch
RuntimeError: Expected hidden[0] size (2, 32, 256), got [2, 1, 256]
shape_mismatch
Layers: nn.LSTM, nn.GRU
The hidden state passed to an LSTM/GRU has a batch dimension that does not match the input batch size. Hidden state shape is (num_layers * num_directions, batch, hidden_size). If you initialize hidden for batch=1 but pass input with batch=32, this error occurs.
# Bug: hidden state initialized with wrong batch size
h0 = torch.zeros(2, 1, 256)  # batch=1
output, _ = self.lstm(x, (h0, c0))  # x has batch=32

# Fix: match hidden batch to input batch
batch_size = x.size(0)  # or x.size(1) if batch_first=False
h0 = torch.zeros(2, batch_size, 256).to(x.device)
c0 = torch.zeros(2, batch_size, 256).to(x.device)
Prevention: Use HeyTensor's LSTM Calculator to verify hidden state dimensions. Always derive batch size from input dynamically.
SO: Expected hidden[0] size · 10,858 views
#7 · shape_mismatch
RuntimeError: The size of tensor a (10) must match the size of tensor b (5) at non-singleton dimension 1
shape_mismatch
Layers: Element-wise operations (add, mul, sub)
Two tensors in an element-wise operation have incompatible shapes that cannot be broadcast. PyTorch broadcasting requires each dimension to either match or be 1. Here dimension 1 has sizes 10 and 5 which are incompatible.
# Bug: incompatible shapes for addition
a = torch.randn(32, 10)
b = torch.randn(32, 5)
c = a + b  # RuntimeError!

# Fix: ensure shapes are compatible
b = torch.randn(32, 10)  # match dimension
# Or reshape/project:
proj = nn.Linear(5, 10)
c = a + proj(b)
Prevention: Print tensor shapes before operations. Use HeyTensor's Linear Calculator to plan projection layers that align dimensions.
SO: Common in skip connections and residual networks · 35K+ combined views
#8 · shape_mismatch
RuntimeError: Expected 4-dimensional input for 4-dimensional weight [64, 3, 3, 3], but got 3-dimensional input of size [3, 224, 224] instead
shape_mismatch
Layers: nn.Conv2d
A Conv2d layer expects a 4D input (batch, channels, height, width) but received a 3D tensor missing the batch dimension. This happens when you pass a single image without unsqueezing the batch dimension.
# Bug: passing single image without batch dim
img = torch.randn(3, 224, 224)
output = model(img)  # RuntimeError!

# Fix: add batch dimension
img = img.unsqueeze(0)  # shape: [1, 3, 224, 224]
output = model(img)
Prevention: Always add a batch dimension with .unsqueeze(0) when passing a single sample to a model. Use HeyTensor's Conv2d Calculator to confirm expected input format.
SO: Extremely common for inference/prediction code · 45K+ combined views
#9 · shape_mismatch
RuntimeError: output with shape [1, 28, 28] doesn't match the broadcast shape [3, 28, 28]
shape_mismatch
Layers: torchvision.transforms, tensor operations
A normalization transform expects 3 channels (RGB) but received a 1-channel (grayscale) image. The transforms.Normalize mean and std tuples have 3 values but the image has only 1 channel.
# Bug: 3-channel normalize on 1-channel image
transform = transforms.Compose([
    transforms.ToTensor(),
    transforms.Normalize((0.485, 0.456, 0.406), (0.229, 0.224, 0.225))
])

# Fix: use single-channel normalization
transform = transforms.Compose([
    transforms.ToTensor(),
    transforms.Normalize((0.5,), (0.5,))
])
# Or convert to RGB first:
transforms.Grayscale(num_output_channels=3)
Prevention: Match your normalization constants to your image channels. Check dataset image format before defining transforms.
SO: Very common with MNIST and grayscale datasets · 20K+ combined views
#10 · shape_mismatch
RuntimeError: For unbatched 2-D input, hid_size should match the input size. Expected hid_size 512, got 256
shape_mismatch
Layers: nn.Linear
A Linear layer's in_features does not match the hidden size from a previous layer's output. This commonly happens when chaining Linear layers and the dimensions do not align.
# Bug: dimension mismatch between Linear layers
self.fc1 = nn.Linear(784, 512)
self.fc2 = nn.Linear(256, 10)  # expects 256 but fc1 outputs 512

# Fix: match in_features to previous out_features
self.fc1 = nn.Linear(784, 512)
self.fc2 = nn.Linear(512, 10)  # 512 matches fc1 output
Prevention: Use HeyTensor's Linear Layer Calculator to verify that each layer's in_features matches the previous layer's out_features.
SO: Fundamental MLP architecture error · 15K+ combined views
#11 · shape_mismatch
RuntimeError: Expected target size [32, 10], got [32]
shape_mismatch
Layers: nn.MSELoss, nn.BCELoss
The loss function expects the target to have the same shape as the model output. MSELoss with output shape [32, 10] needs targets of shape [32, 10], not [32]. This happens when using MSELoss for classification instead of CrossEntropyLoss, or when targets need one-hot encoding.
# Bug: MSELoss with class indices instead of one-hot
output = model(x)  # shape: [32, 10]
loss = F.mse_loss(output, targets)  # targets shape: [32]

# Fix option 1: use CrossEntropyLoss (accepts class indices)
loss = F.cross_entropy(output, targets)

# Fix option 2: one-hot encode targets
targets_onehot = F.one_hot(targets, num_classes=10).float()
loss = F.mse_loss(output, targets_onehot)
Prevention: Use HeyTensor's Loss Functions Reference to check which loss functions accept which target formats.
SO: Common when switching between loss functions · 18K+ combined views
#12 · shape_mismatch
RuntimeError: Expected 3D (unbatched) or 4D (batched) input to conv2d, but got input of size: [32, 784]
shape_mismatch
Layers: nn.Conv2d
A Conv2d layer received a 2D flattened tensor instead of a 4D image tensor. This happens when you accidentally flatten before a convolution, or feed the wrong tensor to the wrong part of the network.
# Bug: feeding flattened data to Conv2d
x = x.view(x.size(0), -1)  # [32, 784] -- flattened too early
x = self.conv(x)  # expects [32, C, H, W]

# Fix: reshape back to image format
x = x.view(x.size(0), 1, 28, 28)  # [32, 1, 28, 28]
x = self.conv(x)

# Or: don't flatten before conv layers
Prevention: Use HeyTensor Chain Mode to plan your layer order. Flatten should come between the last conv/pool layer and the first Linear layer.
SO: Architecture ordering error · 12K+ combined views
#13 · shape_mismatch
RuntimeError: the derivative for 'target' is not implemented
shape_mismatch
Layers: Loss functions
You passed the target tensor where the prediction should go and vice versa. Loss functions like cross_entropy expect (input, target) where input is the model output with requires_grad=True. Swapping them causes this error.
# Bug: arguments swapped
loss = F.cross_entropy(targets, output)  # wrong order!

# Fix: correct argument order (predictions first, targets second)
loss = F.cross_entropy(output, targets)
Prevention: Remember the convention: loss_fn(predictions, targets). Always name your variables clearly to avoid confusion.
SO: Affects all loss functions · 10K+ combined views
#14 · shape_mismatch
RuntimeError: input.size(-1) must be equal to input_size. Expected 128, got 64
shape_mismatch
Layers: nn.LSTM, nn.GRU, nn.RNN
The LSTM/GRU's input_size parameter does not match the feature dimension of the input tensor. The input to an RNN should have shape (seq_len, batch, input_size) or (batch, seq_len, input_size) if batch_first=True.
# Bug: LSTM expects input_size=128 but got features=64
self.lstm = nn.LSTM(input_size=128, hidden_size=256)
x = torch.randn(10, 32, 64)  # seq=10, batch=32, features=64

# Fix: match input_size to actual feature dimension
self.lstm = nn.LSTM(input_size=64, hidden_size=256)
Prevention: Use HeyTensor's LSTM Calculator to verify input_size matches your embedding or previous layer's output dimension.
SO: Common in NLP pipelines · 15K+ combined views
#15 · shape_mismatch
RuntimeError: embed_dim must be divisible by num_heads
shape_mismatch
Layers: nn.MultiheadAttention, nn.TransformerEncoderLayer
The embed_dim parameter is not evenly divisible by num_heads. Each attention head operates on embed_dim/num_heads dimensions, so this must be an integer.
# Bug: 512 / 6 = 85.33 (not integer)
attn = nn.MultiheadAttention(embed_dim=512, num_heads=6)

# Fix: choose num_heads that divides embed_dim evenly
attn = nn.MultiheadAttention(embed_dim=512, num_heads=8)  # 512/8 = 64
Prevention: Use HeyTensor's MultiheadAttention Calculator which validates this constraint automatically.
SO: Common in Transformer architecture design · 20K+ combined views
#16 · shape_mismatch
RuntimeError: Expected 2D or 3D input, got 4D input
shape_mismatch
Layers: nn.Linear
A Linear layer received a 4D tensor (typical CNN output) without being flattened first. Linear expects 2D (batch, features) or 3D (batch, seq, features) input.
# Bug: forgot to flatten CNN output before Linear
x = self.conv_layers(x)  # shape: [32, 64, 7, 7]
x = self.fc(x)  # Linear expects 2D!

# Fix: add flatten between conv and linear
x = self.conv_layers(x)  # [32, 64, 7, 7]
x = x.view(x.size(0), -1)  # [32, 3136]
x = self.fc(x)  # Linear(3136, 10)
Prevention: Use HeyTensor's Flatten Calculator to compute the flattened size, then set Linear's in_features accordingly.
SO: CNN-to-MLP transition error · 25K+ combined views
#17 · shape_mismatch
RuntimeError: Number of BatchNorm features (128) does not match input features (64)
shape_mismatch
Layers: nn.BatchNorm2d, nn.BatchNorm1d
The num_features parameter of BatchNorm does not match the channel dimension of the input. BatchNorm2d's num_features should equal the number of channels (Conv2d's out_channels).
# Bug: BatchNorm features don't match conv output channels
self.conv = nn.Conv2d(3, 64, kernel_size=3)
self.bn = nn.BatchNorm2d(128)  # wrong: 128 != 64

# Fix: match num_features to conv out_channels
self.conv = nn.Conv2d(3, 64, kernel_size=3)
self.bn = nn.BatchNorm2d(64)  # correct
Prevention: Use HeyTensor's BatchNorm Calculator to verify feature dimensions match between layers.
SO: Common when modifying network architectures · 12K+ combined views
#18 · shape_mismatch
RuntimeError: view size is not compatible with input tensor's size and stride (at least one dimension spans across two contiguous subspaces). Use .reshape(...) instead.
shape_mismatch
Layers: Tensor.view, Tensor.transpose, Tensor.permute
The .view() operation requires the tensor to be stored contiguously in memory. After operations like .transpose() or .permute(), the tensor may no longer be contiguous, causing this error.
# Bug: view after transpose on non-contiguous tensor
x = torch.randn(32, 10, 64)
x = x.transpose(1, 2)  # now non-contiguous
x = x.view(32, -1)  # RuntimeError!

# Fix option 1: make contiguous first
x = x.transpose(1, 2).contiguous().view(32, -1)

# Fix option 2: use reshape (handles non-contiguous)
x = x.transpose(1, 2).reshape(32, -1)
Prevention: Use .reshape() instead of .view() when you are unsure about memory layout. See HeyTensor's View Compatibility Guide.
SO: view size not compatible · 1,143 views
#19 · memory_error
RuntimeError: CUDA out of memory. Tried to allocate 2.00 GiB (GPU 0; 11.17 GiB total capacity; 8.44 GiB already allocated; 1.38 GiB free; 9.12 GiB reserved in total by PyTorch)
memory_error
Layers: All (training context)
GPU memory is exhausted. The allocation request exceeds available VRAM. This is the most common CUDA error and typically happens during training when gradients and optimizer states consume memory in addition to model weights and activations.
# Fix 1: Reduce batch size
train_loader = DataLoader(dataset, batch_size=16)  # was 64

# Fix 2: Enable gradient checkpointing
model.gradient_checkpointing_enable()

# Fix 3: Use mixed precision (halves activation memory)
scaler = torch.cuda.amp.GradScaler()
with torch.cuda.amp.autocast():
    output = model(input)
    loss = criterion(output, target)

# Fix 4: Clear cache between operations
torch.cuda.empty_cache()

# Fix 5: Accumulate gradients over smaller batches
for i, (x, y) in enumerate(loader):
    loss = model(x, y) / accumulation_steps
    loss.backward()
    if (i + 1) % accumulation_steps == 0:
        optimizer.step()
        optimizer.zero_grad()
Prevention: Use HeyTensor's Memory Calculator to estimate memory requirements before training. Use Parameter Counter to check model size.
#20 · memory_error
RuntimeError: CUDA out of memory. Tried to allocate 240.00 MiB
memory_error
Layers: All (inference context)
Even relatively small allocations can fail when GPU memory is fragmented. PyTorch's caching allocator reserves blocks of memory, and fragmentation can prevent new allocations even when total free memory appears sufficient.
# Fix: wrap inference in no_grad to prevent gradient storage
with torch.no_grad():
    output = model(input)

# Also useful: delete intermediate tensors
del intermediate_tensor
torch.cuda.empty_cache()

# For inference, use torch.inference_mode() (faster than no_grad)
with torch.inference_mode():
    output = model(input)
Prevention: Always wrap inference code in torch.no_grad() or torch.inference_mode(). This prevents storing gradient computation graphs which can consume 2-3x more memory than the forward pass alone.
SO: CUDA OOM 240 MiB · 545 views
#21 · memory_error
RuntimeError: CUDA error: an illegal memory access was encountered
memory_error
Layers: All (CUDA context)
An out-of-bounds memory access on the GPU. This is often caused by indexing errors (e.g., embedding index out of range), CUDA/driver version mismatches, or hardware issues. Unlike CPU segfaults, CUDA illegal access errors are asynchronous and may appear after the offending operation.
# Common cause: embedding index exceeds num_embeddings
embed = nn.Embedding(1000, 128)  # indices 0-999 valid
x = torch.tensor([1500])  # out of range!

# Fix: clamp indices to valid range
x = x.clamp(0, embed.num_embeddings - 1)

# Debug: set CUDA_LAUNCH_BLOCKING=1 for synchronous errors
import os
os.environ['CUDA_LAUNCH_BLOCKING'] = '1'
# Now errors will point to the exact line
Prevention: Set CUDA_LAUNCH_BLOCKING=1 during debugging to get accurate error locations. Validate all indices before passing to Embedding layers.
SO: CUDA illegal memory access · 1,750 views
#22 · memory_error
torch.cuda.OutOfMemoryError: CUDA out of memory. Tried to allocate 16.00 GiB
memory_error
Layers: nn.Linear (large), Transformer models
A single allocation request is enormous, typically caused by an accidental fully-connected layer with extremely large dimensions, or loading a model too large for the GPU. A Linear(50000, 50000) layer alone requires ~9.3 GB in float32.
# Bug: accidentally huge Linear layer
self.fc = nn.Linear(50000, 50000)  # 50000*50000*4 bytes = 9.3 GB!

# Fix: review your architecture dimensions
# If this is an output projection, you likely meant:
self.fc = nn.Linear(512, 50000)

# For large language models: use quantization
from bitsandbytes import nn as bnb
self.fc = bnb.Linear8bitLt(in_features, out_features)

# Or use device_map="auto" for model parallelism
model = AutoModel.from_pretrained("large-model", device_map="auto")
Prevention: Use HeyTensor's Parameter Counter and Memory Calculator to estimate memory before instantiating large models.
#23 · memory_error
RuntimeError: CUDA out of memory (during validation/evaluation)
memory_error
Layers: All (validation loop)
Memory accumulates during validation because gradients are still being tracked. Without torch.no_grad(), each forward pass stores computation graphs that are never freed.
# Bug: no torch.no_grad() during validation
model.eval()
for x, y in val_loader:
    output = model(x)  # still tracking gradients!
    val_loss += criterion(output, y)

# Fix: disable gradient tracking
model.eval()
with torch.no_grad():
    for x, y in val_loader:
        output = model(x)
        val_loss += criterion(output, y).item()  # .item() returns Python scalar
Prevention: Always wrap validation loops in torch.no_grad(). Use .item() to extract scalar loss values to avoid accumulating graph references.
SO: OOM at end of training · 3,850 views
#24 · memory_error
RuntimeError: CUDA out of memory (memory leak during training)
memory_error
Layers: All (training loop)
Memory usage grows over epochs because loss tensors are being stored in a Python list instead of their scalar values. Each stored tensor retains a reference to the entire computation graph.
# Bug: storing tensor losses in a list (retains computation graph)
losses = []
for x, y in train_loader:
    loss = criterion(model(x), y)
    losses.append(loss)  # keeps graph alive!

# Fix: store scalar values with .item()
losses = []
for x, y in train_loader:
    loss = criterion(model(x), y)
    loss.backward()
    losses.append(loss.item())  # Python float, no graph reference
    optimizer.step()
    optimizer.zero_grad()
Prevention: Always call .item() when logging or storing loss values. Monitor GPU memory with torch.cuda.memory_allocated() to detect leaks early.
SO: Running out of memory · 2,681 views
#25 · memory_error
RuntimeError: Allocation on device cuda:0 would exceed allowed memory (set max_split_size_mb to avoid fragmentation)
memory_error
Layers: All (PyTorch allocator)
Memory fragmentation in PyTorch's CUDA caching allocator. Even though there is enough total free memory, it is split into non-contiguous blocks that are individually too small for the requested allocation.
# Fix 1: Set max_split_size_mb to reduce fragmentation
import os
os.environ['PYTORCH_CUDA_ALLOC_CONF'] = 'max_split_size_mb:128'

# Fix 2: Periodically clear cache
torch.cuda.empty_cache()

# Fix 3: Use expandable_segments (PyTorch 2.0+)
os.environ['PYTORCH_CUDA_ALLOC_CONF'] = 'expandable_segments:True'
Prevention: Set PYTORCH_CUDA_ALLOC_CONF before training starts. Use smaller batch sizes to reduce peak allocation sizes.
#26 · memory_error
UserWarning: RNN module weights are not part of single contiguous chunk of memory
memory_error
Layers: nn.LSTM, nn.GRU, nn.RNN
After loading an RNN model or using DataParallel, RNN weights may be stored in non-contiguous memory, degrading performance. This is a warning rather than an error but can significantly slow training.
# Fix: call flatten_parameters() after loading or in forward()
class MyModel(nn.Module):
    def __init__(self):
        super().__init__()
        self.lstm = nn.LSTM(128, 256, batch_first=True)

    def forward(self, x):
        self.lstm.flatten_parameters()
        output, (hn, cn) = self.lstm(x)
        return output
Prevention: Always call flatten_parameters() on RNN modules at the start of the forward pass, especially when using DataParallel.
#27 · memory_error
RuntimeError: DataLoader worker is killed by signal: Killed (out of system memory)
memory_error
Layers: DataLoader
The operating system's OOM killer terminated a DataLoader worker because the system ran out of RAM (not GPU memory). Each DataLoader worker loads and preprocesses a batch in a separate process, consuming system memory.
# Fix 1: Reduce number of workers
loader = DataLoader(dataset, num_workers=2)  # was 8

# Fix 2: Reduce prefetch factor
loader = DataLoader(dataset, num_workers=4, prefetch_factor=1)

# Fix 3: Use pin_memory=False if RAM is tight
loader = DataLoader(dataset, pin_memory=False)

# Fix 4: Use smaller images or reduce data augmentation memory usage
Prevention: Monitor system RAM during training. Start with num_workers=0 (main process) and increase gradually. Each worker duplicates your dataset in memory.
SO: Common on cloud instances with limited RAM · 15K+ combined views
#28 · memory_error
RuntimeError: [enforce fail at alloc_cpu.cpp] DefaultCPUAllocator: not enough memory
memory_error
Layers: All (CPU context)
System RAM is exhausted when loading or processing tensors on CPU. This often happens when loading large models, processing huge datasets without batching, or creating very large tensors.
# Fix 1: Load model with memory mapping
model = torch.load('model.pt', map_location='cpu', mmap=True)

# Fix 2: Process data in chunks
for chunk in torch.split(large_tensor, 1000):
    process(chunk)

# Fix 3: Use float16 to halve memory
model = model.half()

# Fix 4: Use memory-mapped datasets
from torch.utils.data import Dataset
class MMapDataset(Dataset):
    def __init__(self, path):
        self.data = np.memmap(path, dtype='float32', mode='r')
Prevention: Use HeyTensor's Memory Calculator to estimate total memory needs. Consider quantized or half-precision models for inference.
SO: Common with large model loading · 8K+ combined views
#29 · device_mismatch
RuntimeError: Expected all tensors to be on the same device, but found at least two devices, cuda:0 and cpu!
device_mismatch
Layers: All operations between tensors
You are performing an operation between a tensor on GPU and a tensor on CPU. All tensors in an operation must be on the same device. This commonly happens when new tensors are created without specifying the device, or when model parameters are on GPU but input data is still on CPU.
# Bug: model on GPU, input on CPU
model = model.cuda()
output = model(input)  # input is on CPU!

# Fix: move all inputs to the same device as the model
device = next(model.parameters()).device
input = input.to(device)
output = model(input)

# Or explicitly:
input = input.cuda()
target = target.cuda()
Prevention: Define a device variable at the top of your script: device = torch.device('cuda' if torch.cuda.is_available() else 'cpu') and use .to(device) consistently.
SO: The most common device error · 100K+ combined views across related questions
#30 · device_mismatch
RuntimeError: Attempting to deserialize object on a CUDA device but torch.cuda.is_available() is False
device_mismatch
Layers: torch.load
You are loading a model that was saved on GPU into an environment without CUDA support (e.g., a CPU-only machine or a machine with uninstalled CUDA drivers).
# Bug: loading GPU model on CPU-only machine
model = torch.load('model_gpu.pt')  # fails without CUDA

# Fix: map to CPU when loading
model = torch.load('model_gpu.pt', map_location='cpu')

# Or map to a specific device
model = torch.load('model_gpu.pt', map_location=torch.device('cpu'))

# Best practice when saving: save state_dict (device-agnostic)
torch.save(model.state_dict(), 'model.pt')
# Then load:
model.load_state_dict(torch.load('model.pt', map_location='cpu'))
Prevention: Always use map_location when loading models. Save state_dict() instead of the full model for portability.
SO: Deserialize on CUDA device · 9,260 views
#31 · device_mismatch
RuntimeError: CUDA unknown error - this may be due to an incorrectly set up environment
device_mismatch
Layers: CUDA initialization
CUDA initialization failed due to a driver/toolkit version mismatch, corrupted installation, or GPU hardware issue. This is not a code error but an environment configuration problem.
# Diagnostic steps:
import torch
print(torch.version.cuda)       # CUDA toolkit version
print(torch.cuda.is_available()) # should be True
print(torch.backends.cudnn.version())  # cuDNN version

# Fix 1: Check driver compatibility
# nvidia-smi shows driver CUDA version; it must be >= PyTorch CUDA version

# Fix 2: Reinstall PyTorch with matching CUDA version
# pip install torch --index-url https://download.pytorch.org/whl/cu121

# Fix 3: Restart Python/notebook (CUDA state is corrupted)
# A previous CUDA error may have left the GPU in a bad state
Prevention: Match PyTorch CUDA version to your nvidia-smi driver version. Check the PyTorch compatibility matrix before installing.
SO: CUDA unknown error · 3,909 views
#32 · device_mismatch
RuntimeError: CUDA error: device-side assert triggered
device_mismatch
Layers: nn.Embedding, nn.CrossEntropyLoss, indexing operations
An assertion failed inside a CUDA kernel. The most common cause is an out-of-range index: class label exceeding num_classes in CrossEntropyLoss, or an embedding index exceeding num_embeddings. The actual error is often an index error, but CUDA reports it as a device-side assert.
# Common cause: labels out of range for CrossEntropyLoss
# CrossEntropyLoss expects labels in [0, num_classes-1]
output = model(x)  # shape [32, 10] (10 classes)
target = torch.tensor([10])  # label 10 is out of range (max is 9)!

# Fix: validate labels
assert target.max() < num_classes
assert target.min() >= 0

# Debug: run on CPU first to get a clear error message
model = model.cpu()
output = model(x.cpu())
loss = criterion(output, target.cpu())  # will show clear IndexError
Prevention: Set CUDA_LAUNCH_BLOCKING=1 and run on CPU to diagnose. Always validate that class labels are in range [0, num_classes-1] before computing loss.
SO: device-side assert · 1,082 views
#33 · device_mismatch
RuntimeError: Input type (torch.cuda.FloatTensor) and weight type (torch.FloatTensor) should be the same
device_mismatch
Layers: All (model vs input device)
The model weights are on CPU but the input tensor was moved to GPU (or vice versa). This is a variant of the device mismatch error reported through the type system.
# Bug: input on GPU, model on CPU
model = MyModel()  # CPU by default
x = x.cuda()
output = model(x)  # RuntimeError!

# Fix: move model to same device as input
model = model.cuda()
output = model(x)

# Best practice: use a device variable
device = torch.device('cuda' if torch.cuda.is_available() else 'cpu')
model = model.to(device)
x = x.to(device)
Prevention: Use a single device variable throughout your code and call .to(device) on both model and data.
SO: Variant of the general device mismatch error · 50K+ combined views
#34 · device_mismatch
RuntimeError: Gradients are not CUDA tensors
device_mismatch
Layers: Optimizer, custom loss functions
Gradients were computed on CPU but the optimizer expects CUDA gradients. This happens when a custom loss function or part of the computation creates CPU tensors that contribute to the gradient graph.
# Bug: creating tensors in loss function without specifying device
def custom_loss(pred, target):
    weights = torch.tensor([1.0, 2.0, 3.0])  # CPU!
    return (weights * (pred - target) ** 2).mean()

# Fix: create tensors on the correct device
def custom_loss(pred, target):
    weights = torch.tensor([1.0, 2.0, 3.0], device=pred.device)
    return (weights * (pred - target) ** 2).mean()
Prevention: When creating tensors inside forward/loss functions, always use device=input.device to match the device of existing tensors.
#35 · device_mismatch
RuntimeError: Expected is_sm80 || is_sm90 to be true, but got false
device_mismatch
Layers: Flash Attention, Transformer operations
Flash Attention or a CUDA-optimized kernel requires a specific GPU architecture (SM80 for Ampere/A100, SM90 for Hopper/H100) but your GPU has an older architecture. This is common when using libraries that default to Flash Attention.
# Fix 1: Disable flash attention
# For Hugging Face Transformers:
model = AutoModel.from_pretrained("model", attn_implementation="eager")

# Fix 2: Use a compatible attention backend
import torch.backends.cuda
torch.backends.cuda.enable_flash_sdp(False)

# Fix 3: Use math attention fallback
with torch.backends.cuda.sdp_kernel(
    enable_flash=False, enable_math=True, enable_mem_efficient=True
):
    output = model(input)
Prevention: Check your GPU architecture before using Flash Attention: torch.cuda.get_device_properties(0).major should be >= 8 for SM80.
SO: Expected is_sm80 || is_sm90 · 2,790 views
#36 · device_mismatch
RuntimeError: Caught RuntimeError in replica 0 on device 0
device_mismatch
Layers: nn.DataParallel
An error occurred inside nn.DataParallel on one of the GPU replicas. DataParallel wraps errors, making them hard to debug. The actual error is usually a shape mismatch, device mismatch, or type error on one of the replicas.
# Debug: temporarily remove DataParallel to see the real error
# model = nn.DataParallel(model)  # comment out
model = model.cuda()  # single GPU
output = model(input)  # now error message is clear

# Better alternative: use DistributedDataParallel
model = torch.nn.parallel.DistributedDataParallel(
    model, device_ids=[local_rank]
)
Prevention: Debug on a single GPU first, then wrap in DataParallel. Use DistributedDataParallel instead of DataParallel for better error messages and performance.
#37 · gradient_error
RuntimeError: one of the variables needed for gradient computation has been modified by an inplace operation
gradient_error
Layers: All (in-place operations: +=, relu_, etc.)
A tensor that PyTorch needs for backpropagation was modified in-place. Common in-place operations include +=, .relu_(), tensor[i] = val, and any operation ending with _. PyTorch stores references to intermediate tensors; modifying them invalidates the gradient computation.
# Bug: in-place operations break autograd
x = self.linear(input)
x += self.bias  # in-place add!
x = x.relu_()   # in-place relu!

# Fix: use out-of-place operations
x = self.linear(input)
x = x + self.bias    # creates new tensor
x = x.relu()         # creates new tensor (no underscore)
# Or:
x = torch.relu(x)    # functional form, always out-of-place
Prevention: Avoid all in-place operations during training. Use torch.autograd.set_detect_anomaly(True) to find the exact line causing the problem.
#38 · gradient_error
RuntimeError: Trying to backward through the graph a second time
gradient_error
Layers: All (multiple backward passes)
You called .backward() twice on the same computation graph. After the first backward pass, PyTorch frees intermediate buffers to save memory. The second call finds those buffers gone.
# Bug: two backward calls on same graph
loss1 = criterion(model(x), y)
loss1.backward()
loss2 = some_regularization(model)
loss2.backward()  # graph from loss1 already freed!

# Fix option 1: retain graph for first backward
loss1.backward(retain_graph=True)
loss2.backward()

# Fix option 2 (better): combine losses before backward
loss = criterion(model(x), y) + some_regularization(model)
loss.backward()  # single backward pass

# Fix option 3: recompute forward pass
loss1 = criterion(model(x), y)
loss1.backward()
optimizer.step()
optimizer.zero_grad()
loss2 = criterion(model(x), y)  # fresh forward pass
loss2.backward()
Prevention: Combine all losses into a single scalar before calling .backward(). Only use retain_graph=True if you genuinely need multiple backward passes (e.g., adversarial training).
#39 · gradient_error
RuntimeError: element 0 of tensors does not require grad and does not have a grad_fn
gradient_error
Layers: All (requires_grad issue)
You called .backward() on a tensor that was not created through differentiable operations. This happens when you detach a tensor, use torch.no_grad(), or create tensors without requires_grad=True.
# Bug: calling backward on non-differentiable tensor
x = torch.tensor([1.0, 2.0, 3.0])  # requires_grad=False by default
loss = x.sum()
loss.backward()  # RuntimeError!

# Fix: enable gradient tracking
x = torch.tensor([1.0, 2.0, 3.0], requires_grad=True)
loss = x.sum()
loss.backward()

# Common mistake: using .data or .detach() too early
pred = model(x).detach()  # breaks gradient chain!
loss = criterion(pred, target)
loss.backward()  # error: no grad_fn
Prevention: Do not call .detach() or .data on tensors that are still needed for backpropagation. Check tensor.requires_grad before calling .backward().
SO: does not require grad · 3,794 views
#40 · gradient_error
RuntimeError: Function MmBackward returned an invalid gradient at index 0 - got [4096, 32] but expected shape compatible with [4096, 512]
gradient_error
Layers: Custom autograd functions, nn.Linear
A custom autograd backward function returned a gradient tensor with the wrong shape. The gradient shape must match the shape of the corresponding forward input.
# Bug: custom backward returning wrong shape
class MyFunc(torch.autograd.Function):
    @staticmethod
    def forward(ctx, input, weight):
        ctx.save_for_backward(input, weight)
        return input @ weight.T

    @staticmethod
    def backward(ctx, grad_output):
        input, weight = ctx.saved_tensors
        grad_input = grad_output @ weight  # shape must match input
        grad_weight = input.T @ grad_output  # shape must match weight
        return grad_input, grad_weight  # wrong if shapes don't match

# Fix: verify gradient shapes match input shapes
# grad_input.shape == input.shape
# grad_weight.shape == weight.shape
Prevention: When writing custom autograd functions, verify that each gradient returned in backward() has the same shape as the corresponding input from forward().
#41 · gradient_error
RuntimeError: a leaf Variable that requires grad is being used in an in-place operation
gradient_error
Layers: Parameter initialization, weight modification
You attempted an in-place operation on a leaf tensor (like a model parameter) that requires gradients. PyTorch prohibits this because it would invalidate gradient computation.
# Bug: in-place modification of model parameters
model.weight.data.fill_(1.0)  # .data bypasses autograd (OK but fragile)
model.weight.fill_(1.0)  # in-place on leaf variable, RuntimeError!

# Fix: use .data or torch.no_grad() for parameter modification
with torch.no_grad():
    model.weight.fill_(1.0)

# Or use .data (less safe but works)
model.weight.data.fill_(1.0)

# For custom initialization:
def init_weights(m):
    if isinstance(m, nn.Linear):
        torch.nn.init.xavier_uniform_(m.weight)  # uses .data internally
model.apply(init_weights)
Prevention: Use torch.no_grad() context manager or nn.init functions when modifying model parameters. Never modify leaf variables in-place during the forward pass.
SO: Common during model initialization and fine-tuning · 8K+ combined views
#42 · gradient_error
RuntimeError: Expected to mark a variable ready only once (DistributedDataParallel)
gradient_error
Layers: nn.DistributedDataParallel
A parameter was used multiple times in the forward pass, or some parameters were not used at all. DDP expects each parameter to receive exactly one gradient during backward. Unused parameters or shared parameters cause this error.
# Fix 1: set find_unused_parameters=True
model = torch.nn.parallel.DistributedDataParallel(
    model, device_ids=[local_rank],
    find_unused_parameters=True
)

# Fix 2: if parameters are truly unused, remove them
# Audit your forward() to ensure all parameters are used

# Fix 3: for shared parameters, use static_graph
model = torch.nn.parallel.DistributedDataParallel(
    model, device_ids=[local_rank],
    static_graph=True
)
Prevention: Ensure every parameter in your model is used in every forward pass. Use find_unused_parameters=True only as a last resort since it adds overhead.
#43 · gradient_error
RuntimeError: one of the variables needed for gradient computation has been modified by an inplace operation: [torch.cuda.FloatTensor [1, 64, 7, 7]], which is output 0 of ReluBackward0
gradient_error
Layers: nn.ReLU(inplace=True)
Using nn.ReLU(inplace=True) overwrites the input tensor, which may be needed for gradient computation by a preceding layer. This is especially problematic in residual connections where the same tensor is used in both the skip connection and the main path.
# Bug: inplace ReLU in residual connection
class ResBlock(nn.Module):
    def forward(self, x):
        identity = x
        out = self.conv1(x)
        out = self.bn1(out)
        out = F.relu(out, inplace=True)  # overwrites out
        out = self.conv2(out)
        out += identity  # in-place add on top of inplace relu
        return out

# Fix: use inplace=False
out = F.relu(out, inplace=False)
# And use out-of-place addition:
out = out + identity  # creates new tensor
Prevention: Use inplace=False (the default) for ReLU in residual networks. The memory savings from inplace=True are minimal compared to the debugging cost.
#44 · gradient_error
RuntimeError: grad can be implicitly created only for scalar outputs
gradient_error
Layers: All (non-scalar loss)
You called .backward() on a non-scalar tensor. PyTorch's autograd requires a scalar (single-element tensor) as the starting point for backpropagation. If your loss is not reduced to a single number, this error occurs.
# Bug: backward on non-scalar
loss = model(x) - y  # shape: [32, 10], not scalar!
loss.backward()  # RuntimeError!

# Fix: reduce to scalar
loss = (model(x) - y).pow(2).mean()  # scalar
loss.backward()

# Or pass gradient argument for non-scalar backward:
output = model(x)  # [32, 10]
output.backward(torch.ones_like(output))  # provides gradient shape
Prevention: Ensure your loss function returns a scalar. Use .mean() or .sum() to reduce batch losses. Use HeyTensor's Loss Functions Reference to verify reduction behavior.
SO: Common when implementing custom loss functions · 20K+ combined views
#45 · gradient_error
RuntimeError: a view of a leaf Variable that requires grad is being used in an in-place operation
gradient_error
Layers: Tensor indexing, slicing
You performed an in-place operation on a slice or view of a parameter tensor. Views share memory with the original tensor, so modifying a view modifies the parameter in-place, breaking autograd.
# Bug: in-place operation on parameter slice
model.weight[:, 0] = 0  # in-place modification via view!

# Fix: use torch.no_grad() context
with torch.no_grad():
    model.weight[:, 0] = 0

# Or create a new tensor with the modification
mask = torch.ones_like(model.weight)
mask[:, 0] = 0
# Use mask in forward pass instead of modifying weight
Prevention: Never assign to slices of parameter tensors during forward/backward. Use masks or torch.no_grad() for weight manipulation.
SO: Common in weight pruning and masking · 5K+ combined views
#46 · gradient_error
UserWarning: Using a target size (torch.Size([32])) that is different to the input size (torch.Size([32, 1])). This will likely lead to incorrect results due to broadcasting.
gradient_error
Layers: nn.BCELoss, nn.MSELoss
The target shape does not match the prediction shape. While PyTorch will broadcast and compute a result, the gradients will be wrong, leading to incorrect training. The loss may appear to decrease but the model will not learn correctly.
# Bug: shape mismatch causes silent broadcasting
pred = model(x)  # shape: [32, 1]
target = labels   # shape: [32]
loss = F.binary_cross_entropy(pred, target)  # broadcasts incorrectly

# Fix: match shapes explicitly
target = labels.unsqueeze(1)  # [32] -> [32, 1]
# Or squeeze prediction:
pred = model(x).squeeze(1)  # [32, 1] -> [32]
Prevention: Always verify that prediction and target shapes match exactly before computing loss. Broadcasting in loss functions is almost always a bug.
SO: Silent training bug (model trains but poorly) · 10K+ combined views
#47 · type_error
RuntimeError: expected scalar type Float but found Half
type_error
Layers: All (mixed precision)
An operation received a float16 (half precision) tensor where float32 was expected. This commonly happens when using AMP (automatic mixed precision) incorrectly, or when some model components are manually cast to half but others are not.
# Bug: manually casting to half without autocast
model = model.half()
x = x.float()  # float32
output = model(x)  # half model, float input -> error

# Fix option 1: use autocast (recommended)
with torch.cuda.amp.autocast():
    output = model(x)  # automatic dtype management

# Fix option 2: match dtypes manually
x = x.half()  # or model = model.float()

# Fix option 3: cast specific layers
model.layer_norm = model.layer_norm.float()  # keep in float32
Prevention: Use torch.cuda.amp.autocast() for mixed precision instead of manual .half() casting. Autocast handles dtype conversion automatically.
#48 · type_error
RuntimeError: expected scalar type Long but found Float
type_error
Layers: nn.CrossEntropyLoss, nn.NLLLoss, nn.Embedding
The target tensor or index tensor has the wrong dtype. CrossEntropyLoss and NLLLoss expect Long (int64) targets. Embedding expects Long indices. Passing float tensors triggers this error.
# Bug: float targets for CrossEntropyLoss
targets = torch.tensor([0.0, 1.0, 2.0])  # float!
loss = F.cross_entropy(output, targets)  # expects Long

# Fix: cast targets to long
targets = targets.long()
# Or create with correct dtype:
targets = torch.tensor([0, 1, 2], dtype=torch.long)

# For Embedding:
indices = torch.tensor([1, 5, 3], dtype=torch.long)
output = embedding(indices)
Prevention: Classification labels should always be torch.long (int64). Embedding indices must also be torch.long.
SO: Very common for beginners · 30K+ combined views
#49 · type_error
RuntimeError: expected scalar type Double but found Float
type_error
Layers: All (numpy interop)
A tensor created from a numpy array has dtype float64 (Double) because numpy defaults to float64, while PyTorch model parameters default to float32. Operations between them fail.
# Bug: numpy default is float64
import numpy as np
data = np.array([1.0, 2.0, 3.0])  # float64
x = torch.from_numpy(data)  # torch.float64 (Double)
output = model(x)  # model expects float32!

# Fix: explicitly convert to float32
x = torch.from_numpy(data).float()  # cast to float32
# Or:
x = torch.tensor(data, dtype=torch.float32)
Prevention: Always call .float() on tensors created from numpy arrays. Or set numpy dtype: np.array(data, dtype=np.float32).
SO: Common in data preprocessing · 25K+ combined views
#50 · type_error
RuntimeError: "nll_loss_forward_reduce_cuda_kernel_2d_index" not implemented for 'Int'
type_error
Layers: nn.CrossEntropyLoss, nn.NLLLoss
The target tensor is int32 instead of the required int64 (Long). Some data loading operations produce int32 labels by default.
# Bug: int32 targets instead of int64
targets = torch.tensor([0, 1, 2], dtype=torch.int32)
loss = F.cross_entropy(output, targets)  # needs Long!

# Fix: cast to long
targets = targets.long()

# In DataLoader: ensure labels are long
class MyDataset(Dataset):
    def __getitem__(self, idx):
        return self.data[idx], torch.tensor(self.labels[idx], dtype=torch.long)
Prevention: Always use dtype=torch.long for classification labels in your Dataset class.
SO: Common with custom datasets · 15K+ combined views
#51 · type_error
RuntimeError: Input type (torch.FloatTensor) and weight type (torch.cuda.HalfTensor) should be the same
type_error
Layers: All (device + dtype mismatch)
This combines both a device and dtype mismatch. The input is float32 on CPU while the model weights are float16 on GPU. Two things need fixing: the device and the dtype.
# Bug: float32 CPU input, half GPU model
model = model.half().cuda()
x = torch.randn(1, 3, 224, 224)  # float32, CPU

# Fix: match both device and dtype
x = x.half().cuda()
output = model(x)

# Better: use autocast for automatic dtype handling
model = model.cuda()  # keep float32
with torch.cuda.amp.autocast():
    output = model(x.cuda())  # autocast handles half precision
Prevention: Use torch.cuda.amp.autocast() for mixed precision instead of manual .half() casting.
SO: Combines device and type errors · 8K+ combined views
#52 · type_error
RuntimeError: result type Float can't be cast to the desired output type Long
type_error
Layers: torch.where, conditional operations
An operation tries to write float values into a Long (int64) tensor, which would lose precision. This happens with torch.where() or conditional assignments when tensor dtypes are mixed.
# Bug: torch.where with mixed types
mask = torch.tensor([True, False, True])
a = torch.tensor([1.5, 2.5, 3.5])  # float
b = torch.tensor([0, 0, 0])        # int/long
result = torch.where(mask, a, b)    # can't cast float to long

# Fix: ensure both tensors have the same dtype
b = torch.tensor([0.0, 0.0, 0.0])  # float
result = torch.where(mask, a, b)

# Or cast explicitly:
result = torch.where(mask, a, b.float())
Prevention: Ensure all tensors in conditional operations have the same dtype. Cast to the higher-precision type before the operation.
SO: Common in custom loss and masking operations · 10K+ combined views

Methodology

This database was compiled using the following process:

Data collected: April 7, 2026 · Stack Overflow API v2.3 · PyTorch version: 2.x

Frequently Asked Questions

What is the most common PyTorch RuntimeError?

The most common PyTorch RuntimeError is "mat1 and mat2 shapes cannot be multiplied." This occurs when a Linear layer's in_features parameter doesn't match the actual size of the input tensor's last dimension. It accounts for roughly 23% of all shape-related errors on Stack Overflow.

How do I fix CUDA out of memory in PyTorch?

Reduce batch size, use torch.cuda.amp for mixed precision training, enable gradient checkpointing, wrap inference in torch.no_grad(), and use .item() when logging losses. Use HeyTensor's Memory Calculator to estimate requirements.

Why does PyTorch say expected scalar type Float but found Half?

This error occurs when you mix float32 and float16 tensors. Use torch.cuda.amp.autocast() instead of manual .half() casting to handle dtype conversion automatically.

What causes inplace operation gradient errors?

In-place operations (like +=, .relu_(), tensor[i] = val) modify tensors that PyTorch needs for backpropagation. Replace with out-of-place versions: x = x + y instead of x += y.

How do I debug Trying to backward through the graph a second time?

This means you called .backward() twice on the same graph. Combine all losses before calling backward, or pass retain_graph=True to the first backward call if you need multiple passes.

How was this database compiled?

We queried the Stack Overflow API for PyTorch RuntimeError questions across 5 categories, analyzed 76 unique questions, and supplemented with known common errors from PyTorch documentation and GitHub issues. Each error was verified against PyTorch 2.x.

About This Research

This page is part of HeyTensor, a free suite of PyTorch and deep learning utilities. For interactive shape calculation, use the Tensor Shape Calculator with Chain Mode to trace shapes through your network. For matrix math behind neural networks, visit ML3X. For encoding tools, try KappaKit. Model training dashboards and experiment tracking are available at EpochPilot.

Contact

Built and maintained by Michael Lip. Email [email protected] or visit the project on GitHub.

📥 Download Raw Data

Free to use under CC BY 4.0 license. Cite this page when sharing.