zea.backend.tensorflow.models.lista

Model and constructor for unfolded convolutional ISTA

Functions

UnfoldingModel(input_dim[, activation, ...])

Unfolding Iterative Shrinking and Thresholding Model

Classes

Prox(*args, **kwargs)

Proximal layer

class zea.backend.tensorflow.models.lista.Prox(*args, **kwargs)[source]

Bases: Layer

Proximal layer

build(input_shape)[source]

Creates the variables of the layer (optional, for subclass implementers).

This is a method that implementers of subclasses of Layer or Model can override if they need a state-creation step in-between layer instantiation and layer call.

This is typically used to create the weights of Layer subclasses.

Parameters:

input_shape – Instance of TensorShape, or list of instances of TensorShape if the layer expects a list of inputs (one instance per input).

call(inputs, *args, **kwargs)[source]

Apply the proximal operator.

Parameters:
  • inputs (Tensor) – Input tensor.

  • *args – Additional positional arguments.

  • **kwargs – Additional keyword arguments.

Returns:

Output after applying the proximal operator.

Return type:

Tensor

compute_output_shape(input_shape)[source]

Computes the output shape of the layer.

If the layer has not been built, this method will call build on the layer. This assumes that the layer will later be used with inputs that match the input shape provided here.

Parameters:

input_shape – Shape tuple (tuple of integers) or list of shape tuples (one per output tensor of the layer). Shape tuples can include None for free dimensions, instead of an integer.

Returns:

An input shape tuple.

zea.backend.tensorflow.models.lista.UnfoldingModel(input_dim, activation=None, folds=5, upsampling=1, P0_dim=None, P1_dim=None)[source]

Unfolding Iterative Shrinking and Thresholding Model

Parameters:
  • input_dim (tuple) – input dimensions

  • activation (str, optional) – final activation function. Defaults to None.

  • folds (int, optional) – number of folds. Defaults to 5.

  • upsampling (int, optional) – upsampling of output. Defaults to 1.

  • P0_dim (list, optional) – dimensions of conv kernels. Defaults to [1, 5].

  • P1_dim (list, optional) – dimensions of conv kernels. Defaults to [1, 5].

Returns:

unfolded LISTA model

Return type:

tf model