Attend the Women in ML Symposium on December 7 Register now

tf_privacy.restart_query.PeriodicRoundRestartIndicator

Stay organized with collections Save and categorize content based on your preferences.

Indicator for resetting the tree state after every a few number of queries.

Inherits From: RestartIndicator

The indicator will maintain an internal counter as state.

period The next function will return True every period number of next calls.
warmup The first True will be returned at the warmup times call of next.

Methods

initialize

View source

Returns initialized state of 0 for PeriodicRoundRestartIndicator.

next

View source

Gets next bool indicator and advances the state.

Args
state The current state.

Returns
A pair (value, new_state) where value is the bool indicator and new_state of state+1.