nncf/experimental/torch/nas/bootstrapNAS/elasticity/elastic_width.py
def forward(self, weight: torch.Tensor, bias: Optional[torch.Tensor]) -> List[torch.Tensor]:
        """
        Trims linear layer's parameters according to active number of output channels.

        :param weight: weight tensor to be trimmed
        :param bias: bias tensor to be trimmed
        :return: list of trimmed linear parameters
        """
        new_bias = None if bias is None else bias[:self._active_width]
        return [weight[:self._active_width, :], new_bias]

        Trims linear layer's parameters according to active number of output channels.

        :param weight: weight tensor to be trimmed
        :param bias: bias tensor to be trimmed
        :return: list of trimmed linear parameters
        
Trims linear layer's parameters according to active number of output channels.
Trims linear layer ' s parameters according to active number of output channels .
def forward(self, weight: torch.Tensor, bias: Optional[torch.Tensor]) -> List[torch.Tensor]:
        new_bias = None if bias is None else bias[:self._active_width]
        return [weight[:self._active_width, :], new_bias]
def forward ( self , weight : torch . Tensor , bias : Optional [ torch . Tensor ] ) -> List [ torch . Tensor ] : new_bias = None if bias is None else bias [ : self . _active_width ] return [ weight [ : self . _active_width , : ] , new_bias ]
Trims linear layer's parameters according to active number of output channels.
Trims linear layer ' s parameters according to active number of output channels .
"""
        Trims linear layer's parameters according to active number of output channels.

        :param weight: weight tensor to be trimmed
        :param bias: bias tensor to be trimmed
        :return: list of trimmed linear parameters
        """
list of trimmed linear parameters
list of trimmed linear parameters
self
weight
torch.Tensor
weight tensor to be trimmed
weight tensor to be trimmed
bias
Optional[torch.Tensor]
bias tensor to be trimmed
bias tensor to be trimmed