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

from tensorflow_privacy.privacy.analysis import privacy_ledger #407

Open
Turningl opened this issue Dec 29, 2022 · 3 comments
Open

from tensorflow_privacy.privacy.analysis import privacy_ledger #407

Turningl opened this issue Dec 29, 2022 · 3 comments

Comments

@Turningl
Copy link

ImportError: cannot import name 'privacy_ledger' from 'tensorflow_privacy.privacy.analysis' (C:\miniconda3\envs\tensorflow-gpu\lib\site-packages\tensorflow_privacy\privacy\analysis_init_.py)

@lesleychou
Copy link

same issue here. may I ask did you slove it?

@galenmandrew
Copy link
Collaborator

privacy_ledger was deprecated and removed from tensorflow_privacy. Please use the functions in https://github.com/google/differential-privacy/tree/main/python/dp_accounting for accounting.

@lesleychou
Copy link

Thanks for the quick reply!

Actually I was trying to use privacy_ledger because of another error:
AssertionError: compute_gradients() on the differentially private optimizer was not called. Which means that the training is not differentially private. It happens for example in Keras training in TensorFlow 2.0+.

I checked all of the related issues but still couldn't solve the above. Any idea on how I can avoid this error? Thanks again!

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