Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

code problem #3

Open
JuliusMa opened this issue Jun 5, 2023 · 0 comments
Open

code problem #3

JuliusMa opened this issue Jun 5, 2023 · 0 comments

Comments

@JuliusMa
Copy link

JuliusMa commented Jun 5, 2023

        swap_src_labels = src_labels[mask_idx]
        pure_tgt_top1 = top1_label[mask_idx]
        swap_ul_loss, swap_lu_loss = 0, 0
        for i in range(num_of_mask):
            swap_ul_loss += sample_wise_loss(upper_out[i], swap_src_labels[i], top1_lower[i], upper_ratio[i])
            swap_lu_loss += sample_wise_loss(lower_out[i], pure_tgt_top1[i], top1_upper[i].cuda(), lower_ratio[i])

Is the swap_src_labels equal to the top1_lower? As the paper saying that there should be the top2 and top1 labels here, is the code correct?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant