Suppose we have the following problem that needs to be solved with a convolutional neural network. We are given an arbirary greyscale image $I(x,y)$ as an input. We want to integrate the image along the horizontal axis ($x$-axis) to get the result as a series of numbers $f(y) = \sum_{x}I(x,y)$. We want our neural network to output $f(y)$.
Many examples of neural networks involve MNIST dataset of handwritten digits, where we deal with 10 different categories (labels), so the last layer will consist of 10 nodes, each for each of the digits. What would the last (or last two) layers be in the context of the problem stated above?
I will restate the problem.
There are many examples of neural networks for MNIST hand-written digits classification problem, where the output is a 10-element softmax-vector with one maximum value corresponding to the prediction. This is the case where a label for a particular data-sampe is just a number (one-element label, that can take values from 0 to 9). Does anyone have an idea how to be able to predict a multi-element label, where the label for a particular data-sample consists of many elements (say, 128)? In other words, how to predict a function? How should I organize last layers to be able to do it? Especially, I would like to have a PyTorch example. Thanks in advance.