yukilulu/CaC

missing file

Opened this issue · 17 comments

May I ask if you have Art_ list.txt and so on

already uploaded,please check in the path: /data/Office-home

I reproduced the code for this article, with an accuracy of 80%, a difference of 6%. It's just that the category order of the Visda dataset is different. Could this be the reason? I reproduced it under the Windows system.

I don't think the order would lead to the different. Have you under the evironment of pytorch 1.3 and cuda 10.0? If the eviorment is no problem, could you provided the log file for you source and target domain?

Just now I set the parameter of k to 6, and the result is 85.51%. Is it because of k?

K would cause some different. But, there shouldn't be such a significant drop if you set K to 5 before. If K is lower than 5, then the result will really low because VisDA has more numbers and fewer categories.

torch | 1.11.0+cu113 |  ,this is my environment

My experiments were conducted under ubuntu, if you are using window, it is best to keep the cuda and torch versions consistent in order to reproduce the results.

Thank you very much for your previous help!

        idx_near = index_bank[indices]

        # The nearest neighbors of the current sample are stored in the memory bank
        # 当前样本的最近邻居存储在存储器组中
        near_bank = torch.cat((near_bank[bs:, :], idx_near[:, 1:].cuda()), dim=0)
       
        idx_double = near_bank[indices[:, 1:]]  # bs,k,k
        tar_idx_ = tar_idx.unsqueeze(0).unsqueeze(0).unsqueeze(0)

idx_near ,idx_double What are the differences and connections between these two?Especially what does ’idx_double‘ mean

For sample x, “idx_near” mean its neighbors, and "idx_double" mean expanded neighbors. The relationship between the two is that the extended neighbors are the neighbors of the neighbors of sample x.

Is match [0] the matching relationship between all similar neighbors of the first sample and the current batch? Is match [-1] the matching relationship between all similar neighbors of the 64th sample and the current batch? But what is the connection between the first sample and the 64th sample?

Match[-1] means that the nearest neighbor of x is equal to the index corresponding to the tar_idx, so, these samples are consider similar samples too, and should be excluded in the negative pooling.

Match [0] and match [-1] are used to mask these negative samples, and these samples are similar, as described in detail in section 3.6 of the paper, "Finding the Truly Negative Pair".

What is the difference between match[0] and match[1] ... match[-1] and can you explain their meaning more specifically

I forgot an important command in the first version, and now I have made corresponding changes: adding torch. where (match>0) to index it. In order to better describe the meaning of each dim in the tuple 'match', I have updated the corresponding explanation in (tar_adaptation. py);

At the same time, I uploaded a simple example in the file "A simple example of tuple" match ". ipynb", which I believe can help you better understand match.

In 'train_tar. sh', there is no parameter after '-- weight'. In 'tar_adaptation. py', is weight not activated? Did you not remove inaccurate negative samples?

"--weight" is a trigger parameter with action = "store_true". And weight is activated with '-- weight'

Is the classifier of the target domain frozen?

yes