Comments (3)
ResNet Implementation:
There is no specific reason for not using torchvision models. The implementation of ResNet is just copy-paste from other projects. See https://github.com/kuangliu/pytorch-cifar/blob/master/models/resnet.py
The differences between the two implementations are the kernel size
, padding
and stride
for conv1
. The torchvision's model will reduce the h,w after conv1
. My guess is torchvision's model is meant for ImageNet with larger resolutions.
Performance issue:
The visualizing of the noise is by normalizing it to [0,255] so that it can be displayed, so the black image may mean the noise is all 0s. Have you examined the noise by printing them? I have reproduced the result as you mentioned by replacing torchvision's model. Validation accuracy is around 40%, but unable to produce the black image of the noise. I tested our implementation of ResNet to generate the noise and applies to torchvision.models.resnet18, the validation accuracy is around 25%. For this difference in the implementation, my guess is the hyperparameters for noise generation need an update, i.e. the termination and number of steps for the model.
Time issue:
The results shown in the notebook was run with RTX-2080-Ti. It took around 3 minutes per epoch for generating the noise, with total 10 epochs. So around 30 minutes in total. Removing mlconfig has no effect on speed. I do not see any other reason that could cause the slowdown on your machine. Can you provide more details on the hardware? Also, because the torchvision models reduce the h,w resolutions, it makes sense that this model can run faster.
from unlearnable-examples.
Thank you for the explanation.
For the visualizing noise issue, I discovered that some noises have a minimum value = maximum value, which would cause a division by 0 when running your normalizing code. Interestingly, it did not trigger a division by zero error, although the resulting normalized noise are very close to 0. Handling the minimum value = maximum value case by not dividing by the difference visualizes the noises correctly.
For the performance issue, may I clarify if your validation accuracy is computed on clean images? I can confirm that the noise generated by your Res-18 model also works well on a torchvision Res-18.
For the timing issue, I used Google Colab (Tesla T4), so maybe it just is caused by the specific GPU used. While mlconfig is not a culprit, I suggest that it be removed from the init file to avoid import errors for people cloning your repo, or include it in a requirements file.
from unlearnable-examples.
Thanks for your intrest in our work.
Yes, it is the validation accuracy computed on clean images. There may be slight variations between the noise generation with yours. But the using the torchvision.models.resnet18 to generate the noise is less effective.
Thanks for your suggestion on mlconfig
. I will update the repo.
from unlearnable-examples.
Related Issues (19)
- Several questions about this article HOT 4
- Some questions about training Inception-ResNet HOT 11
- Questions about training casia-webface dataset HOT 1
- 关于噪声处理的问题? HOT 4
- Some questions about face recognition poisoning attack HOT 5
- A problem about noise generating. HOT 1
- keyerror报错 HOT 1
- Generating examples using CelebA HOT 1
- Can you share your experience with fast-autoaugment HOT 2
- bugs when generating sample wise perturbation HOT 1
- About the plot setting in the paper HOT 2
- About visualizing the results according to log file HOT 1
- 应用场景与设定变更时,该如何保证不可学效果 HOT 2
- KeyError: 'train_subset' HOT 4
- A problem when training model on ImageNetMini HOT 1
- Mismatch of the training data augmentation between QuickStart.ipynb and main.py HOT 1
- Two problems in training code of ImageNetMini HOT 1
- A problem with bi-level optimization in the article HOT 6
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from unlearnable-examples.