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

        # initialized variables
        _, _, z = 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.A_.t().matmul(self.L_.t()) * step_size

            # apply one 'iteration'
            residual = z.matmul(self.L_).matmul(self.A_) - x
            z = z - residual.matmul(W)
            z = pseudo_soft_th_tensor(z, lbda * step_size, 1.0)

        return z
 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)
        _, _, z = 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.A_.t().matmul(self.L_.t()) * step_size
            residual = z.matmul(self.L_).matmul(self.A_) - x
            z = z - residual.matmul(W)
            z = pseudo_soft_th_tensor(z, lbda * step_size, 1.0)
        return z
def forward ( self , x , lbda , output_layer = None ) : output_layer = self . check_output_layer ( output_layer ) _ , _ , z = 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 . A_ . t ( ) . matmul ( self . L_ . t ( ) ) * step_size residual = z . matmul ( self . L_ ) . matmul ( self . A_ ) - x z = z - residual . matmul ( W ) z = pseudo_soft_th_tensor ( z , lbda * step_size , 1.0 ) return z
Forward pass of the network.
Forward pass of the network .
""" Forward pass of the network. """ # initialized variables # retrieve parameters # apply one 'iteration'
self
x
lbda
output_layer