edit nn Compute cost