human
Give me a Python program to print statement inside the model to monitor the size of input and output tensors given the following:
3. Simple Model
For the demo, our model just gets an input, performs a linear operation, and gives an output. However, you can use DataParallel on any model (CNN, RNN, CapsuleNet, etc.)
We've placed a print statement inside the model to monitor the size of input and output tensors. Please pay attention to what is printed at batch rank 0.
assistant
#Here is Python program to print statement inside the model to monitor the size of input and output tensors.
class Model(nn.Module):
    # Our model
    
    def __init__(self, input_size, output_size):
        super(Model, self).__init__()
        self.fc = nn.Linear(input_size, output_size)
        
    def forward(self, input):
        output = self.fc(input)
        print("  In Model; input size", input.size(), 
              "output size", output.size())
        return output