GPU Out of memory on device
조회 수: 8 (최근 30일)
이전 댓글 표시
I am using trainautoencoder function to encode my images, I have total image 4099 of size 128x128. I am running the code using my GPU machine using 'UseGPU',true command, because when I tried running my code without this my CPU was occupied more and system restarted in middle of running my code. But when i was using above 'UseGPU',true command in my function I got following Error: pls help
the GPU description
Code where error occured:
댓글 수: 0
채택된 답변
Himanshu
2023년 5월 25일
Hello Nikhat,
I understand that you are facing an "Out of memory on device" error while using the "trainAutoencoder" function with GPU acceleration in MATLAB. You are trying to train an autoencoder on a large dataset of 4099 images of size 128x128.
The error message you encountered suggests that your GPU is running out of memory while training the autoencoder. This can happen if the memory required for the computations exceeds the available memory on your GPU.
To resolve this issue, you can reduce the batch size. Decreasing the batch size will reduce memory usage during training. You can try reducing the batch size in the "trainAutoencoder" function by implementing a mini-batch mechanism by splitting up the training dataset and training it on each mini-batch iteratively.
If reducing the batch size doesn't solve the memory issue, you can try reducing the size of the hidden layers in your autoencoder. Smaller layers will require less memory for computation.
You can refer to the below documentation to learn more about "trainAutoencoder" function in MATLAB.
댓글 수: 0
추가 답변 (0개)
참고 항목
카테고리
Help Center 및 File Exchange에서 GPU Computing에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!