sigmoid cost modified to use kl properly