Skip to content

add text here

import torch
import torch.nn as nn

input_tensor = torch.Tensor([[3, 4, 6, 2, 3, 6, 8, 9]])

# Implement a small neural network with exactly two linear layers
model = nn.Sequential(
  nn.Linear(8,5),
  nn.Linear(1,1),

)

output = model(input_tensor)
print(output)