Skip to content
ml-recall

#shape-mismatch

1 question from PyTorch

Timed test

1 question · 1 min · score and explanations at the end

Take a test
Q 1 / 1Score 0 / 0

Question 1: Single choice

easyAI-checkedPyTorch
net = nn.Sequential(nn.Linear(20, 256), nn.ReLU(), nn.Linear(128, 10))
X = torch.rand(2, 20)

The second linear layer expects 128 inputs, but the first one produces 256. What happens?

Choose one option