How to make a CNN predict a continuous value? I understand the dimensionality of convolutions, max pooling and dense as function of stride and kernel size. But I'm having trouble wrapping my head around how to use these layers to end up with my final prediction, which should be one continuous variable.

Here is what I'm working with:


X training: n 2-channel 3D grids of size 46x46x46, shape: (n, 46, 46, 46, 2)
Y training: n-element vector of continuous values, shape: (n,)


I would imagine there will be some resizing and some concatenation involved. But there's no point doing that if I don't actually understand what it's doing.
A common way to do this is flatten your output after your last convolution layer, and pass it through a fully connected layer.