Normalize Multiple Outputs of Regression Network

7 次查看(过去 30 天)
I am using a u-net with input images of size 240x240x35 and with four different output images of size 240x240, so in all the outputlayer is 240x240x4. However, the different output images show different min, max values. The first output image is in range of 0-4096 and the other three are in range of 0-256. After training the network, only the first output images resulted in small deviations between true and predicted, however, the others showed much larger variations. I think this is due to the different ranges but I cannot work around it. I could devide the first output image by 10 but I think this is not a nice solution.
Now my question is if I can make a normalization (factor 10) for the first output layer similar to this post, when using trainNetwork():
net.performParam.normalization = 'standard';
My Network is defined as:
lgraph = unetLayers([240 240 35] , 3,'encoderDepth',3);
lgraph = lgraph.removeLayers('Softmax-Layer');
lgraph = lgraph.removeLayers('Segmentation-Layer');
lgraph = lgraph.removeLayers('Final-ConvolutionLayer');
lgraph = lgraph.addLayers(convolution2dLayer(1,4,'NumChannels',64,'name','Final-ConvolutionLayer'));
lgraph = lgraph.addLayers(regressionLayer('name','regressionLayer'));
lgraph = lgraph.connectLayers('Decoder-Stage-3-ReLU-2','Final-ConvolutionLayer');
lgraph = lgraph.connectLayers('Final-ConvolutionLayer','regressionLayer');
Thanks for your help!
Ingo

回答(1 个)

Raunak Gupta
Raunak Gupta 2020-5-27
Hi,
The documentation link that is mentioned in the question is valid for feedforwardnet and that normalization works for vector like outputs. Here since unetLayers is used to solve the regression problem this normalization is not available as such because there can be multiple ways of normalizing the regression output.
For this case I would recommend normalizing the input training output so that all four channels have same range and saving the normalization function so original output can be retrieved for testing data. This documentation also mentions the same strategy. As per my understanding “standard” also does the same thing.
Hope it helps.
  1 个评论
Ingo Hermann
Ingo Hermann 2020-5-28
Thank you for the answer. I also thought it it is automatically doing the normalization but when I normalized input and output my myself, the results where much better.
If there is no other normalization option I wil leave it like that.
Thanks again!

请先登录,再进行评论。

类别

Help CenterFile Exchange 中查找有关 Image Data Workflows 的更多信息

产品

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by