human
Write me a the Python program you requested given the following:
I am working on the file "18-11-22-Deep-Learning-with-PyTorch/02-Introduction to PyTorch/Part 2 - Neural Networks in PyTorch.ipynb".
The first task is:
Building networks with PyTorch
PyTorch provides a module nn that makes building networks much simpler. Here I'll show you how to build the same one as above with 784 inputs, 256 hidden units, 10 output units and a softmax output.
Can you write Python program for it?
assistant
#Here is the Python program you requested.

from torch import nn

class Network(nn.Module):
    def __init__(self):
        # Important!
        # Without it, PyTorch will not be able to follow the setup!
        super().__init__()
        
        # Inputs to hidden layer linear transformation
        self.hidden = nn.Linear(784, 256)
        # Output layer, 10 units - one for each digit
        self.output = nn.Linear(256, 10)
        
        # Define sigmoid activation and softmax output 
        self.sigmoid = nn.Sigmoid()
        self.softmax = nn.Softmax(dim=1)
        
    def forward(self, x):
        # Pass the input tensor through each of our operations
        x = self.hidden(x)
        x = self.sigmoid(x)
        x = self.output(x)
        x = self.softmax(x)
        
        return x