Open fulcus opened 1 year ago
It is worth adding that I modified the original code as described in https://github.com/XLearning-SCU/2022-IJCV-TCL/pull/3
Hi, it seems that in that batch there are no confident predictions selected as pseudo labels. In line 367 in loss.py, the cluster loss would be set to zero in that case. Thus the cluster projector did not receive grad, which leads to the above error. You could manually check the loss value.
Thank you for quick response!
On CIFAR it might be caused by the low number of epochs (50 vs the paper's 1000), but on my custom dataset I trained over 1000 epochs and it had the same issue. So my question is:
What is the target cluster number of your custom dataset? As pointed out in the paper, when the cluster number is large, a sharper temperature in cluster-level loss is recommended. If there is no ground-truth label for evaluation, you may start the boosting stage when a reasonable percent of samples have confident predictions (e.g., 20% of samples having >0.9 confidence).
Thank you for quick response!
On CIFAR it might be caused by the low number of epochs (50 vs the paper's 1000), but on my custom dataset I trained over 1000 epochs and it had the same issue. So my question is:
- Why are there no confident predictions?
- Is there a way to understand if my training yielded good enough predictions to get some pseudo-labels before running boost.py?
Hello, I have encountered the same problem. Have you solved it?
Hi, sorry but I haven't worked on it much anymore. After learning the problem was the low confidence and high number of clusters I just reduced the number of clusters, each having more samples. It worked pretty well.
Hi, sorry but I haven't worked on it much anymore. After learning the problem was the low confidence and high number of clusters I just reduced the number of clusters, each having more samples. It worked pretty well.
Thank you for your reply. I encountered this problem when replacing my dataset, and my dataset only has 10 categories. I tried to modify the confidence parameter in InstanceLossBoost, but there was an error
Training for 50 epochs on CIFAR-10 with
and then boosting with
Throws the following error:
This occurs in the middle of the 2nd boosting epoch. Full log: tcl_cifar_exception.txt
This first occurred while I was boosting on a custom dataset, so I tried on CIFAR to see if it was caused by the model itself or the dataset. I think https://github.com/Yunfan-Li/Twin-Contrastive-Learning/issues/3#issuecomment-1277888022 was referring to this too.