models/dense_net.py
def _new_block(self):
        """
        Add a transition layer, and a new block (with one layer) at the end
        of the current last block.
        In DenseNet-BC mode, the new module will begin with two layers
        (bottleneck and composite/convolution) instead of just one.
        """
        # The input of the last block is useful if the block must be ditched.
        self.input_lt_blc = self.transition_layer(
            self.output, self.total_blocks-1)
        # The inputs of the last layer and conv are for kernel-wise self-const.
        self.output, self.input_lt_lay, self.input_lt_cnv = self.add_block(
            self.input_lt_blc, self.total_blocks, self.growth_rate, 1, True)
        self.layer_num_list.append(1)
        self.total_blocks += 1

        print("ADDED A NEW BLOCK (#%d), "
              "The number of layers in each block is now:" %
              (self.total_blocks-1))
        if not self.bc_mode:
            print('\n'.join('Block %d: %d composite layers.' % (
                k, self.layer_num_list[k]) for k in range(len(
                    self.layer_num_list))))
        if self.bc_mode:
            print('\n'.join('Block %d: %d bottleneck layers and %d composite'
                            'layers.' % (k, self.layer_num_list[k],
                                         self.layer_num_list[k])
                            for k in range(len(self.layer_num_list))))

        self.update_paths()
        self._define_end_graph_operations()
        self._initialize_uninitialized_variables()
        self._count_trainable_params_in_use()

        Add a transition layer, and a new block (with one layer) at the end
        of the current last block.
        In DenseNet-BC mode, the new module will begin with two layers
        (bottleneck and composite/convolution) instead of just one.
        
Add a transition layer, and a new block (with one layer) at the end
of the current last block.
In DenseNet-BC mode, the new module will begin with two layers
(bottleneck and composite/convolution) instead of just one.
Add a transition layer and a new block ( with one layer ) at the end of the current last block . In DenseNet - BC mode the new module will begin with two layers ( bottleneck and composite / convolution ) instead of just one .
def _new_block(self):
        self.input_lt_blc = self.transition_layer(
            self.output, self.total_blocks-1)
        self.output, self.input_lt_lay, self.input_lt_cnv = self.add_block(
            self.input_lt_blc, self.total_blocks, self.growth_rate, 1, True)
        self.layer_num_list.append(1)
        self.total_blocks += 1
        print("ADDED A NEW BLOCK (#%d), "
              "The number of layers in each block is now:" %
              (self.total_blocks-1))
        if not self.bc_mode:
            print('\n'.join('Block %d: %d composite layers.' % (
                k, self.layer_num_list[k]) for k in range(len(
                    self.layer_num_list))))
        if self.bc_mode:
            print('\n'.join('Block %d: %d bottleneck layers and %d composite'
                            'layers.' % (k, self.layer_num_list[k],
                                         self.layer_num_list[k])
                            for k in range(len(self.layer_num_list))))
        self.update_paths()
        self._define_end_graph_operations()
        self._initialize_uninitialized_variables()
        self._count_trainable_params_in_use()
def _new_block ( self ) : self . input_lt_blc = self . transition_layer ( self . output , self . total_blocks - 1 ) self . output , self . input_lt_lay , self . input_lt_cnv = self . add_block ( self . input_lt_blc , self . total_blocks , self . growth_rate , 1 , True ) self . layer_num_list . append ( 1 ) self . total_blocks += 1 print ( "ADDED A NEW BLOCK (#%d), " "The number of layers in each block is now:" % ( self . total_blocks - 1 ) ) if not self . bc_mode : print ( '\n' . join ( 'Block %d: %d composite layers.' % ( k , self . layer_num_list [ k ] ) for k in range ( len ( self . layer_num_list ) ) ) ) if self . bc_mode : print ( '\n' . join ( 'Block %d: %d bottleneck layers and %d composite' 'layers.' % ( k , self . layer_num_list [ k ] , self . layer_num_list [ k ] ) for k in range ( len ( self . layer_num_list ) ) ) ) self . update_paths ( ) self . _define_end_graph_operations ( ) self . _initialize_uninitialized_variables ( ) self . _count_trainable_params_in_use ( )
Add a transition layer, and a new block (with one layer) at the end
of the current last block.
Add a transition layer and a new block ( with one layer ) at the end of the current last block .
"""
        Add a transition layer, and a new block (with one layer) at the end
        of the current last block.
        In DenseNet-BC mode, the new module will begin with two layers
        (bottleneck and composite/convolution) instead of just one.
        """ # The input of the last block is useful if the block must be ditched. # The inputs of the last layer and conv are for kernel-wise self-const.
self