I\'m able to train a U-net with labeled images that have a binary classification.
But I\'m having a hard time figuring out how to configure the final layers in Kera
Bit late but you should try
mask_train = to_categorical(mask_train, num_classes=None)
That will result in (634, 4, 64, 64) for mask_train.shape and a binary mask for each individual class (one-hot encoded).
(634, 4, 64, 64)
mask_train.shape
Last conv layer, activation and loss looks good for multiclass segmentation.