The easiest is to put the entire model onto GPU and pass the data with batch size set to 1. If it doesn’t fit, then try considering lowering down your parameters by reducing the number of layers or removing any redundant components that might be taking RAM. From the screenshot, I see that the model fits, you need to lower your batch size to the minimum to find the threshold value.