Convexity of sigmoid-based squared error loss

796 Views Asked by At

Assume $w, a_1,a_2 \in \mathbb{R}^d$ and $\sigma = \dfrac{1}{1+e^{-x}}$ the sigmoid function. Is the following squared difference a convex function?

$$J(w)= (\sigma(w^Ta_1)\times \sigma(w^T a_2)-c)^2$$

where $c \in \mathbb{R}$ is some constant.