Machine learning, regression and transformed parameters

Lets say we have the following model y = sigmoid(w1)*x1 + w2*x3 + w3*x3 and we want to fit it in a dataset (xn, yn). How can we do it? (e.g using gradient descent? and what could be the error function?) Same question for model y = sigmoid(w11, w12)*x1 + w2*x3 + w3*x3 Thank you very much