Closed gambit4348 closed 2 years ago
your gpu memory seems not be enough. try disable it.
impost os
os.setenv['CUDA_VISIBLE_DEVICES'] = ""
#or os.setenv['CUDA_VISIBLE_DEVICES'] = "-1"
Thank you! Indeed, my GPU has only 4Gb. Following your suggestion, in the very beggining of my Jupyter notebook I wrote:
import os
os.environ['CUDA_VISIBLE_DEVICES'] = ""
import cv2
import matplotlib.pyplot as plt
from deepface import DeepFace
However, the result was precisely the same. Any other idea?
Thanks in advance!
It works if we do like this:
import os
os.environ['CUDA_VISIBLE_DEVICES'] = "-1"
Hello, I'm experimenting DeepFace for emotion recognition, but when I try to analyze an image I get the following exception:
ResourceExhaustedError: failed to allocate memory [Op:AddV2]
Many posts on TensorFlow state this problem is related to the batchsize used during model training and recommend reducing it. However, how to do it? The code is as follows:
The file is a 64Kb version of the following: https://www.dreamstime.com/stock-images-portrait-happy-boy-showing-thumbs-up-gesture-isolated-over-white-background-image34772834.
Thanks in advance!