3
$\begingroup$

I would like to know what is the ideal size to a CNN, or there's a mathematical function to determine it, or it change through the differents scopes?

And also, I'm doing a binary classification CNN with 700 images each class(total - 1400). Is it too small? How could I argue that it is small?

Note: I get 83% accuracy with my cnn.

$\endgroup$
0
$\begingroup$

As already noted before, there is no way to find the ideal size of a neural network. It also depends on what kinds of layer you use, not just the size of the dataset. But I suppose the number of trainable parameter at least should be smaller than the size of the dataset (I mean number of examples x number of features). It is probably best practice to find a working architecture - something that guesses better than pure chance, and after that add or remove layers/neurons to reach the optimal number of parameters.

Another way to argue that it is small is to use another, larger dataset that is used for image classification and compare the results on the same network. You can try cats and dogs for example. You can find several tutorials on this dataset, including one by Sentdex.

If you are doing image classification, I strongly recommend you look into transfer learning. There are several pre-trained neural networks which are trained for very long time on large datasets. You can easily achieve over %95 accuracy in with very little training.

| improve this answer | |
$\endgroup$
1
$\begingroup$

There is no mathematical function that is able to relate size of model and performance.

Architecture(filter size, activation, depth, weights initialization) of a neural network can be thought as hyperparameter and hence to improve your model you need to employ hyperparameter tuning methods.

The other way to improve your model is to experiment with state-of-the-art features with your architecture. I believe your dataset being small enough give you a lot of room to experiment(because of the supposedly fast training time).

| improve this answer | |
$\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.