[Python] Finding an OMM error while training a ResNet model using GPU

Discussão em 'Python' iniciado por Stack, Outubro 5, 2024.

  1. Stack

    Stack Membro Participativo

    I am Training a ResNet on an NVidia GeForce GTX 1050 ti with 4GB, The image is sized 512x320 using 6 as a batch size which is not really good.

    It shows this error:

    (1) Resource exhausted: OOM when allocating tensor with shape[6,128,256,160] and type float on /job:localhost/replica:0/task:0/device:GPU:0 by allocator GPU_0_bfc

    And I was trying to understand tensor parameters, the first(6) one apparently is the number of epochs, the Third and the last (256,160) one is the dimension of the image divided by 2.

    I am confused, Is it possible that the GPU is not using the whole memory ?

    Continue reading...

Compartilhe esta Página