Answers.Body: <h2>Use Fine Tuning</h2>
  
  <p>You can simply use a pre-trained model on <a href="https://en.wikipedia.org/wiki/ImageNet" rel="nofollow noreferrer">ImageNet</a>, as this data set has multiple snakes classes.</p>
  
  <p>Then you can fine tune the model with your own small data set and outputs.
  See this for further understanding :
  <a href="https://flyyufelix.github.io/2016/10/03/fine-tuning-in-keras-part1.html" rel="nofollow noreferrer">Fine Tuning in Keras</a></p>
  
  <p>(if you don't use Keras, there are other tutorials on the internet using other Machine Learning framework)</p>
  
  <p>The idea is just removing the last layer (1000 outputs if you use a model pre-trained with ImageNet) and adding a layer of your choice with random weights and a custom number of outputs (number of your classes).</p>
  
  <p>Then your retrain your network, in general we retrained only the last layers (as first layers have more general features).</p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2018-08-01T10:02:57.380Z
Answers.LastActivityDate: 2018-08-01T11:58:29.817Z
Answers.LastEditDate: 2018-08-01T11:58:29.817Z
Answers.UserDisplayName: Jérémy Blain
Answers.Body: <p>Besides using transfer learning described in other answer, you should consider using siamese network.
  This type of network is used in cases when one does not posess many examples of objects he wants to distinguish. General idea is that instead of "telling" the network "This is a cobra", you provide information like: "This is a cobra, and that is a rattlesnake, learn the difference".</p>
  
  <p>There is a whole subject dedicated to your problem and it is called one shot learning.</p>
  
  <p>Take a look at this tutorial:
  <a href="https://hackernoon.com/one-shot-learning-with-siamese-networks-in-pytorch-8ddaab10340e" rel="nofollow noreferrer">https://hackernoon.com/one-shot-learning-with-siamese-networks-in-pytorch-8ddaab10340e</a></p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2018-08-02T01:37:47.657Z
Answers.Text: This is what I learned on Andrew Ng's Deep Learning course at Coursera, and I recommend the course if the OP wants to learn about it.
Answers.UserDisplayName: Blaszard
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2018-08-01T14:26:05.403Z
Answers.LastActivityDate: 2018-08-01T14:26:05.403Z
Answers.UserDisplayName: don_pablito
Body: <p>I need to train a convolutional neural network to classify snake images. The problem is that I have only a small number of images available for some snake types.</p>
  <p>So, what is the best approach to train a neural network for image classification using a small data set?</p>
  
Tags: <deep-learning><convolutional-neural-networks><image-recognition><datasets><transfer-learning>
Title: How can I train a neural network for image classification when the dataset is small?
UserDisplayName: Lakwin Chandula
ThreadText: # How can I train a neural network for image classification when the dataset is small?
  
  (Asked by: username_0 on 2018-08-01)
  
  I need to train a convolutional neural network to classify snake images. The problem is that I have only a small number of images available for some snake types.
  
  So, what is the best approach to train a neural network for image classification using a small data set?
  
  **Tags:** deep-learning, convolutional-neural-networks, image-recognition, datasets, transfer-learning
  
  ---
  
  ## 2 answers
  
  ### Answer by username_1 on 2018-08-01. Score: 4
  
  ## Use Fine Tuning
  
  You can simply use a pre-trained model on [ImageNet](https://en.wikipedia.org/wiki/ImageNet), as this data set has multiple snakes classes.
  
  Then you can fine tune the model with your own small data set and outputs.
  See this for further understanding :
  [Fine Tuning in Keras](https://flyyufelix.github.io/2016/10/03/fine-tuning-in-keras-part1.html)
  
  (if you don't use Keras, there are other tutorials on the internet using other Machine Learning framework)
  
  The idea is just removing the last layer (1000 outputs if you use a model pre-trained with ImageNet) and adding a layer of your choice with random weights and a custom number of outputs (number of your classes).
  
  Then your retrain your network, in general we retrained only the last layers (as first layers have more general features).
  
  
  ---
  
  ### Answer by username_2 on 2018-08-01. Score: 3
  
  Besides using transfer learning described in other answer, you should consider using siamese network.
  This type of network is used in cases when one does not posess many examples of objects he wants to distinguish. General idea is that instead of "telling" the network "This is a cobra", you provide information like: "This is a cobra, and that is a rattlesnake, learn the difference".
  
  There is a whole subject dedicated to your problem and it is called one shot learning.
  
  Take a look at this tutorial:
  <https://hackernoon.com/one-shot-learning-with-siamese-networks-in-pytorch-8ddaab10340e>
  
  > **Comments:**
  > **username_3**: This is what I learned on Andrew Ng's Deep Learning course at Coursera, and I recommend the course if the OP wants to learn about it.  
  
  ---
  
  