How to build a multi-class convolutional neural network with Keras

后端 未结 3 787
借酒劲吻你
借酒劲吻你 2021-01-25 13:58

I am trying to implement a U-Net with Keras with Tensorflow backend for an image segmentation task. I have images of size (128,96) as input to the network together with mask ima

3条回答
  •  长发绾君心
    2021-01-25 14:38

    Thank you @Daniel, your suggestions helped me in the end to get the Unet to work. I managed to get results that did not just classify the whole image as background when running 500+ epochs. Also, instead of using kernel_initializer='he_normal', kernel_initializer='zeros'or kernel_initializer=TruncatedNormal(mean=0.0, stddev=0.07) worked for me. I used 'sigmoid' activation function and loss='binary_crossentropy'. I kept the 'relu' activation for all the hidden convolutional layers. I noticed that my network will sometimes be stuck in a local minimum where the loss does not improve anymore, so I need to restart.

提交回复
热议问题