Batchnorm

class tf_encrypted.layers.batchnorm.Batchnorm(input_shape: List[int], mean: numpy.ndarray, variance: numpy.ndarray, scale: numpy.ndarray, offset: numpy.ndarray, variance_epsilon: float = 1e-08)[source]

Batch Normalization Layer

Parameters:
  • input_shape (List[int]) – input shape of the data flowing into the layer
  • mean (np.ndarray) –

  • variance (np.ndarray) –

  • scale (np.ndarray) –

  • offset (np.ndarray) –

  • variance_epsilon (float) –

backward() → None[source]

backward is not implemented for batchnorm

Raises:NotImplementedError
forward(x: tf_encrypted.protocol.pond.PondPrivateTensor) → tf_encrypted.protocol.pond.PondPrivateTensor[source]

Forward pass for inference

get_output_shape() → List[int][source]

Returns the layer’s output shape