Hello community,
I am trying to implement Fully convolution Networks (FCN) for semantic segmentation task on Pascal VOC 2012 dataset. I am having trouble regarding loading of dataset. My doubts are as follows:

Since in FCN-32 we get the output with dimension as = H x W x num_classes. Does this mean I have to convert my ground-truth segmentation maps to H x W x num_classes ? If yes, how can I generate one-hot encoded ground-truth images ?
What is the loss function that is used in such type of task apart from IOU, can categorical crossentropy be used in such situation ?