OOM error

Initially I trained the 54 KB file with DIET classifiers in my pipeline everything was working fine. As I increased the size of my training data file to 500 KB , I got the OOM error in tensor flow. Then I reduced the batch_size : [8,16] with 300 epochs then I didn’t get the OOM error but my training progress is not happening and its stuck and consuming my whole system RAM of 8 GB.

Please Help