human
I am working on the file "DL0110EN/3.2.2.bad_inshilization_logistic_regression_with_mean_square_error.ipynb".
The first task is:
<a id="ref1"></a>
<h2 align=center>Create the Model and Total Loss Function (cost) </h2>

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

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