carpet/lista_analysis_dual.py
def forward(self, x, lbda, output_layer=None):
        """ Forward pass of the network. """
        output_layer = self.check_output_layer(output_layer)

        # initialized variables
        v, _, _ = init_vuz(self.A, self.D, x, inv_A=self.inv_A_,
                           device=self.device)

        for layer_id in range(output_layer):
            layer_params = self.parameter_groups[f'layer-{layer_id}']
            # retrieve parameters
            step_size = layer_params['step_size']
            W = self.Psi_A_ * step_size

            # apply one 'dual iteration'
            residual = v.matmul(self.Psi_A_.t()) - x
            v = v - residual.matmul(W)
            v = torch.clamp(v, -lbda, lbda)

        return v
 Forward pass of the network. 
Forward pass of the network.
Forward pass of the network .
def forward(self, x, lbda, output_layer=None):
        output_layer = self.check_output_layer(output_layer)
        v, _, _ = init_vuz(self.A, self.D, x, inv_A=self.inv_A_,
                           device=self.device)
        for layer_id in range(output_layer):
            layer_params = self.parameter_groups[f'layer-{layer_id}']
            step_size = layer_params['step_size']
            W = self.Psi_A_ * step_size
            residual = v.matmul(self.Psi_A_.t()) - x
            v = v - residual.matmul(W)
            v = torch.clamp(v, -lbda, lbda)
        return v
def forward ( self , x , lbda , output_layer = None ) : output_layer = self . check_output_layer ( output_layer ) v , _ , _ = init_vuz ( self . A , self . D , x , inv_A = self . inv_A_ , device = self . device ) for layer_id in range ( output_layer ) : layer_params = self . parameter_groups [ f'layer-{layer_id}' ] step_size = layer_params [ 'step_size' ] W = self . Psi_A_ * step_size residual = v . matmul ( self . Psi_A_ . t ( ) ) - x v = v - residual . matmul ( W ) v = torch . clamp ( v , - lbda , lbda ) return v
Forward pass of the network.
Forward pass of the network .
""" Forward pass of the network. """ # initialized variables # retrieve parameters # apply one 'dual iteration'
self
x
lbda
output_layer