add loss type in configure