<p>Referring to the given index variable, this layer selects rows from the
input variables to construct a multiplex variable. Assuming that there are
<spanclass="math">\(m\)</span> input variables and <spanclass="math">\(I_i\)</span> represents the i-th input
variable and <spanclass="math">\(i\)</span> is in [0, <spanclass="math">\(m\)</span>). All input variables are
tensors with same shape [<spanclass="math">\(d_0\)</span>, <spanclass="math">\(d_1\)</span>, ..., <spanclass="math">\(d_R\)</span>].
Please note that rank of the input tensor should be at least 2. Each input
variable will be treated as a 2-D matrix with shape [<spanclass="math">\(M\)</span>, <spanclass="math">\(N\)</span>]
where <spanclass="math">\(M\)</span> for <spanclass="math">\(d_0\)</span> and <spanclass="math">\(N\)</span> for <spanclass="math">\(d_1\)</span> * <spanclass="math">\(d_2\)</span>
* ... * <spanclass="math">\(d_R\)</span>. Let <spanclass="math">\(I_i[j]\)</span> be the j-th row of the i-th input
variable. The given index variable should be a 2-D tensor with shape
[<spanclass="math">\(M\)</span>, 1]. Let <cite>ID[i]</cite> be the i-th index value of the index variable.
Then the output variable will be a tensor with shape [<spanclass="math">\(d_0\)</span>,
<spanclass="math">\(d_1\)</span>, ..., <spanclass="math">\(d_R\)</span>]. If we treat the output tensor as a 2-D
matrix with shape [<spanclass="math">\(M\)</span>, <spanclass="math">\(N\)</span>] and let <spanclass="math">\(O[i]\)</span> be the i-th
row of the matrix, then <cite>O[i]</cite> is equal to <spanclass="math">\(I_{ID[i]}[i]\)</span>.</p>
<p>Referring to the given index variable, this layer selects rows from the
input variables to construct a multiplex variable. Assuming that there are
<spanclass="math">\(m\)</span> input variables and <spanclass="math">\(I_i\)</span> represents the i-th input
variable and <spanclass="math">\(i\)</span> is in [0, <spanclass="math">\(m\)</span>). All input variables are
tensors with same shape [<spanclass="math">\(d_0\)</span>, <spanclass="math">\(d_1\)</span>, ..., <spanclass="math">\(d_R\)</span>].
Please note that rank of the input tensor should be at least 2. Each input
variable will be treated as a 2-D matrix with shape [<spanclass="math">\(M\)</span>, <spanclass="math">\(N\)</span>]
where <spanclass="math">\(M\)</span> for <spanclass="math">\(d_0\)</span> and <spanclass="math">\(N\)</span> for <spanclass="math">\(d_1\)</span> * <spanclass="math">\(d_2\)</span>
* ... * <spanclass="math">\(d_R\)</span>. Let <spanclass="math">\(I_i[j]\)</span> be the j-th row of the i-th input
variable. The given index variable should be a 2-D tensor with shape
[<spanclass="math">\(M\)</span>, 1]. Let <cite>ID[i]</cite> be the i-th index value of the index variable.
Then the output variable will be a tensor with shape [<spanclass="math">\(d_0\)</span>,
<spanclass="math">\(d_1\)</span>, ..., <spanclass="math">\(d_R\)</span>]. If we treat the output tensor as a 2-D
matrix with shape [<spanclass="math">\(M\)</span>, <spanclass="math">\(N\)</span>] and let <spanclass="math">\(O[i]\)</span> be the i-th
row of the matrix, then <cite>O[i]</cite> is equal to <spanclass="math">\(I_{ID[i]}[i]\)</span>.</p>