# How to use CNN to deal with a 2D regression problem?

I have seven measurements (Obs1-7), each measurement has the dimension of [x,y,t] where x and y are coordinates and t is time. Now I want to build a model that uses the first 6 measurements to predict the last one, saying Obs7=f(Obs1~6). I want to use CNN to distil this relationship f. I had some experience using CNN for classification, but have no idea how to deal with such 2D/3D regression. Could someone please give me some ideas? Thanks!

It should even be easier than classification: you do not need the final layer.

Your input layer should have 18 nodes $$(x_i,y_i,t_i)|i=1..6$$

Hidden layers as you see fit (experiment with it, depending on data and results). I would expect the best results from a fully connected layer and a 'relu' layer.

The output layer has 3 nodes $$(x_7, y_7, t_7)$$

Train the model.

Evaluation is just feed forward of a set of 18 values, and retrieving 3 results from the output layer nodes.

• Thank you @Pieter21 for your comments. After several days' research, I know CNN better and have a general idea on how to handle the data. But I am still unclear about the following questions: (1) my data have 6 channels [batch, x, y, 6], if I set 32 kernels at first layer and padding as same, what is the dimension of the first feature map? Is it [batch,x,y, 32*6]? (2) I need keep padding as same, so do I need pooling step (downsampling)? (3) How to set up the last layer to convert [batch, x, y, number] map to my [batch, x, y,1] map? Jan 22, 2020 at 18:09
• I now understand pooling has several functions. But if my input dimension is [x,y,n], after several convolution and pooling steps, I may get a pooling layer with dimension as [x/2,y/2, n]. My target dimension is [x,y,1], how can I connect [x/2,y/2, n] to [x,y,1]? Jan 22, 2020 at 18:22