This is my evaluate function for federated learning:
def evaluate(num_rounds=10):
state = trainer.initialize()
for round in range(num_rounds):
t1 = time.time()
state, metrics = trainer.next(state, client_data)
t2 = time.time()
print('Round {}: metrics {}, round time {}'.format(
round+1,metrics, t2 - t1))
I need to save the state after 10 rounds and need to load the state and resume from the 11th round. How to do it? Help me...