from tensorflow_privacy.privacy.analysis import privacy_ledger
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)
same issue here. may I ask did you slove it?
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.
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!