Neural network outputting average values of all traiining data

조회 수: 5 (최근 30일)
Qian
Qian 2019년 7월 17일
답변: Raunak Gupta 2019년 8월 2일
I am working on a image-to-image project.
I built a regression neural network using Unet(CNN). 31Layer with 3 times encoder and decoder by using of convolutional Layer and Upconlayer.
Training data is a lot of images(A>input image, B>output image ) produced by a simulation program. B will be the input to the neural network and A as the ground truth.
But after training many times, the neural network can only give the same prediction image, which is the average value of training data B.
I have tried some methodes, like using smaller leraning rate, normalization data (image - average)/variance, using leakyReLU as activation function, pre-process the data by using Laplacian edge operator... But all these didn't solve my problem.
What strategies can I employ to assess whether this is a coding bug or an issue with the network? Any help would be greatly appreciated.

답변 (1개)

Raunak Gupta
Raunak Gupta 2019년 8월 2일
In my understanding, you are using unetLayers from Deep Learning Toolbox for constructing the Neural Network. Also, the Ground truth that is used actually represents a regression based output.
As I can see the basic UNET Architecture is used for the Classification problems, I suggest including a function that can achieve regression part. It can be a Fully Connected Layer which can again map the last layer output of UNET to the ground truth image size. You may try data augmentation for creating adversarial examples for the network to learn better. It may be helpful for you to train the network for more epochs and look for the accuracy and loss parameters.
I suggest checking trainingOptions parameter in unetLayers for changing optimizer or batch size and to look for segnetLayers for better understanding. For adding layers to existing Network, you can edit the base architecture from unetLayers.
For more information you can refer to this blog:

Community Treasure Hunt

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

Start Hunting!

Translated by