-
Notifications
You must be signed in to change notification settings - Fork 121
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
Chore/white paper experiment #683
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice job! I have made a few comments. Plus I am not sure why we keep a notebook + run_experiments.py. They seem to be identical.
@@ -0,0 +1,24 @@ | |||
# Reproducing Paper **Programmable Bootstrapping Enables Efficient Homomorphic Inference of Deep Neural Networks** : Benchmarking Results | |||
|
|||
This notebook replicates experiments from the paper [_Programmable Bootstrapping Enables Efficient Homomorphic Inference of Deep Neural Networks_](https://whitepaper.zama.ai/), published in 2021. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Worth a word about timing in the paper being obsolete I think.
<!--pytest-codeblocks:skip--> | ||
|
||
```bash | ||
python3.8 -m venv .venv |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe just
python3.8 -m venv .venv | |
python -m venv .venv |
We shouldn't assume a python version.
<!--pytest-codeblocks:skip--> | ||
|
||
```bash | ||
pip3 install -U pip wheel setuptools --ignore-installed |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same here. I think pip is default now.
|
||
print("starting") | ||
|
||
DEVICE = "cpu" # torch.device("cuda" if torch.cuda.is_available() else "cpu") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't understand the comment here.
# Seed to ensure reproducibility | ||
SEED = 42 | ||
|
||
# Wether the experiments are run on PC or other machines, like HP7C on AWS |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
# Wether the experiments are run on PC or other machines, like HP7C on AWS | |
# Whether the experiments are run on PC or other machines, like HP7C on AWS |
] | ||
|
||
|
||
# The article presents 3 neural network depths. In this notebook, we focus NN-20 and NN-50 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We should mention why we did not do the NN-100
|
||
# Make a grid from batch and rotate to get a valid shape for imshow | ||
images = make_grid(images[:n], nrow=n).permute((1, 2, 0)) | ||
# Remove the previous normalization |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Blank line before comment
```bash | ||
pip3 install -U pip wheel setuptools --ignore-installed | ||
pip3 install -r requirements.txt --ignore-installed | ||
``` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we can have a nice table display old and current results.
@andrei-stoian-zama, as discussed yesterday, I removed the useless files.
Could you please take over this PR