updated L2, logistic

L2 still gives NaN, don’t know why