&FloatTensor tensor_gather_rows(const &FloatTensor table, const &FloatTensor idx)out[i] = table[idx[i]]: [K,d] and m indices -> [m,d]. Gradients scatter-add back into the table's rows (embeddings, VQ codebooks).
&FloatTensor tensor_gather_rows(const &FloatTensor table, const &FloatTensor idx)out[i] = table[idx[i]]: [K,d] and m indices -> [m,d]. Gradients scatter-add back into the table's rows (embeddings, VQ codebooks).