Is it possible using Tensorflow to create a neural network for input/output mapping?
<p>I am currently using tensorflow to create a neural network, that replicates the function of creating a certain output given an input. </p>

<p>The input in this case is a sampled audio, and the audio is generating MFCC features. Know for each file what the corresponding MFCC feature, is, but aren't sure how i should setup the neural network. </p>

<p>I am following this guide/tutorial <a href="http://www.kdnuggets.com/2016/09/urban-sound-classification-neural-networks-tensorflow.html/2" rel="nofollow">http://www.kdnuggets.com/2016/09/urban-sound-classification-neural-networks-tensorflow.html/2</a></p>

<p>It which it says that the neural network is setup as such</p>

<pre><code>training_epochs = 5000
n_dim = tr_features.shape[1]
n_classes = 10
n_hidden_units_one = 280 
n_hidden_units_two = 300
sd = 1 / np.sqrt(n_dim)
learning_rate = 0.01
</code></pre>

<p>My question here is how i define the number of classes? I mean, the real values I've computed aren't divided into classes, but is a decimal number, so should I just create multiple networks with different number of classes, and choose the one which has the smallest error compared to the original value, or is there a tensorflow command that can do that, as I am doing supervised learning..</p>

<p>Neural networks could be use for classification tasks or regression tasks. In <a href="http://www.kdnuggets.com/2016/09/urban-sound-classification-neural-networks-tensorflow.html/2" rel="nofollow">tutorial</a>, the author wants to classify sounds into 10 different categories. So the neural networks have 10 output neurons (<code>n_classes</code>) and each of their activation value give the probability of membership to a class for an input sound.</p>

<p>In our case, you want to map a given sound  with a decimal number (that's right ?), so it's a regression task : the neural network have to learn an unknown function. The number of output neurons has to be equal to the output dimension of our unknown function (1 if it's just a decimal number).</p>

<p>So if you want to keep the same architecture to our regression task, just set <code>n_classes = 1</code> and modify <code>y_</code> to </p>

<pre><code>y_ = tf.matmul(h_2,W) + b
</code></pre>

<p>because <code>tf.nn.softmax</code> convert the final score to probability (it's good for classification but not for regression)</p>

python tensorflow supervised-learning