Regarding the code of your project, when starting the semi-supervised training at 350, it seems that the CSC/CAC_loss is not involved in the entire training process. Could you please explain how it functions?
if epoch >= args.start_fusion_epoch: ### start semi-supervised on unlabeled data model.cuda() model.eval() with autocast(enabled=args.amp): with torch.no_grad(): ct_img_F_ds, mri_img_F_ds, ct_unlabeled_output, mri_unlabeled_output = model(ct_unlabeled_data, mri_unlabeled_data) ### compute CSC loss CSC_loss = CSC_loss_func(ct_img_F_ds, mri_img_F_ds) CAC_loss = CAC_loss_func(ct_unlabeled_output, mri_unlabeled_output) ### compute CSC loss consistency_weight_csc = sigmoid_rampup(epoch, args.max_epochs) ### compute CAC loss consistency_weight_cac = cosine_rampdown(epoch, args.max_epochs) loss = sup_loss + consistency_weight_csc * CSC_loss + consistency_weight_cac * CAC_loss
Regarding the code of your project, when starting the semi-supervised training at 350, it seems that the CSC/CAC_loss is not involved in the entire training process. Could you please explain how it functions?
if epoch >= args.start_fusion_epoch: ### start semi-supervised on unlabeled data model.cuda() model.eval() with autocast(enabled=args.amp): with torch.no_grad(): ct_img_F_ds, mri_img_F_ds, ct_unlabeled_output, mri_unlabeled_output = model(ct_unlabeled_data, mri_unlabeled_data) ### compute CSC loss CSC_loss = CSC_loss_func(ct_img_F_ds, mri_img_F_ds) CAC_loss = CAC_loss_func(ct_unlabeled_output, mri_unlabeled_output) ### compute CSC loss consistency_weight_csc = sigmoid_rampup(epoch, args.max_epochs) ### compute CAC loss consistency_weight_cac = cosine_rampdown(epoch, args.max_epochs) loss = sup_loss + consistency_weight_csc * CSC_loss + consistency_weight_cac * CAC_loss