Does simple Convolutional Neural Network learn features with only one class?
1 visualizzazione (ultimi 30 giorni)
Mostra commenti meno recenti
Suvidha Tripathi
il 20 Set 2018
Commentato: Suvidha Tripathi
il 24 Set 2018
I have read about one-class classification problems using SVM as discriminator to detect anomalous data. But, couldn't find much with CNN deep networks. I am working on a classification problem where I want to extract features from CNN network. I am providing image dataset from one class only and after training the model for 50 epochs, I am extracting the features for further classification using another model.
I am getting very fine results. However, I am confused how my CNN model is learning features when I am providing data from one class only. Is it even learning or not. I tried to analyze activations after each convolution layer (4 in my model) for 1, 50 and 100 epochs. I can see subtle changes, however I need a solid explanation as to what actually is happening after each epoch cycle.
for epoch 1 and conv layer 1,2 ,3 and 4 , strongest activations in each layer is as shown below:
after 50 epochs and conv layer 1,2 ,3 and 4, strongest activations in each layer is as shown below:
0 Commenti
Risposta accettata
Zenin Easa Panthakkalakath
il 24 Set 2018
Yes, simple convolution neural networks do learn features with only one class. When there exist only one class, the problem is effectively a binary classification, i.e. whether the class is present or not.
However, it is a fact that larger the number of classes, the network would try to learn more complex features.
In cases where the features required to make a classification is simple, the network may learn it pretty quickly. If the training data isn't diverse enough, then the network may assume find a feature which may not be the right one, but works for the given training data and make a classification based on that.
3 Commenti
Zenin Easa Panthakkalakath
il 24 Set 2018
The loss is calculated based on which function you are using in the network. If you're using mean squared error and the y_net represents the network output, y_train represents the training data output value, then
Error = 0.5 * (y_net - y_train)^2
Note that the output layer has a value of either 0 or 1. Use an indicator function for the activation of the final layer.
From what you have tried to explain eariler, I got a hint that you are trying to train a CNN based network and you would like to output it as a feature vector. In that case, train it using a binary output layer, then either export the weights to a new network or modify the existing network by changing the final activation layer to either linear, sigmoid or any other function that you prefer.
Something similar has been done using AlexNet in one of our articles linked below. Only difference is that AlexNet is already trained and we already have the values, whereas here you will have to train your own network.
Please also take a look into the research paper on AlexNet, which is mentioned as a reference in the article above.
Più risposte (0)
Vedere anche
Categorie
Scopri di più su Install Products in Help Center e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!