OpenMined / TenSEAL

A library for doing homomorphic encryption operations on tensors
Apache License 2.0
837 stars 158 forks source link

How to implement average on CKKS Tensor? #447

Open firstresponse502 opened 1 year ago

firstresponse502 commented 1 year ago

I used the code below to calculate average on unencrypted tensor but finding hard to do on CKKS Tensor even though I know Tenseal only provide addition, subtraction and multiplication operations. Any help will be appreciated.

for grad_list_tuple in zip(*scaled_weight_list): layer_mean = tf.math.reduce_mean(grad_list_tuple, axis=0)