Answers.Body: <p>The title of your question asks about model complexity. Yet the body of your question talks about this metric as being useful for embedded systems like a smartphone, which have more limited memory.</p>
  <p>I think the answer depends on which of those two questions you actually mean:</p>
  <ol>
  <li><p>As a measurement of how useful the model may be on a limited system: Yes, this is very useful knowledge! However, I caution you to look at floating point precision of both models, and note that in your comparison if they are different.</p>
  </li>
  <li><p>As a measurement of model complexity: No, this is not a good metric. Smaller disk space does not imply that the model is less complex. For example, one could imagine a KNN taking up enormous disk space, but we would likely not consider that as complex a model as a large (but not as large!) neural network.</p>
  </li>
  </ol>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2023-11-29T00:46:38.803Z
Answers.LastActivityDate: 2023-11-29T00:46:38.803Z
Answers.UserDisplayName: chessprogrammer
Body: <p>I am writing a research paper on my own custom CNN model for image classification. I am comparing my model architecture with pre-trained architectures, like DenseNet121 and InceptionV3.
  I want to compare the size of my model with the pre-trained models. I know the following metrics for judging the size of a model:</p>
  <ol>
  <li>Number of Parameters</li>
  <li>Number of Layers</li>
  </ol>
  <p>However, I was also thinking about comparing the trained model size on disk. As trained DenseNet121 is taking 200MBs and my model is taking less than 20MBs. Therefore, my model is better for embedding in a smartphone application.
  Is that a good comparison, or am I missing some important point?</p>
  
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2023-11-28T10:04:51.783Z
Comments.Text: Although it might be a good indication, there might be additional parameters influencing the size of the file. For example, the precision of the weights, are their float64, float128 etc. This significantly influences the size of the save file. Similarly, weights and layers might not necessarily be indicative of the complexity of a forward pass which is the part necessary for smartphone applications (i imagine). One architecture might do additional (complex) operations in the forward pass, that might make runtime on a smartphone application slower.
Comments.UserDisplayName: Robin van Hoorn
Tags: <neural-networks><convolutional-neural-networks><computational-complexity><pretrained-models>
Title: Is size of trained model on disk a good measure of model complexity?
UserDisplayName: Dawood Ahmad
ThreadText: # Is size of trained model on disk a good measure of model complexity?
  
  (Asked by: username_0 on 2023-11-28)
  
  I am writing a research paper on my own custom CNN model for image classification. I am comparing my model architecture with pre-trained architectures, like DenseNet121 and InceptionV3.
  I want to compare the size of my model with the pre-trained models. I know the following metrics for judging the size of a model:
  
  1. Number of Parameters
  2. Number of Layers
  
  However, I was also thinking about comparing the trained model size on disk. As trained DenseNet121 is taking 200MBs and my model is taking less than 20MBs. Therefore, my model is better for embedding in a smartphone application.
  Is that a good comparison, or am I missing some important point?
  
  **Tags:** neural-networks, convolutional-neural-networks, computational-complexity, pretrained-models
  > **Comments:**
  > **username_1**: Although it might be a good indication, there might be additional parameters influencing the size of the file. For example, the precision of the weights, are their float64, float128 etc. This significantly influences the size of the save file. Similarly, weights and layers might not necessarily be indicative of the complexity of a forward pass which is the part necessary for smartphone applications (i imagine). One architecture might do additional (complex) operations in the forward pass, that might make runtime on a smartphone application slower.  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_2 on 2023-11-29. Score: 1
  
  The title of your question asks about model complexity. Yet the body of your question talks about this metric as being useful for embedded systems like a smartphone, which have more limited memory.
  
  I think the answer depends on which of those two questions you actually mean:
  
  1. As a measurement of how useful the model may be on a limited system: Yes, this is very useful knowledge! However, I caution you to look at floating point precision of both models, and note that in your comparison if they are different.
  2. As a measurement of model complexity: No, this is not a good metric. Smaller disk space does not imply that the model is less complex. For example, one could imagine a KNN taking up enormous disk space, but we would likely not consider that as complex a model as a large (but not as large!) neural network.
  
  
  ---
  
  