def skipgram_batch(centers, contexts, num_tokens, dtype, index_dtype):
contexts = mx.nd.array(contexts[<NUM_LIT:2>], dtype=index_dtype)<EOL>indptr = mx.nd.arange(len(centers) + <NUM_LIT:1>)<EOL>centers = mx.nd.array(centers, dtype=index_dtype)<EOL>centers_csr = mx.nd.sparse.csr_matrix(<EOL>(mx.nd.ones(centers.shape), centers, indptr), dtype=dtype,<EOL>shape=(len(centers), num_tokens))<EOL>return centers_csr, contexts, centers<EOL>
Create a batch for SG training objective.