Pass a large tensor to a keras layer without exhausting memory

I want to pass a tensor of shape: (batch_size, d1, d2, d3) to a keras layer. The type of the layer is not important; assume it's a dense layer. However, because d1, d2, d3 are big I have out of memory issues. Each batch has batch_size x d1 examples of dimension d2 x d3 but I want to still consider it as a single batch and not split to many batches. Is there any way to divide the batch in sub-batches?

How many English words
do you know?
Test your English vocabulary size, and measure
how many words do you know
Online Test
Powered by Examplum