How can I index a matrix in Theano by a vector of indices?
More precisely, say that:
- v has type theano.tensor.vector (e.g. [0,2])
- A has type theano.tensor.matrix (e.g. [[1,0,0], [0,1,0], [0,0,1]])
The desired result is [[1,0,0], [0,0,1]].
I mention that my goal is to convert a list of indices into a matrix of one-hot row vectors, where the indices indicate the hot position. My initial attempt was to let A = theano.tensor.eye and index it using the vector of indices.