Cannot allocate Memory Error

Hmmm, this is going to be difficult to solve, I suggest you to divide the data into batches and run inference on each batch and combine them later.