#text embedding is an array of shape (batch,times,features)
example_embedding<-c(1:24)
example_embedding<-array(example_embedding,dim=c(4,3,2))
example_embedding
#Transform array to a matrix
#matrix has shape (batch,times*features)
array_to_matrix(example_embedding)
Run the code above in your browser using DataLab