'TFF : Print state that receives each client

I would like to print the state that receives each client after training, Here is my loop:

NUM_ROUNDS = 5
for round_num in range(NUM_ROUNDS):
  print('Round {r}'.format(r=round_num))
  print(state.model)
  state, metrics = fed_avg.next(state, train_datasets)
  train_metrics = metrics['train']
  print('\tTrain: loss={l:.3f}, accuracy={a:.3f}'.format(
      l=train_metrics['loss'], a=train_metrics['accuracy']))

Here state.model is the state in each round, but I would like to see the state that receives each client from the 4 clients. Thanks



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source