Complete the code to define the forward method input parameter.
def forward(self, [1]): return x * 2
The forward method takes the input tensor as a parameter, commonly named x.
Complete the code to apply a linear layer inside the forward method.
def forward(self, x): out = self.[1](x) return out
The linear layer is applied by calling self.linear(x) inside the forward method.
Fix the error in the forward method to correctly apply ReLU activation.
def forward(self, x): out = self.linear(x) out = [1](out) return out
The ReLU activation is applied as self.relu(out) if self.relu is defined in __init__.
Fill both blanks to complete the forward method with two layers and activation.
def forward(self, x): out = self.[1](x) out = self.[2](out) return out
linear2 first instead of linear1.dropout instead of activation.The input is passed through linear1 then activated by relu.
Fill all three blanks to complete the forward method with two linear layers and activation.
def forward(self, x): out = self.[1](x) out = self.[2](out) out = self.[3](out) return out
The input goes through linear1, then relu activation, then linear2 layer.
