For tensorflow.js, I got 3 locations in formats:[location id, location x, location y]
input=[
['a',0,0],
['b',3,0],
['c',0,4]
]
I want shortest route distance to go through all locations, by creating permutations, then calculate each route total distance, then select shortest route would be c→a→b
output=['c','a','b']
But how to set location id as label?
const tfInput = tf.tensor3d(input)
const tfOutput = tf.tensor(output)
const model = tf.sequential();
model.add(tf.layers.dense({ units: 1, inputShape: [1,3,3] }))
Uncaught Error: tensor3d() requires values to be number[][][] or flat/TypedArray