Commit graph

11 commits

Author SHA1 Message Date
Zachary Garrett
c08f3ebdc7 Workaround until the new bolt_on module is integrated into the rest of the TF Privacy build system.
PiperOrigin-RevId: 261222062
2019-08-01 16:32:32 -07:00
Christopher Choquette Choo
c0bd19365b Refactoring bolton package to bolt_on only in code usages. 2019-07-31 10:52:41 -04:00
Christopher Choquette Choo
2065f2b16a Code style and documentation changes. 2019-07-30 15:12:22 -04:00
Christopher Choquette Choo
f41be2c598 Bolton implementation and unit tests. Has two pre-implemented loss functions. 2019-06-19 10:46:30 -04:00
Galen Andrew
d5dcfec745 Remove set_denominator functions from DPQuery and make QueryWithLedger easier to use.
set_denominator was added so that the batch size doesn't need to be specified before constructing the optimizer, but it breaks the DPQuery abstraction. Now the optimizer uses a GaussianSumQuery instead of GaussianAverageQuery, and normalization by batch size is done inside the optimizer.

Also instead of creating all DPQueries with a PrivacyLedger and then wrapping with QueryWithLedger, it is now sufficient to create the queries with no ledger and QueryWithLedger will construct the ledger and pass it to all inner queries.

PiperOrigin-RevId: 251462353
2019-06-04 10:14:32 -07:00
Galen Andrew
aaf029edad Add quantile_adaptive_clip_sum_query which dynamically adjusts the clipping norm so a specified fraction of records per sample are clipped.
PiperOrigin-RevId: 248201320
2019-05-14 13:35:29 -07:00
Ilya Mironov
51e29667d9 Fixing issue #44 (imports in privacy/__init__.py). Added __init__.py to the dp_query directory for Python 2 compatibility.
PiperOrigin-RevId: 243329997
2019-04-12 14:10:48 -07:00
Ilya Mironov
3c4409d6d6 Restoring ability to run compute_dp_sgd_privacy.py as a standalone script.
At present, the script has no heavy dependencies except for the rdp_accountant, which is by itself pretty light-weight. However, importing rdp_accountant triggers __init__.py in third_party/py/tensorflow_privacy/privacy, which loads TF and all of tf.privacy. The CL adds a check to the __init__.py, which controls this behavior.

PiperOrigin-RevId: 243172355
2019-04-11 17:06:53 -07:00
Galen Andrew
e8113a0365 Add DummyOptimizer to top-level imports.
PiperOrigin-RevId: 242715034
2019-04-09 12:14:22 -07:00
Galen Andrew
6231d0802d Cleanup directory structure, add top-level imports and add normalized_query.
Moved query classes from dir optimizers into new dir dp_query. Added NormalizedQuery class for queries that divide the output of another query by a constant like GaussianAverageQuery.

PiperOrigin-RevId: 240167115
2019-03-25 10:21:04 -07:00
Steve Chien
1595ed3cd1 Project import generated by Copybara.
PiperOrigin-RevId: 226056146
2018-12-18 15:44:04 -08:00