Skip to content
Snippets Groups Projects
Commit d0a5c295 authored by Nishant Kumar's avatar Nishant Kumar
Browse files

Small correction in usage in README.md.

parent 4399589d
No related branches found
No related tags found
No related merge requests found
......@@ -19,14 +19,14 @@ The codebase is organized as follows:
- `Paths.config`: This can be used to override the default folders for EzPC and Porthos.
# Usage
Here we provide an example on how to use Athos to compile TensorFlow based ResNet-50 code to Porthos semi-honest 3PC protocol. The relevant TensorFlow code for ResNet-50 can be found in `./Networks/ResNet/ResNet_main.py`.
Here we provide an example on how to use Athos to compile TensorFlow based ResNet-50 code to Porthos semi-honest 3PC protocol and subsequently run it. The relevant TensorFlow code for ResNet-50 can be found in `./Networks/ResNet/ResNet_main.py`.
- Refer to `./Networks/ResNet/README.md` for instructions on how to download and extract the ResNet-50 pretrained model from the official TensorFlow model page.
- `cd ./Networks/ResNet && python3 ResNet_main.py --runPrediction True --scalingFac 12 --saveImgAndWtData True && cd -`
Runs the ResNet-50 code written in TensorFlow to dump the metadata which is required by Athos for further compilation.
This command execution should result in 2 files which will be used for further compilation - `./Networks/ResNet/graphDef.mtdata` and `./Networks/ResNet/sizeInfo.mtdata`. In addition, a file `./Networks/ResNet/ResNet_img_input.inp` should be created which contains the ResNet-50 pretrained-model and image in a format which can be used later by Porthos.
- `./CompileTF.sh -b 64 -s 12 -t PORTHOS -f ./Networks/ResNet/ResNet_main.py`
Using the `CompileTF.sh` script to compile the model to Porthos. This should result in creation of the file - `./Networks/ResNet/ResNet_main_64_porthos0.cpp`.
- `cp ./Networks/ResNet/ResNet_main_64_porthos0.cpp ../Porthos/main.cpp`
- `cp ./Networks/ResNet/ResNet_main_64_porthos0.cpp ../Porthos/src/main.cpp`
Copy the compiled file to Porthos.
- `cd ../Porthos && make clean && make -j`
- Finally run the 3 parties. Open 3 terminals and run the following in each for the 3 parties.
......
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