spyrit.core.nnet.List_denoi.forward
- List_denoi.forward(x: tensor, iterate: int) tensor[source]
Forward pass of the List_denoi model.
It takes as input 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.
- Args:
x (torch.tensor): Input tensor. Its shape is defined by the input layer of the Denoi layer.
iterate (int): The iteration number. It is used to select the layer to apply to the input tensor.
- Returns:
torch.tensor: The output tensor of the selected layer.