CUDA - Failure to allocate bytes

Hi - I am trying to run VGG16 over 8000+ 224x224 images, batch size 32, 15 epochs.

The iterations do not begin, giving the following error:

Exception in thread “main” java.lang.RuntimeException: Failed to allocate 2027570444 bytes from DEVICE [0] memory

GPU Intel HD Graphics 630
24GB RAM (13 GB of which is available)
Intel Core 7th Gen

2020-03-13 00:12:41 INFO NativeOpsHolder:66 - Number of threads used for NativeOps: 32
2020-03-13 00:12:43 INFO Nd4jBlas:54 - Number of threads used for BLAS: 0
2020-03-13 00:12:43 INFO DefaultOpExecutioner:656 - Backend used: [CUDA]; OS: [Windows 10]
2020-03-13 00:12:43 INFO DefaultOpExecutioner:657 - Cores: [8]; Memory: [5.3GB];
2020-03-13 00:12:43 INFO DefaultOpExecutioner:658 - Blas vendor: [CUBLAS]
2020-03-13 00:12:43 INFO CudaExecutioner:2188 - Device Name: [GeForce GTX 1060]; CC: [6.1]; Total/free memory: [6442450944]
2020-03-13 00:12:43 INFO VGGClassifier:57 - Load data…

I have been trying to see detailed documentation on CUDNN and CUDA settings but haven’t found any details. Could you please help me figuring what the issue could be?

P.S: I have been able to run a similar VGG16 for a similar set of images on this same machine on Keras-GPU. It works perfectly.

Take a look at

And configure more actual memory to be used. As you can see in the log snippet you’ve posted it will only use up to 5.3GB of memory.