tensorflow / privacy

Library for training machine learning models with privacy for training data
Apache License 2.0
1.95k stars 452 forks source link

AttributeError: module 'tensorflow_privacy.privacy.analysis.compute_dp_sgd_privacy' has no attribute 'compute_dp_sgd_privacy' #473

Open ripankundu opened 1 year ago

ripankundu commented 1 year ago

Hi, I am trying to measure the differential privacy guarantee by using the ".compute_dp_sgd_privacy". However, itt show the following error. I installed the package as well. But don't know why that is happen. Could anyone help to solve this problem.


AttributeError Traceback (most recent call last) in <cell line: 1>() ----> 1 compute_dp_sgd_privacy.compute_dp_sgd_privacy(n=train_data.shape[0], 2 batch_size=batch_size, 3 noise_multiplier=noise_multiplier, 4 epochs=epochs, 5 delta=1e-5)

AttributeError: module 'tensorflow_privacy.privacy.analysis.compute_dp_sgd_privacy' has no attribute 'compute_dp_sgd_privacy'

galenmandrew commented 1 year ago

The package 'compute_dp_sgd_privacy' is a binary, meant to be called from the command line. In the package 'compute_dp_sgd_privacy_lib' there is a function 'compute_dp_sgd_privacy', but it is deprecated.

ripankundu commented 1 year ago

@galenmandrew thank you for your response. Then how can I call this 'compute_dp_sgd_privacy'. Should I need to update the library or something else.