# Is it possible to train a neural network with 3 inputs and 12 outputs?

The selection of experimental data includes a set of vectors of different dimensions. The input is a 3-dimensional vector, and the output is a 12-dimensional vector. The sample size is 120 pairs of input 3-dimensional and output 12-dimensional vectors.

Is it possible to train such a neural network (in MATLAB)? Which structure of the neural network is best suited for this?

• Hello, could you provide an overview of the data and/or problem you're trying to solve? Without such information I can not give you a full answer. Jan 17, 2020 at 12:51
• Hello, I do direct kinematics of the robot. The input 3-dimensional vector consists of the rotation angles of the corresponding drive. The working body of the robot is a triangular platform. As the output, I record the coordinates of the vertices of the triangle in the base coordinate system (we get three 3-dimensional vectors = only 9 coordinates) and three angular velocities along the x, y and z axes. In total, a 12-dimensional output vector is obtained.
– dtn
Jan 17, 2020 at 13:09
• I need to approximate data using a neural network, i.e. train it when applying the appropriate 3-dimensional vector to produce the corresponding 12-dimensional vector. I have a training database.
– dtn
Jan 17, 2020 at 13:10
– dtn
Jan 17, 2020 at 18:07

There is nothing stopping you, you can setup Dense Neural Networks to have any size inputs or outputs (simple proof is to imagine a single layer NN with no activation is just a linear transform and given input dim $$n$$ and output dim $$m$$, it's just a matrix of $$n$$ x $$m$$, trivially this works though with any number of hidden layers)

The better question is should you?. In all honesty, it depends on the data that you have, but, usually, with only 120 examples you'll either overfit completely or do relatively well if the true solution is a very simple function, but, in general, in the common situations where that isn't the case I find myself more likely or not using Bayesian approaches, so I can actually consider confidence (with little data, this is really nice)

• Are there any recommendations for choosing the number of layers and neurons in them, as well as activation functions?
– dtn
Jan 17, 2020 at 16:31
• @AndrewSol For the most part no, usually grid searches or previous empirical results are used. Jan 17, 2020 at 18:15