models/dense_net.py
def _new_layer(self, growth_rate):
        """
        Add a new layer at the end of the current last block.
        In DenseNet-BC mode, two layers (bottleneck and composite/convolution)
        will be added instead of just one.

        Args:
            growth_rate: `int`, number of kernels (i.e. convolutions) in the
                new composite layer (usually the specified growth rate).
        """
        # 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 layer and save the new relevant inputs and outputs.
                self.input_lt_lay = self.output
                self.output, self.input_lt_cnv = self.add_internal_layer(
                    self.input_lt_lay, self.layer_num_list[-1], growth_rate)
        self.layer_num_list[-1] += 1

        # Refresh cross-entropy list if not measuring layer cross-entropies.
        if not self.ft_cross_entropies:
            self.cross_entropy = []

        if not self.bc_mode:
            print("ADDED A NEW LAYER (%d kernels) to the last block (#%d)! "
                  "It now has got %d layers." %
                  (growth_rate, self.total_blocks-1, self.layer_num_list[-1]))
        if self.bc_mode:
            print("ADDED A NEW BOTTLENECK AND A NEW COMPOSITE LAYER "
                  "(%d kernels) to the last block (#%d)! "
                  "It now has got %d bottleneck and %d composite layers." %
                  (growth_rate, self.total_blocks-1,
                   self.layer_num_list[-1], self.layer_num_list[-1]))

        self.update_paths()
        self._define_end_graph_operations(
            preserve_transition=self.preserve_transition_l)
        self._initialize_uninitialized_variables()
        self._count_trainable_params_in_use()

        Add a new layer at the end of the current last block.
        In DenseNet-BC mode, two layers (bottleneck and composite/convolution)
        will be added instead of just one.

        Args:
            growth_rate: `int`, number of kernels (i.e. convolutions) in the
                new composite layer (usually the specified growth rate).
        
Add a new layer at the end of the current last block.
In DenseNet-BC mode, two layers (bottleneck and composite/convolution)
will be added instead of just one.
Add a new layer at the end of the current last block . In DenseNet - BC mode two layers ( bottleneck and composite / convolution ) will be added instead of just one .
def _new_layer(self, growth_rate):
        with tf.variable_scope(self.current_block,
                               auxiliary_name_scope=False) as cblock_scope:
            with tf.name_scope(cblock_scope.original_name_scope):
                self.input_lt_lay = self.output
                self.output, self.input_lt_cnv = self.add_internal_layer(
                    self.input_lt_lay, self.layer_num_list[-1], growth_rate)
        self.layer_num_list[-1] += 1
        if not self.ft_cross_entropies:
            self.cross_entropy = []
        if not self.bc_mode:
            print("ADDED A NEW LAYER (%d kernels) to the last block (#%d)! "
                  "It now has got %d layers." %
                  (growth_rate, self.total_blocks-1, self.layer_num_list[-1]))
        if self.bc_mode:
            print("ADDED A NEW BOTTLENECK AND A NEW COMPOSITE LAYER "
                  "(%d kernels) to the last block (#%d)! "
                  "It now has got %d bottleneck and %d composite layers." %
                  (growth_rate, self.total_blocks-1,
                   self.layer_num_list[-1], self.layer_num_list[-1]))
        self.update_paths()
        self._define_end_graph_operations(
            preserve_transition=self.preserve_transition_l)
        self._initialize_uninitialized_variables()
        self._count_trainable_params_in_use()
def _new_layer ( self , growth_rate ) : with tf . variable_scope ( self . current_block , auxiliary_name_scope = False ) as cblock_scope : with tf . name_scope ( cblock_scope . original_name_scope ) : self . input_lt_lay = self . output self . output , self . input_lt_cnv = self . add_internal_layer ( self . input_lt_lay , self . layer_num_list [ - 1 ] , growth_rate ) self . layer_num_list [ - 1 ] += 1 if not self . ft_cross_entropies : self . cross_entropy = [ ] if not self . bc_mode : print ( "ADDED A NEW LAYER (%d kernels) to the last block (#%d)! " "It now has got %d layers." % ( growth_rate , self . total_blocks - 1 , self . layer_num_list [ - 1 ] ) ) if self . bc_mode : print ( "ADDED A NEW BOTTLENECK AND A NEW COMPOSITE LAYER " "(%d kernels) to the last block (#%d)! " "It now has got %d bottleneck and %d composite layers." % ( growth_rate , self . total_blocks - 1 , self . layer_num_list [ - 1 ] , self . layer_num_list [ - 1 ] ) ) self . update_paths ( ) self . _define_end_graph_operations ( preserve_transition = self . preserve_transition_l ) self . _initialize_uninitialized_variables ( ) self . _count_trainable_params_in_use ( )
Add a new layer at the end of the current last block.
Add a new layer at the end of the current last block .
"""
        Add a new layer at the end of the current last block.
        In DenseNet-BC mode, two layers (bottleneck and composite/convolution)
        will be added instead of just one.

        Args:
            growth_rate: `int`, number of kernels (i.e. convolutions) in the
                new composite layer (usually the specified growth rate).
        """ # Safely access the current block's variable scope. # Add the layer and save the new relevant inputs and outputs. # Refresh cross-entropy list if not measuring layer cross-entropies.
self
growth_rate
`int`, number of kernels  in the
new composite layer (usually the specified growth rate).
` int ` number of kernels in the new composite layer ( usually the specified growth rate ) .