1
$\begingroup$

I want to use a CNN to extract features from a dataset. My questions are:

  • What is the stopping criteria when training a CNN to extract features?
  • What is the difference between extracting features after training for 50 epochs or 100 epochs?
  • How should I choose the best layer for feature extraction?
  • Does it depend on the accuracy of the model?
$\endgroup$
2
  • 1
    $\begingroup$ You want to extract them for classification task? $\endgroup$ – Media Sep 1 '18 at 14:40
  • $\begingroup$ yes but i will use another classification than CNN $\endgroup$ – Mohamed Bakr Sep 1 '18 at 16:50
0
$\begingroup$

my question is what the stopping criteria of train CNN to extract features?

Generally speaking, the best features are the ones that, when classified, should have the best performance. So train your model, while monitoring a metric of your choice on a validation set. Stop the training phase when that metric stops improving.

What the difference between extract features after train 50 epoch and 100?

Assuming no overfitting has occurred between epochs 50 and 100, the features of the latter will be more sophisticated and better equipped for classification on the given dataset.

If the model has started to overfit between these two epochs, then the latter model will have begun to memorize the training set. The features of this model will have begun to extract features tailored to the training set images.

How to choose the best layer for extraction?

You should get the highest-level features available from the CNN. The most usual case is taking the previous layer of the first fully connected one. However, if that layer is a pooling one, you might want to take the previous one (which contains more information).

Are it depend on the accuracy of model?

This comes back to the first question. If you think that accuracy is a good enough metric to represent your model's performance, then yes. There are many cases, however, where this is not the case (e.g. imbalanced dataset). Whichever metric you choose, it should be measured on the validation set.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.