How to change the output shape of a semantic segmentation model?

You are trying to load pre-trained model weight to it.
Don’t need pre-trained weight
use :
deeplabv3_resnet50(weights=None,num_classes=1)
and if it’s necessary, try: