Hi Shee,

The problem you are asking is for multiclass classification of images.

For binary classification we use sigmoid activation function

classifier.add(Dense(units=1, activation='sigmoid'))

For multiclass classification, as in your example where we need to classify dataset of 5 animals, we will use Softmax activation function.

The above code would now change to

classifier.add(Dense(units=5, activation='softmax'))

Hope this helps

Written by

Loves learning, sharing, and discovering myself. Passionate about Machine Learning and Deep Learning

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store