GilLevi / AgeGenderDeepLearning

628 stars 285 forks source link

code not work on python notebook #26

Open Jinnrry opened 6 years ago

Jinnrry commented 6 years ago

python:3.5

I download code from python notebook I get the error. TypeError: 'float' object cannot be interpreted as an integer

lukinsb commented 6 years ago

Having the same problem here, when I call for a prediction of Age, i get the same error.

Jinnrry commented 6 years ago

Did you fix it?

GilLevi commented 6 years ago

In which line does the error occur?

Jinnrry commented 6 years ago

@GilLevi100 gender_net.predict([input_image]) #here get error link has closed,I don't know which line.

Jinnrry commented 6 years ago

And error reported in /usr/lib/python3/dist-packages/caffe/classifier.py in predict,line 95

AydinAlptug commented 3 years ago

Is there any update on this issue?

AydinAlptug commented 3 years ago

I have resolved it by editing line 95 in ".../caffe/classifier.py". I am not sure if I cause any side effects, but it works now.

From predictions.reshape( len(predictions) / 10, 10, -1)

To predictions.reshape(int(len(predictions) / 10), 10, -1)