PacktPublishing / Deep-Learning-for-Computer-Vision

Deep Learning for Computer Vision, by Packt
MIT License
213 stars 167 forks source link

about the categorical_crossentropy in line 51 #2

Closed linghelenchen closed 3 years ago

linghelenchen commented 6 years ago

Dear author, the code 7_cat_vs_dog_bottleneck.py I encountered an error when running your code. This issue is related to the line 51. However, after changing categorical_crossentropy to binary_crossentropy the problem was solved.

Could you check this problem? Thanks very much!

Best, Helen

DusanBaek commented 4 years ago

Even if chaning categorical_crossentropy to binary_crossentropy, its val_acc output always are 0.5000 in all epoch.

linaashaji commented 4 years ago

it seems that if you want to change the categorical_crossentropy to binary_crossentropy, you have also to change the softamx activation function to a sigmoid activation function