Categories
Misc

How do I carry out a simple Federated K-Means implementation in Tensorflow?

I am trying to carry out K-Means algorithm in a federated environment using the in-built algorithm function provided by TFF.

I am passing a list of

<PrefetchDataset element_spec=OrderedDict( [('x', TensorSpec(shape=(7811, 3), dtype=tf.float64, name=None))] )> 

of a couple of clients in the 2nd argument of next function for tff.learning.algorithms.build_fed_kmeans

The build_fed_kmeans function has been called like so:

iterative_process = tff.learning.algorithms.build_fed_kmeans( 10, data_shape = (7811,3), random_seed = (2,5) ) 

Error

TypeNotAssignableError: Type `<x=float64[7811,3]>*` is not assignable to type `float32[7811,3]*` 

How can I go correcting this error?

submitted by /u/ChaosAdm
[visit reddit] [comments]

Leave a Reply

Your email address will not be published. Required fields are marked *