you have your training set that comprises of labeled as well as unlabeled data the reason being it increases the chances of getting more label data which in turn will be fed to your model to have a larger training set than what was initially available so all this is getting done to ensure that your training set increases in number than what you have earlier the last step in the algorithm is calculating the loss because we have a label set the first loss that gets calculated is the cross entropy loss for supervised