Skip to content
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

Closed
wants to merge 43 commits into from
Closed

Conversation

kcelia
Copy link
Collaborator

@kcelia kcelia commented May 17, 2024

@andrei-stoian-zama, as discussed yesterday, I removed the useless files.

Could you please take over this PR

@cla-bot cla-bot bot added the cla-signed label May 17, 2024
Copy link
Collaborator

@jfrery jfrery left a 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.
Copy link
Collaborator

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
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe just

Suggested change
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
Copy link
Collaborator

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")
Copy link
Collaborator

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
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
# 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
Copy link
Collaborator

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
Copy link
Collaborator

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
```
Copy link
Collaborator

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants