Solution (source code)

= Solution

Multinomial <logistic regression> is the network with no hidden layer: $z=Wx+b$ followed by softmax. Binary logistic classification uses one logit $w^Tx+b$ followed by the sigmoid function.