Question 1: Short answer
mediumAI-checkedPyTorchYou want three independent linear layers in a row and write:
layer = nn.Linear(8, 8)
net = nn.Sequential(*[layer] * 3)
print(sum(p.numel() for p in net.parameters()))
What does the last line print?
1 question from PyTorch
1 question · 1 min · score and explanations at the end
You want three independent linear layers in a row and write:
layer = nn.Linear(8, 8)
net = nn.Sequential(*[layer] * 3)
print(sum(p.numel() for p in net.parameters()))
What does the last line print?