You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In line 173 of main.py, 20% of the PoisonImageNetMini were selected as the training data but with "shuffle=True", then how could you make sure these data are exactly the same 20% of the data that have been used for generating the noise?
so by using 'target' as the index, the perturb_tensor[target] will only select one of the top '0~99' components of the perturb_tensor, and add the same noise to all samples that are from the same [target] class. In this way, it definitely does it wrong but can lead to good results because it is doing class-wise noise.
The text was updated successfully, but these errors were encountered:
For Q1, np.random.seed(seed) can make sure the randomly selected samples are the same. Make sure to use the same seed.
For Q2, yes, that is an implementation error, target should be replaced with index, using target is class-wise noise. Need to add an extra variable to distinguish the class-wise and sample-wise noise in this case, I will look into it.
In line 173 of main.py, 20% of the PoisonImageNetMini were selected as the training data but with "shuffle=True", then how could you make sure these data are exactly the same 20% of the data that have been used for generating the noise?
I also find the same problem about the sample-wise noise as the one mentioned in A problem when training model on ImageNetMini #5.
in line 634 of dataset.py:
so by using 'target' as the index, the perturb_tensor[target] will only select one of the top '0~99' components of the perturb_tensor, and add the same noise to all samples that are from the same [target] class. In this way, it definitely does it wrong but can lead to good results because it is doing class-wise noise.
The text was updated successfully, but these errors were encountered: