Difference between tf.keras.backend.one_hot and keras.utils.to_categorical
The difference is the input and output.
The utils.to_categorical function takes a vector as input and returns a matrix with one hot encoded rows.
The  backend.one_hot can be called as a transformation step inbetween a compute sequence of tensors.
It takes nD tensor as input and returns n+1 D one hot encoded tensor.