'The output of : create_tf_dataset_from_all_clients
In order to understand the output of .create_tf_dataset_from_all_clients
, and like the official link say :
Creates a new tf.data.Dataset containing all client examples. This function is intended for use training centralized, non-distributed models (num_clients=1). This can be useful as a point of comparison against federated models. Currently, the implementation produces a dataset that contains all examples from a single client in order, and so generally additional shuffling should be performed.
I have 4 federated clients, each of them contain 700 images on test. Now I would like to evaluate my keras_model So I write this :
test_data = test.create_tf_dataset_from_all_clients()
keras_model.evaluate(test_data, steps=2800 // 2, verbose=0)
Or this:
test_data = test.create_tf_dataset_from_all_clients()
keras_model.evaluate(test_data, steps=700 // 2, verbose=0)
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
Solution | Source |
---|