human
I am working on the file "DL0110EN/3.2.1.logistic_regression_with_mean_square_error_v2.ipynb".
The first task is:
<!--Empty Space for separating topics-->

<h2 id="Model_Cost">Create the Model and Total Loss Function (Cost)</h2>

Create a custom module for logistic regression:
Can you write Python code for it?
 ... Write me a the Python code you requested?
assistant
#Here is the Python code you requested.

# Create logistic_regression class

class logistic_regression(nn.Module):
    
    # Construstor
    def __init__(self,n_inputs):
        super(logistic_regression, self).__init__()
        self.linear = nn.Linear(n_inputs, 1)
        
    # Prediction    
    def forward(self, x):
        yhat = torch.sigmoid(self.linear(x))
        return yhat