Batch implementation. 
k and top_k are hard-coded for now.