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

Low accuracy of LeNet #11

Open
llCurious opened this issue Apr 6, 2023 · 6 comments
Open

Low accuracy of LeNet #11

llCurious opened this issue Apr 6, 2023 · 6 comments

Comments

@llCurious
Copy link

Hey. I try to run the experiments for LeNet model. However i noticed that the convergence of LeNet is weird. The test accuracy of LeNet remains low (far from 98%). I only changed the localhost_config.json to run locally with the following configurations:

  1. 3PC computation based on Falcon
  2. network: files/models/lenet.json
  3. batch size: 128
  4. epoch: 5
  5. lr: 2^-4
  6. precision: 16

The output is as follows:
image

@llCurious
Copy link
Author

Hey, @jlwatson. Sry to bother you. But do you have any ideas?

@jlwatson
Copy link
Collaborator

jlwatson commented Apr 7, 2023

Hey! I can't immediately run some tests, but as a starting point, could you try running it with models/lenet-norelu.json?

That's the actual LeNet architecture we evaluated with, it just doesn't have the last relu layer, which doesn't interact well with our loss function.

@llCurious
Copy link
Author

Thanks to you quick reply!!
I just run the model of lenet-norelu. The accuracy results seems to work fine. BTW, do you mean for other networks like secureml, minionn and so on, I should remove the last relu layer?
image

@jlwatson
Copy link
Collaborator

jlwatson commented Apr 17, 2023 via email

@allenlin316
Copy link

I also tried the same training using local_running.sh with MNIST dataset with files/models/lenet-norelu.json model. But somehow I only got the result as below image.
I wonder what did I do wrong? Thanks in advance!
image

@allenlin316
Copy link

I also tried the same training using local_running.sh with MNIST dataset with files/models/lenet-norelu.json model. But somehow I only got the result as below image. I wonder what did I do wrong? Thanks in advance! image

I just solved it by remaking the Makefile with 23 bits because of paper mentioned LeNet secure training of neural network
command remake is as: make -j8 PIRANHA_FLAGS="-DFLOAT_PRECISION=23 -DTWOPC"

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

No branches or pull requests

3 participants