harshildarji:

but none of which are working for me. It would be a great help if someone could point out a better way to do this.


Which approaches have you tried and what is not working for you?
Also, how large is your dataset and how much memory is currently used during the training?