fixed weighted euc loss cpu_only