How can I index a matrix in Teano with an index vector?
To be precise:
- v is of type theano.tensor.vector (for example, [0,2])
- A is of type anano.tensor.matrix (for example, [[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 the list of indices into a matrix of single-row row vectors, where the indices indicate a hot position. My initial attempt was to allow A = theano.tensor.eye and index it using an index vector.
source share