spyrit.core.nnet.List_denoi

class spyrit.core.nnet.List_denoi(Denoi, n_denoi)[source]

Bases: Module

A list of layers, which can be denoising layers or any other layers.

The list consists of n_denoi layers of the same type. The forward pass of this model takes an input tensor and an iteration number. The iteration number is used to select the layer to apply to the input tensor. If the iteration number is greater than or equal to n_denoi, the last layer is applied to the input tensor.

Each layer can then be modified by the user to have different weights, by accessing the layers in the conv attribute.

Attributes:

n_denoi (int): The number of layers in the list.

conv (torch.nn.ModuleList): The list of layers.

Args:

Denoi (torch.nn.Module): The layer to be repeated in the list.

n_denoi (int): The number of layers in the list.

Methods

forward(x, iterate)

Forward pass of the List_denoi model.