AgeGenderDeepLearning icon indicating copy to clipboard operation
AgeGenderDeepLearning copied to clipboard

code not work on python notebook

Open Jinnrry opened this issue 7 years ago • 7 comments

python:3.5

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

Jinnrry avatar Jun 07 '18 03:06 Jinnrry

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

lukinsb avatar Jun 19 '18 18:06 lukinsb

Did you fix it?

Jinnrry avatar Jun 21 '18 02:06 Jinnrry

In which line does the error occur?

GilLevi avatar Jun 29 '18 22:06 GilLevi

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

Jinnrry avatar Jun 30 '18 01:06 Jinnrry

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

Jinnrry avatar Jun 30 '18 01:06 Jinnrry

Is there any update on this issue?

AydinAlptug avatar Apr 25 '21 13:04 AydinAlptug

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)

AydinAlptug avatar Apr 25 '21 21:04 AydinAlptug