I am trying to convert a vector of floats into a matrix similar to one hot encoding, but I want this to happen in non-discrete space to retain gradients. Therefore I am only able to use keras backend functions.
For example I want the vector
to be converted into a matrix like this:
But I have no clue how this procedure is called, as it is certainly not one-hot-encoding, or how this could be implemented.
Edit: After spending an afternoon outside, I came up with a more algorithmic definition. I am not sure if my notation is correct and most importantly how I implement it, but I think it makes the question more clear: