Skip to content
ml-recall

#nn-linear

3 questions from PyTorch

Timed test

3 questions · 3 min · score and explanations at the end

Take a test
Q 1 / 3Score 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