models/dense_net.py
def _new_kernels_to_last_layer(self, kernel_num, complementarity=True):
        """
        Add new convolution kernels to the current last (composite) layer.
        The number of kernels to be added is given by the kernel_num parameter.

        Args:
            kernel_num: `int`, number of new kernels (i.e. convolutions) to add
                to the last layer (usually the specified expansion rate);
            complementarity: `bool`, whether a complementarity mechanism
                should be used to initialise new kernels or not
                (see add_new_kernels_to_layer for more on this).
        """
        # Safely access the current block's variable scope.
        with tf.variable_scope(self.current_block,
                               auxiliary_name_scope=False) as cblock_scope:
            with tf.name_scope(cblock_scope.original_name_scope):
                # Add the kernel and save the new relevant inputs and outputs.
                self.output = self.add_new_kernels_to_layer(
                    self.input_lt_lay, self.input_lt_cnv,
                    self.layer_num_list[-1]-1, kernel_num,
                    complementarity=complementarity)

        # Delete the last cross-entropy from the list, we will recreate it.
        del self.cross_entropy[-1]

        print("ADDED %d NEW KERNEL(S) TO LAYER #%d (BLOCK #%d)! "
              "It now has got %d kernels." %
              (kernel_num, self.layer_num_list[-1]-1, self.total_blocks-1,
               len(self.kernels_ref_list[-1][-1])))

        self._define_end_graph_operations(preserve_transition=True)
        self._initialize_uninitialized_variables()
        self._count_trainable_params_in_use()

        Add new convolution kernels to the current last (composite) layer.
        The number of kernels to be added is given by the kernel_num parameter.

        Args:
            kernel_num: `int`, number of new kernels (i.e. convolutions) to add
                to the last layer (usually the specified expansion rate);
            complementarity: `bool`, whether a complementarity mechanism
                should be used to initialise new kernels or not
                (see add_new_kernels_to_layer for more on this).
        
Add new convolution kernels to the current last (composite) layer.
The number of kernels to be added is given by the kernel_num parameter.
Add new convolution kernels to the current last ( composite ) layer . The number of kernels to be added is given by the kernel_num parameter .
def _new_kernels_to_last_layer(self, kernel_num, complementarity=True):
        with tf.variable_scope(self.current_block,
                               auxiliary_name_scope=False) as cblock_scope:
            with tf.name_scope(cblock_scope.original_name_scope):
                self.output = self.add_new_kernels_to_layer(
                    self.input_lt_lay, self.input_lt_cnv,
                    self.layer_num_list[-1]-1, kernel_num,
                    complementarity=complementarity)
        del self.cross_entropy[-1]
        print("ADDED %d NEW KERNEL(S) TO LAYER #%d (BLOCK #%d)! "
              "It now has got %d kernels." %
              (kernel_num, self.layer_num_list[-1]-1, self.total_blocks-1,
               len(self.kernels_ref_list[-1][-1])))
        self._define_end_graph_operations(preserve_transition=True)
        self._initialize_uninitialized_variables()
        self._count_trainable_params_in_use()
def _new_kernels_to_last_layer ( self , kernel_num , complementarity = True ) : with tf . variable_scope ( self . current_block , auxiliary_name_scope = False ) as cblock_scope : with tf . name_scope ( cblock_scope . original_name_scope ) : self . output = self . add_new_kernels_to_layer ( self . input_lt_lay , self . input_lt_cnv , self . layer_num_list [ - 1 ] - 1 , kernel_num , complementarity = complementarity ) del self . cross_entropy [ - 1 ] print ( "ADDED %d NEW KERNEL(S) TO LAYER #%d (BLOCK #%d)! " "It now has got %d kernels." % ( kernel_num , self . layer_num_list [ - 1 ] - 1 , self . total_blocks - 1 , len ( self . kernels_ref_list [ - 1 ] [ - 1 ] ) ) ) self . _define_end_graph_operations ( preserve_transition = True ) self . _initialize_uninitialized_variables ( ) self . _count_trainable_params_in_use ( )
Add new convolution kernels to the current last (composite) layer.
Add new convolution kernels to the current last ( composite ) layer .
"""
        Add new convolution kernels to the current last (composite) layer.
        The number of kernels to be added is given by the kernel_num parameter.

        Args:
            kernel_num: `int`, number of new kernels (i.e. convolutions) to add
                to the last layer (usually the specified expansion rate);
            complementarity: `bool`, whether a complementarity mechanism
                should be used to initialise new kernels or not
                (see add_new_kernels_to_layer for more on this).
        """ # Safely access the current block's variable scope. # Add the kernel and save the new relevant inputs and outputs. # Delete the last cross-entropy from the list, we will recreate it.
self
kernel_num
`int`, number of new kernels  to add
to the last layer (usually the specified expansion rate).
` int ` number of new kernels to add to the last layer ( usually the specified expansion rate ) .
complementarity
`bool`, whether a complementarity mechanism
should be used to initialise new kernels or not
.
` bool ` whether a complementarity mechanism should be used to initialise new kernels or not .