# Best neural-network loss function for multiple output when order doesn't matter?

I have a problem where my network is to output 3 values, and they are supposed to match three target values, but I don't care about the ordering. At present, I created a loss function which computes all 6 possible ways to match them up and returns the lowest. Is this the best approach? I could see this being a confusing surface for the optimizer to navigate. Another option would be to define a non-arbitrary order (e.g. lowest to highest) and require the network to always output that way, although in my case the values are 2D coordinates, so the ordering would be slightly more abstract, perhaps distance from origin.

• If its a regression problem ( sice map coordinates are continous variables), you can always use Mean Squared Error loss function. Also the NN outputs 3 values which could be placed as ( coordinate1 , coordinate2 , value3 ). May 4 '19 at 2:39
• I'm not sure I understand. If the right answer as [(a,b), (c,d), (e,f)] and the NN outputs [((e,f), (a,b), (c,d)], I need a loss function that returns 0.0, since order doesn't matter. That's the crux of my question. I am using MSE per coordinate. May 4 '19 at 14:22