add weighted cross entropy to forward_cpu