I am trying to use the keras MixUp layer for mixing together images, but I’m not understanding the output. Here’s what I have:
import keras, keras_cv
import tensorflow as tf
(images, labels), _ = keras.datasets.cifar10.load_data()
N_types = 12 # actual number doesn't matter
N_images = 10
images, labels = images[:N_images], labels[:N_images]
labels_one_hot = tf.cast(tf.one_hot(labels, N_types), tf.float32)
mixup = keras_cv.layers.MixUp(alpha=0.8)
mix_dict = mixup({'images':images,'labels':labels_one_hot})
mix_dict['images']
is a tensor of shape (10,32,32,3) but mix_dict['labels']
has shape (10,10,12) which I don’t understand, and all the entries are still one hot-encoded, when I thought they would be 2-hot. Can someone explain?