title: How can neural networks learn functions with a variable number of inputs?
body: <p>A simple example: Given an input sequence, I want the neural network to output the median of the sequence. The problem is, if a neural network learnt to compute the median of n inputs, how can it compute the median of even more inputs? I know that recurrent neural networks can learn functions like max and parity over a sequence, but computing these functions only requires constant memory. What if the memory requirement grows with the input size like computing the median?</p>
  
  <p>This is a follow up question on <a href="https://stackoverflow.com/q/1766461/3320467">How are neural networks used when the number of inputs could be variable?</a>.</p>