Contents
Is it true that adding layers to CNN will increase accuracy?
Adding layers unnecessarily to any CNN will increase your number of parameters only for the smaller dataset, say in 1000s (total 1000). It’s true for some reasons that on adding more hidden layers, it will give more accuracy.
There is no well defined connection between number of hidden layers and accuracy. How many hidden layers you keep depends much on problem at hand for which you are training your ANN model. A linearly separable dataset will need no hidden layers. A nonliner dataset may need one or more hidden layers.
What is effect of increasing number of hidden layers in a feed?
I’ll try my best though, for the sake of my answer. 1) Increasing the number of hidden layers might improve the accuracy or might not, it really depends on the complexity of the problem that you are trying to solve.
When you unnecessarily increase hidden layers, your model ends up learning more no.of parameters than are needed to solve your problem. The foremost objective of training machine learning based model is to keep a good trade-off between simplicity of the model and the performance accuracy.
How to calculate the memory cost of each layer during training?
If I have a simple CNN architecture like this: C1: 32 3×3 kernels, with padding (I guess in reality theyre actually 3x3x3 given the input depth?) Assuming 32bit floating point values, how do you calculate the memory cost of each layer of the network during training? and then the total memory required to train such a model?
What to do when model predict is out of memory?
Relaunch it, Load model weights from disk and try a model.predict from fresh. You can try to use CNMeM. If this is not an out of memory bug but something more subtle, You will have to investigate more and provide more info.
Is there a limit to adding more layers?
Adding more layers will help you to extract more features. But we can do that upto a certain extent. There is a limit. After that, instead of extracting features, we tend to ‘overfit’ the data. Overfitting can lead to errors in some or the other form like false positives.