Is there a deep learning method for 3D labels?


As the question says, I want to feed labels into a neural net that are three dimensional. Let's say that I have 3 possible labels and each one of my data points corresponds to a percentage of those labels. e.g, my first datapoint contains 20% of label A, 30% of label B, and 50% of label C.

Is there any architecture able to deal with this shape of label data?

La Cordillera

Posted 2020-07-19T14:02:11.383

Reputation: 103



Since the probability are summing up to zero, so you can simply treat it as Multi-class problem and use a network with Softmax at the end.

Last layer and compile -

model.add(keras.layers.Dense( 3, activation="softmax"))
model.compile( optimizer='adam, loss="categorical_crossentropy", metrics='accuracy')

Metrics - Accuracy is not appropriate. Define a custom metrics based on the interpretation of 3 probabilities

The labels will be as per the probability-
e.g. This is for MNIST 10 digits -

Digit 1 - [0.05, 0.55, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05]

Prediction - [0.064, 0.356, 0.059, 0.069, 0.068, 0.050, 0.044, 0.122, 0.064, 0.101]

Code for MNIST - Colab link


Posted 2020-07-19T14:02:11.383

Reputation: 3 634

Do you have a MNIST worked example with this label input that I could run?? – La Cordillera – 2020-07-20T06:01:13.270

Added in the answer. – 10xAI – 2020-07-20T06:44:17.433

Thanks! I can't accept the answer because I have low rep, but well, your solution works! – La Cordillera – 2020-07-20T07:01:11.663

Reputation is for upvote not Accept. You should see a Green check – 10xAI – 2020-07-20T07:18:55.083