mpc-msri / EzPC

MIT License
402 stars 122 forks source link

SCI_OT outputs not matching #208

Open anmolbhatia05 opened 9 months ago

anmolbhatia05 commented 9 months ago

I am following the steps mentioned here - https://github.com/bhatuzdaname/cryptflow-demo (also mentioned here - https://pratik-bhatu.medium.com/privacy-preserving-machine-learning-for-healthcare-using-cryptflow-cc6c379fbab7)

However, I get Output mismatch instead of Arrays matched upto 1 decimal points.

My config.json is the same as given in the cryptflow-demo repository -

{
  "model_name": "model.pb",
  "input_tensors": { "Placeholder" : "1,224,224,3"},
  "target": "SCI",
  "scale": 12,
  "output_tensors": [ "fc/fc"]
}

The output that my client sees is as follows - [

Screenshot 2024-02-21 at 13 09 27

](URL)

I am not sure what is going wrong...

VerkuijlKim commented 5 months ago

I am having the same issue unfortunately. For scale 12 I also get:

Output mismatch tensorflow_output.npy : [ 6.90567 -4.355782 -18.939846] output_output.npy : [5.36870909e+08 5.36870898e+08 5.36870903e+08]

And for scale 20 that they use in the Medium article:

Output mismatch tensorflow_output.npy : [ 6.90567 -4.355782 -18.939846] output_output.npy : [0.94352341 0.68226719 0.90837574]

Did you eventually solve this?