My apologies for adding the second answer, but it is significantly different from my first.
One of the possibilities that could work is to do the following: suppose your input can be 3, 4, or 5. You make your neural network 5 input nodes (the maximum size of your input). Then, if a point with size 3 appears, you indicate its values on the first 3 nodes and provide a dummy value for the remaining nodes.
Let's discuss a specific example: suppose your input is points in R ^ 3, R ^ 4 or R ^ 5, and they are binary: they can take values 0 or 1 in each record. If the dot (0,1,0,0,1) appears, you simply load these values into the 5 input nodes of the network. If the point (0,1,1) appears, you submit (0,1,1, -1, -1) to the network, where -1 is a dummy value. This ensures that you pass on to your network the information that "the last two nodes are special."
In a linear classifier, the values of dummy values are very dangerous; however, since the neural network is not linear, it can (in principle) study any function if you give it the necessary information and have sufficient training data to supply it.
Herrkaputt
source share