Multitask unet for dual segmentation

is it possible to train one unet with a shared encoder and dual decoders to perform two different tasks?