snwagh / falcon-public

Implementation of protocols in Falcon
90 stars 46 forks source link

How to get training accuracy? #23

Open aanand300 opened 2 years ago

aanand300 commented 2 years ago

Hi all, I was trying to get the accuracy as done in one of the previous issues #8 but I realized the NeuralNetwork::getAccuracy() function has been commented out and as a result temp_groundTruth is not updated. I am always getting 100% accuracy since both counter[0] and counter[1] have same values. Can anyone please help to fix this issue? Thanks

aanand300 commented 2 years ago

On further looking at code in secondary.cpp, it seems that train_data and test_data files here are not present. Do we need to provide the dataset ourselves? If yes, can anyone please help with the format of input data? Any example or reference would be helpful

snwagh commented 2 years ago

You'll have to download and parse the MNIST dataset yourself. There is some helper script provided in the old SecureNN codebase, you can use that to transform the raw MNIST into a "good format" (essentially the train_data, test_data files). You can then load pre-trained models provided in the files/preload folder and then see if the getAccuracy() function works.

aanand300 commented 2 years ago

Thanks. I will try this and post here in case I face any issue

snwagh commented 2 years ago

This might be related: #29