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

Possible minor issue in process of updating environment #2

Open
jinyery opened this issue May 4, 2023 · 0 comments
Open

Possible minor issue in process of updating environment #2

jinyery opened this issue May 4, 2023 · 0 comments

Comments

@jinyery
Copy link

jinyery commented May 4, 2023

Hello, this is really a great job and presents a new challenge. But I think there is a small logical flaw in the implementation of the code, specifically in the function "generate_intra_weight()" of the file "train_center_dual. py", because "intra_weight=torch.zeros (total_image).fill_ (0.0)" and "intra_weight[ind]=score" result in partial weights always being zero in the DistributionSampler.

The adjustment of weights is calculated based on the data sampled from the previous epoch. The sampling of DistributionSampler is replacement, so it is highly likely that not all samples will be sampled in the previous epoch. This results in the weight of minority samples in the new environment always being zero after update_env_by_score().

The following modifications may solve this problem:
DistributionSampler

@jinyery jinyery changed the title Code vulnerability in update environment Possible minor issue in process of updating environment May 10, 2023
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