marsplus / SG-Unlearn

The code to replicate the experiments in the paper "Adversarial Machine Unlearning".
https://arxiv.org/abs/2406.07687
0 stars 0 forks source link

Discrepancy between the official implementation of resnet18 from PyTorch and custom implementation #1

Open marsplus opened 7 months ago

marsplus commented 7 months ago

There is a discrepancy when using automatic differentiation to solve the attacker's optimization problem between: 1) the official implementation of ResNet18 from Pytorch (as imported by from torchvision.models import resnet18) and 2) the customer implementation of ResNet18 as in https://github.com/marsplus/SG-Unlearn/blob/Zonglin/src/resnet.py

Specifically, this line fails: https://github.com/marsplus/SG-Unlearn/blob/14453a8d3e2b51f98f7bf8619a4de6815c465202/src/models.py#L715

marsplus commented 7 months ago

@ElegantLin This is just for our own records.