We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
比如SIA论文里描述的需要计算平均梯度,但是我在代码中没有发现这一步骤的显示实现,我代码能力比较薄弱qwq,希望可以解答我的困惑,十分感谢。
` for _ in range(self.epoch): # Obtain the output logits = self.get_logits(self.transform(data+delta, momentum=momentum))
# Calculate the loss loss = self.get_loss(logits, label) # Calculate the gradients grad = self.get_grad(loss, delta) # Calculate the momentum momentum = self.get_momentum(grad, momentum) # Update adversarial perturbation delta = self.update_delta(delta, data, momentum, self.alpha) return delta.detach()`
The text was updated successfully, but these errors were encountered:
No branches or pull requests
比如SIA论文里描述的需要计算平均梯度,但是我在代码中没有发现这一步骤的显示实现,我代码能力比较薄弱qwq,希望可以解答我的困惑,十分感谢。
` for _ in range(self.epoch):
# Obtain the output
logits = self.get_logits(self.transform(data+delta, momentum=momentum))
The text was updated successfully, but these errors were encountered: