zea.backend.tensorflow.layers.utils

Tensorflow utilities

Functions

antirect(x)

Function that implements the antirectifier activation

get_activation([activation])

Get activation function given string.

tf_complex_resize(tensor, image_size)

Resize / interpolate complex tensor

tf_cropping_and_padding(input_shape, ...)

Crop or pad a tensor to the specified shape.

tf_unwrap(tensor[, axis])

Tensorflow phase unwrapping function

zea.backend.tensorflow.layers.utils.antirect(x)[source]

Function that implements the antirectifier activation

zea.backend.tensorflow.layers.utils.get_activation(activation=None)[source]

Get activation function given string.

Parameters:

activation (str, optional) – name of activation function. Defaults to None.

Raises:

ValueError – Cannot find activation function

Returns:

Tensorflow activation function

zea.backend.tensorflow.layers.utils.tf_complex_resize(tensor, image_size)[source]

Resize / interpolate complex tensor

zea.backend.tensorflow.layers.utils.tf_cropping_and_padding(input_shape, target_shape)[source]

Crop or pad a tensor to the specified shape.

Parameters:
  • input_shape – A list or tuple of integers representing the input shape.

  • target_shape – A list or tuple of integers representing the desired shape.

Returns:

A tensorflow cropping layer (2D) for 4D tensors.

zea.backend.tensorflow.layers.utils.tf_unwrap(tensor, axis=0)[source]

Tensorflow phase unwrapping function