Skip to content
Snippets Groups Projects
Commit 9a054b2a authored by Mayank Rathee's avatar Mayank Rathee
Browse files

Merge branch 'master' of https://github.com/mpc-msri/EzPC

parents 4a34bd52 67f1e544
No related branches found
No related tags found
No related merge requests found
...@@ -6,15 +6,23 @@ This folder contains code for Porthos - a semi-honest 3 party secure computation ...@@ -6,15 +6,23 @@ This folder contains code for Porthos - a semi-honest 3 party secure computation
* sudo apt-get install libssl-dev * sudo apt-get install libssl-dev
* sudo apt-get install g++ * sudo apt-get install g++
* sudo apt-get install make * sudo apt-get install make
* sudo apt-get install cmake
# Running the protocol # Running the protocol
- First setup Eigen library, used for fast matrix multiplication by Porthos, by running `./setup-eigen.sh`. - First setup Eigen library, used for fast matrix multiplication by Porthos, by running `./setup-eigen.sh`.
- Currently the codebase contains precompiled code for the following 3 neural networks: ResNet-50, DenseNet-121 and SqueezeNet for ImageNet, checked into the following folder: `./src/example_neural_nets`. Toggle the flag in `./src/example_neural_nets/network_config.h` to switch the network which runs. Note that if there is more than one network flag uncommented (meaning ON) or if there is already a main file in src, the compilation will error out saying multiple declarations of main function. - Currently the codebase contains precompiled code for the following 3 neural networks: ResNet-50, DenseNet-121 and SqueezeNet for ImageNet, checked into the following folder: `./src/example_neural_nets`.
- To compile use `make clean && make -j`. - To compile, do the following (from Porthos root):
- To run for example the ResNet-50 code, use the following commands: ```
`./party0.sh < ../Athos/Networks/ResNet/ResNet_img.inp`, cd src/
`./party1.sh < ../Athos/Networks/ResNet/ResNet_weights.inp`, and mkdir build
`./party2.sh`. cd build
cmake ..
make -j
```
- To run the MPC code for SqueezeNet, ResNet50 or DenseNet121, from Porthos root, use the following commands: (example shown for ResNet50)
`./party0.sh ResNet50 < ../Athos/Networks/ResNet/ResNet_img.inp`,
`./party1.sh ResNet50 < ../Athos/Networks/ResNet/ResNet_weights.inp`, and
`./party2.sh ResNet50`.
The above commands make use of fixed-point input files generated from Athos. Please refer to the `README.md` of Athos for instructions on how to generate the same. Also, note that in the scenario of secure inference, `party0.sh` represents the client, which inputs the image, `party1.sh` represents the server, which inputs the model and `party2.sh` represents the helper party which doesn't have any input. The output is learned by `party0`, which represents the client. The above commands make use of fixed-point input files generated from Athos. Please refer to the `README.md` of Athos for instructions on how to generate the same. Also, note that in the scenario of secure inference, `party0.sh` represents the client, which inputs the image, `party1.sh` represents the server, which inputs the model and `party2.sh` represents the helper party which doesn't have any input. The output is learned by `party0`, which represents the client.
# External Code # External Code
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment