nncf/experimental/torch/nas/bootstrapNAS/elasticity/elastic_kernel.py
def generate_kernel_size_list(self, max_kernel_size: KernelSizeType) -> List[KernelSizeType]:
        """
        Generates list of available kernel size values.

        :param max_kernel_size: maximum value of kernel size, it's supposed to be odd
        :return: list of kernel size values.
        """
        DEFAULT_KERNEL_SIZE_STEP = 2
        assert max_kernel_size % 2 > 0, 'kernel size should be odd number'
        if max_kernel_size == 1:
            return [1]
        kernel = max_kernel_size
        ks_list = []
        while kernel > 1:
            ks_list.append(kernel)
            kernel -= DEFAULT_KERNEL_SIZE_STEP
            if self._max_num_params == len(ks_list):
                break
        return ks_list

        Generates list of available kernel size values.

        :param max_kernel_size: maximum value of kernel size, it's supposed to be odd
        :return: list of kernel size values.
        
Generates list of available kernel size values.
Generates list of available kernel size values .
def generate_kernel_size_list(self, max_kernel_size: KernelSizeType) -> List[KernelSizeType]:
        DEFAULT_KERNEL_SIZE_STEP = 2
        assert max_kernel_size % 2 > 0, 'kernel size should be odd number'
        if max_kernel_size == 1:
            return [1]
        kernel = max_kernel_size
        ks_list = []
        while kernel > 1:
            ks_list.append(kernel)
            kernel -= DEFAULT_KERNEL_SIZE_STEP
            if self._max_num_params == len(ks_list):
                break
        return ks_list
def generate_kernel_size_list ( self , max_kernel_size : KernelSizeType ) -> List [ KernelSizeType ] : DEFAULT_KERNEL_SIZE_STEP = 2 assert max_kernel_size % 2 > 0 , 'kernel size should be odd number' if max_kernel_size == 1 : return [ 1 ] kernel = max_kernel_size ks_list = [ ] while kernel > 1 : ks_list . append ( kernel ) kernel -= DEFAULT_KERNEL_SIZE_STEP if self . _max_num_params == len ( ks_list ) : break return ks_list
Generates list of available kernel size values.
Generates list of available kernel size values .
"""
        Generates list of available kernel size values.

        :param max_kernel_size: maximum value of kernel size, it's supposed to be odd
        :return: list of kernel size values.
        """
list of kernel size values.
list of kernel size values .
self
max_kernel_size
KernelSizeType
maximum value of kernel size, it's supposed to be odd
maximum value of kernel size it ' s supposed to be odd