In order to train a regression task applied to images I use Resnet50 as backbone and add some layers at the top. The first layer I add is a GlobalAveragePool2D which has shape (