PondPrivateTensor

class tf_encrypted.protocol.pond.PondPrivateTensor(prot: tf_encrypted.protocol.pond.Pond, share0: tf_encrypted.tensor.factory.AbstractTensor, share1: tf_encrypted.tensor.factory.AbstractTensor, is_scaled: bool)[source]

This class represents a private value that may be unknown to everyone.

shape
Return type:List[int]
Returns:The shape of this tensor.
unwrapped

Unwrap the tensor.

This will return the shares for each of the parties that collectively own the tensor.

x_0, y_0 = tensor.unwrapped
# x_0 == private shares of the value pinned to player_0's device.
# y_0 == private shares of the value pinned to player_1's device.

In most cases you will not need to use this method. All funtions will hide this functionality for you (e.g. add, mul, etc).