Skip to content

Commit

Permalink
Add one to epochs in epsilon calculation
Browse files Browse the repository at this point in the history
GitOrigin-RevId: 65eac5d94ce0366f560abd0614435312649f6e27
  • Loading branch information
lipikaramaswamy committed Mar 8, 2022
1 parent 34e62bd commit 90ae80a
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/gretel_synthetics/tensorflow/train.py
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,9 @@ def on_epoch_end(self, epoch, logs: dict = None):
if self.config.dp:
# Account for tf-privacy library writing to stdout
with redirect_stdout(io.StringIO()):
eps, _ = compute_epsilon(self.num_examples_train, self.config, epoch)
eps, _ = compute_epsilon(
self.num_examples_train, self.config, epoch + 1
)
logs[METRIC_EPSILON] = eps

# NOTE: this is just a list of the same value, but
Expand Down

0 comments on commit 90ae80a

Please sign in to comment.