Multi-layer perceptron. Consider the following neural networ…
Multi-layer perceptron. Consider the following neural network defined in PyTorch. class NeuralNetwork(nn.Module): def __init__(self): super().__init__() self.linear_relu_stack = nn.Sequential( nn.Linear(20, 100), nn.ReLU(), nn.Linear(100, 100), nn.ReLU(), nn.Linear(100, 3), ) def forward(self, x): logits = self.linear_relu_stack(x) return logits (a) (2 pts) How many learnable layers does the neural network have? Count only layers that contain trainable parameters. [a] (b) (2 pts) How many parameters does the neural network have? You may disregard bias/offset terms. [b]
Read Details