serengil/tensorflow-101

Memory usage too much

us opened this issue · 1 comments

us commented

I tried the Find-Look-Alike-Celebrities.ipynb on colab but on
df['pixels'] = df['full_path'].apply(getImagePixels)
this line give a memory error. Colab has 25gb memory.
How can I avoid that?

You might apply filter on df based on gender. I mean that if you would like to find the one look-alike you and your gender is male, then discard female instances in the data frame. In this way, you can decrease the number of instances to the half.

df = df[df['gender'] >= 1] #0: man, 1: woman

Also, increasing the face score will decrease the number of instances as well.

df = df[df['face_score'] >= 3]