privacytrustlab / ml_privacy_meter

Privacy Meter: An open-source library to audit data privacy in statistical and machine learning algorithms.
MIT License
560 stars 99 forks source link

exceed system memory #13

Closed codejeremy closed 3 years ago

codejeremy commented 3 years ago

hello,When I ran the code, there was an error that exceeded the video memory. I tried to modify the batch_size but still reported an error. I would like to ask how big the GPU memory is during the experiment? Also, is this experiment actually running on a personal laptop or on a server?thank you very much.

mihirkhandekar commented 3 years ago

The experiment is running on a server with GPU, TITAN Xp, 12196MiB total memory. Could you please share when it is going out of memory, the dataset you are using, and attack configuration? For instance, the whitebox setting attack which uses gradients uses comparatively more memory.

codejeremy commented 3 years ago

The experiment is running on a server with GPU, TITAN Xp, 12196MiB total memory. Could you please share when it is going out of memory, the dataset you are using, and attack configuration? For instance, the whitebox setting attack which uses gradients uses comparatively more memory.

Thank you for your reply, I am using my own laptop, the GPU memory is 6G, the data set is cifar100 and purchase100, and the pre-training model used is alexnet_pretrained after decompression(In the source code you provide),Other configurations are the default in your code;The picture below is a screenshot of the logs folder during code execution。Thank you again! logs

mihirkhandekar commented 3 years ago

Thanks for the details. When there are gradients_to_exploit, it uses more memory. However it should not use as much for the purchase100 model. It would be helpful if you share the logs when you run it. Could you also try different configurations as given in the documentation, to narrow down the issue?