Join us at TensorFlow World, Oct 28-31. Use code TF20 for 20% off select passes. Register now

tff.utils.update_state

View source

Returns a new state with new values for fields in kwargs.

tff.utils.update_state(
    state,
    **kwargs
)

Args:

  • state: the structure with named fields to update.
  • **kwargs: the list of key-value pairs of fields to update in state.

Raises:

  • KeyError: if kwargs contains a field that is not in state.
  • TypeError: if state is not a structure with named fields.