LINs-lab / ttab

[ICML23] On Pitfalls of Test-Time Adaptation
https://arxiv.org/abs/2306.03536
Apache License 2.0
101 stars 10 forks source link

I have one question about CrossMixture and HomogeneousNoMixture settings #20

Closed Katono5 closed 1 month ago

Katono5 commented 7 months ago

Hi, Based on my understanding of these two settings, HomogeneousNoMixture will pass test samples within one domain and the other without mixing them together, but CrossMixture will first merge two datasets then pass the mixed test samples to model, so the data batches send to model is largely different, but when I print the logits out from one_adapt_step function, https://github.com/LINs-lab/ttab/blob/815fc942f9630f2499ad2e0dd556fc199222e4da/ttab/model_adaptation/tent.py#L72 https://github.com/LINs-lab/ttab/blob/815fc942f9630f2499ad2e0dd556fc199222e4da/ttab/model_adaptation/tent.py#L83 I found out that no matter I use CrossMixture or HomogeneousNoMixture setting, the output is exactly same, so the input is same as well. Which is really weird to me since I suppose the input would be really different. But based on the final result the acc after adaptation is indeed different between these two settings so the setting indeed works, I pasted two print_out result below so that you can understand my question.

Could you help me find out what's the reason for the same output?

image image

Katono5 commented 7 months ago

Further information about my problem, here softmax-ed output at the very last step after adaptation using HomogeneousNoMixture and CrossMixture. image image

MarcellusZhao commented 6 months ago

Hi,

To quickly check this issue, I output the indices of merged dataset in both cases (i.e., HomogeneousNoMixture and CrossMixture). And it seems to me both settings here work correctly. I show the the indices as follows,

CleanShot 2024-04-06 at 15 39 02@2x CleanShot 2024-04-06 at 15 40 25@2x

QiuWilliam commented 4 months ago

Hii,if I want to test the adaptation method in the case of multi-domain mixture (where a batch contains data from multiple domains), the results for CIFAR10-C,what should I do to the cifar10c.py.I have choose the CrossMixture,but the results still shows the test domain is only one test set of CIFAR10-C.The test domain is separete.What should I do to combine the whole CIFAR10C test set. 捕获 image