Answers.Body: <blockquote>
    <p>I don't know for sure if I should use an RNN, CNN OR DNN. Which one is best for this situation?</p>
  </blockquote>
  
  <p>This question or variations of of crop up a lot in DataScience stack exchange too. To paraphrase:</p>
  
  <blockquote>
    <p>I am trying to do something with X data, and I have a lot of choices for the model. Which is best?</p>
  </blockquote>
  
  <p>Unfortunately, the answer is generally:</p>
  
  <ul>
  <li><p>It depends on all the fine details of your project</p></li>
  <li><p>Unless someone has done almost your exact project recently (so they were using latest techniques of the model type), then no-one knows <em>a priori</em> which model will get the best result.</p></li>
  <li><p>Optimising machine learning is very much an empirical subject. If you want to know whether A is better than B, you have to try both and measure their performance.</p></li>
  </ul>
  
  <p>In your case, I think that CNNs and RNNs are both applicable (and you might want to look at a <a href="https://en.wikipedia.org/wiki/WaveNet" rel="nofollow noreferrer">WaveNet</a>-like architecture, which is a variant of CNN, but that could be a bit too advanced to start with). You might have a slight preference for RNN as a starting point if the sequence length to process varies significantly, such that padding input to a CNN would be inefficient. You may also prefer an RNN if the <em>output</em> of your model needs to be a sequence, and doubly so if the output sequence varies in length and is not directly related to the input sequence length (think of natural language translation).</p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2018-05-03T17:20:16.793Z
Answers.LastActivityDate: 2018-05-03T17:20:16.793Z
Answers.UserDisplayName: Neil Slater
Body: <p>I'm trying to make a neural network that detects certain instruments in a song. I don't know for sure if I should use an RNN, CNN OR DNN. Which one is best for this situation?</p>
  
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2018-05-03T18:44:44.370Z
Comments.Text: Without knowing anything about this problem, the question that pops into my mind is "are you looking at patterns to determine the *number* of instruments in a recording, such as a popular song or symphony?"
Comments.UserDisplayName: DukeZhou
Tags: <neural-networks><machine-learning><deep-learning>
Title: Neural network for pattern recognition in audio
UserDisplayName: Slightly Higher Average User
ThreadText: # Neural network for pattern recognition in audio
  
  (Asked by: username_0 on 2018-05-03)
  
  I'm trying to make a neural network that detects certain instruments in a song. I don't know for sure if I should use an RNN, CNN OR DNN. Which one is best for this situation?
  
  **Tags:** neural-networks, machine-learning, deep-learning
  > **Comments:**
  > **username_1**: Without knowing anything about this problem, the question that pops into my mind is "are you looking at patterns to determine the *number* of instruments in a recording, such as a popular song or symphony?"  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_2 on 2018-05-03. Score: 2 | Accepted answer
  
  > I don't know for sure if I should use an RNN, CNN OR DNN. Which one is best for this situation?
  
  This question or variations of of crop up a lot in DataScience stack exchange too. To paraphrase:
  
  > I am trying to do something with X data, and I have a lot of choices for the model. Which is best?
  
  Unfortunately, the answer is generally:
  
  * It depends on all the fine details of your project
  * Unless someone has done almost your exact project recently (so they were using latest techniques of the model type), then no-one knows *a priori* which model will get the best result.
  * Optimising machine learning is very much an empirical subject. If you want to know whether A is better than B, you have to try both and measure their performance.
  
  In your case, I think that CNNs and RNNs are both applicable (and you might want to look at a [WaveNet](https://en.wikipedia.org/wiki/WaveNet)-like architecture, which is a variant of CNN, but that could be a bit too advanced to start with). You might have a slight preference for RNN as a starting point if the sequence length to process varies significantly, such that padding input to a CNN would be inefficient. You may also prefer an RNN if the *output* of your model needs to be a sequence, and doubly so if the output sequence varies in length and is not directly related to the input sequence length (think of natural language translation).
  
  
  ---
  
  