Regarding Multi-label transfer learning with googlenet

Illustration
Balakrishnan_rajan - 2021-05-25T11:18:20+00:00
Question: Regarding Multi-label transfer learning with googlenet

I have a dataset with pictures with presence of objects of different classes. I want to perform a multilabel classification, which means I need to classify the pictures into different classes with the picture belonging to more than one class at the same time. That is, for pictures with objects of type A and type B, the net should output both the labels A and B.   If I am designing a  CNN for this from scratch, I will have a sigmoid activation at the last layer. The number of output neurons will be equal to the number of classes with the output of each neuron giving 1 if the picture belongs to the particular class or 0 if not. However, there seems to be no provision for adding a sigmoid function and the Image datastore cannot hold binary vectors as the label. How do I overcome this?

Expert Answer

Profile picture of Neeta Dsouza Neeta Dsouza answered . 2025-11-20

We do not support sigmoid activation. You can use the softmax activation function. You don't need to define the neurons in the softmaxLayer. Define the no of neurons (= no of classes) you want in the fullyConnectedLayer. So, your network structure would be like:
 
inputLayer -- -- fullyConnectedLayer softmaxLayer ClassificationLayer


Not satisfied with the answer ?? ASK NOW

Get a Free Consultation or a Sample Assignment Review!