I am thinking of an application where I want to teach a Neural Network to adjust some parameters on another device for a specific purpose. I say "adjust some parameters" because I need the output to "turn the knobs" of something else, not only binary "push buttons"

What kind of neural network do I need? is it a specific architecture?

The NNs I have used so far were sequential and outputting vectors like [0] or [1] and classifiers with outputs like [1,0,0,0] [0,1,0,0] [0,0,1,0] [0,0,0,1] for example

But now I need outputs like [0.25, 0.99, 0.14, 0.54],

  • 0.25 for knob 1
  • 0.99 for knob 2
  • 0.14 for knob 3
  • 0.54 for knob 4

Thank you for your answers

  • $\begingroup$ You should probably be implementing a multi-layered perceptron with 2 or more hidden layers and one output layer with identity as the activation function. The error can be calculated using least-mean squares. You can do it using scikit-learn library of Python. See this link. $\endgroup$ – kiner_shah Dec 13 '17 at 15:17

This is a regression problem instead of a classification problem. For both, you can use a feedforward neural network. These are the typical ones you've probably seen where each neuron in a layer is connected to each neuron in the next.

In a classification problem, you want an output like you mentioned above, a one-hot vector corresponding to the correct class. The way you get this vector is by applying a soft-max activation to the outputs of your last layers. If you don't apply this activation, your output vector might be something like [-2.5, 0.6, 10.2, 5.1]. You can see that this looks a lot like the vector you want. So, you can probably use a feedforward architecture (with non-linear activations on the hidden layers if there are non-linearities in your data) with a final layer of 4 neurons. Then, when you train, that should (hopefully) converge to the correct data outputs. If it doesn't, you will need to mess with the architecture/get more training data/lots of other levers to play with.

This link goes to a tutorial for regression using Keras. Keras is a nice package written to take powerful libraries like TensorFlow and Theano and give them a simple interface. TensorFlow can be quite complex (I've never used Theano so I don't know) when you're starting and trying to understand the syntax and the ML concepts. Keras helps take away the confusing syntax.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.