hao.liu:

in your reply do you mean that when I use the multi-classes semantic segmentation network, its output shape must be [batch size, num_classes, width, height] ? and also i need use argmax() function to get the final single-channel result


Yes, that’s the standard workflow. I’m not familiar with the .dlc format, but in case you can call a custom method of your deployed model, you could also create an e.g. predict method, which could call the forward method with the additional torch.argmax internally. Once deployed, you could then use preds = model.predict(input).