Body: <p>Let's say I want to classify a dataset of handwritten digits (CNNs on their own can get 99.7% on the MNIST dataset but let's pretend they can only get 90% for the sake of this question). </p>
  
  <p>Now, I already have some classical computer vision techniques which might be able to give me a clue. For instance, I can count the intersection points of the pen stroke</p>
  
  <ul>
  <li>1,2,3,5,7 will usually have no intersection points</li>
  <li>6,9 will usually have one intersection point each</li>
  <li>4,8 will usually have two intersection points each (usually a 4-way crossover yields two intersection points which are close together)</li>
  </ul>
  
  <p>So if I generate some meta-data telling me how many intersection points each sample has, how can I feed that into the CNN training so that it can take advantage of that knowledge?</p>
  
  <p>My best guess is to slot it into the last fully connected layer just before classification.</p>
  
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2020-02-18T10:31:51.873Z
Comments.Text: "Distilling the Knowledge in a Neural Network" by G. Hinton et al.
  https://arxiv.org/abs/1503.02531
Comments.UserDisplayName: EyesBear
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2020-02-18T13:06:24.317Z
Comments.Text: You could add the meta-data along all the pixels to your feature vector and let the model learn the correlation between number of intersections and digits.
Comments.UserDisplayName: Feodoran
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2020-02-18T13:13:36.677Z
Comments.Text: @Feodoran thanks. Is that different from what I said about adding it into the last fully connected layer? Is "feature vector" different than that? Just makings sure I've got the terms right.
Comments.UserDisplayName: Alexander Soare
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2020-02-18T13:20:53.700Z
Comments.Text: It is different in that I suggest a single, combined feature vector feeding into the first layer, while you are suggesting two feature vectors feeding into two different layers of the model. You have to try which one works better.
Comments.UserDisplayName: Feodoran
Tags: <convolutional-neural-networks><classification>
Title: Can I provide a CNN with hints?
UserDisplayName: Alexander Soare
ThreadText: # Can I provide a CNN with hints?
  
  (Asked by: username_0 on 2020-02-18)
  
  Let's say I want to classify a dataset of handwritten digits (CNNs on their own can get 99.7% on the MNIST dataset but let's pretend they can only get 90% for the sake of this question).
  
  Now, I already have some classical computer vision techniques which might be able to give me a clue. For instance, I can count the intersection points of the pen stroke
  
  * 1,2,3,5,7 will usually have no intersection points
  * 6,9 will usually have one intersection point each
  * 4,8 will usually have two intersection points each (usually a 4-way crossover yields two intersection points which are close together)
  
  So if I generate some meta-data telling me how many intersection points each sample has, how can I feed that into the CNN training so that it can take advantage of that knowledge?
  
  My best guess is to slot it into the last fully connected layer just before classification.
  
  **Tags:** convolutional-neural-networks, classification
  
  > **Comments:**
  > **username_1**: "Distilling the Knowledge in a Neural Network" by G. Hinton et al. https://arxiv.org/abs/1503.02531  
  > **username_2**: You could add the meta-data along all the pixels to your feature vector and let the model learn the correlation between number of intersections and digits.  
  > **username_0**: @username_2 thanks. Is that different from what I said about adding it into the last fully connected layer? Is "feature vector" different than that? Just makings sure I've got the terms right.  
  > **username_2**: It is different in that I suggest a single, combined feature vector feeding into the first layer, while you are suggesting two feature vectors feeding into two different layers of the model. You have to try which one works better.  
  
  ---
  
  ## 0 answers
  
  