models/dense_net.py
def bottleneck(self, _input, out_features):
        """
        Bottleneck function, used before the composite function H_l in the
        dense layers of DenseNet-BC.

        Takes a concatenation of previous outputs and performs:
        - batch normalisation,
        - ReLU activation function,
        - 2d convolution, with kernel size 1 (produces 4x the features of H_l),
        - dropout, if required (training the graph and keep_prob not set to 1).
        Returns the output tensor and a reference to the 2d convolution kernel.

        Args:
            _input: tensor, the operation's input;
            out_features: `int`, number of feature maps at the output of H_l;
            kernel_size: `int`, size of the square kernels (their side).
        """
        with tf.variable_scope("bottleneck"):
            # batch normalisation
            output = self.batch_norm(_input)
            # ReLU activation function
            output = tf.nn.relu(output)
            inter_features = out_features * 4
            # 2d convolution (produces intermediate features)
            output, filter_ref = self.conv2d(
                output, out_features=inter_features, kernel_size=1,
                padding='VALID')
            # dropout (if the graph is being trained and keep_prob is not 1)
            output = self.dropout(output)
        return output, filter_ref

        Bottleneck function, used before the composite function H_l in the
        dense layers of DenseNet-BC.

        Takes a concatenation of previous outputs and performs:
        - batch normalisation,
        - ReLU activation function,
        - 2d convolution, with kernel size 1 (produces 4x the features of H_l),
        - dropout, if required (training the graph and keep_prob not set to 1).
        Returns the output tensor and a reference to the 2d convolution kernel.

        Args:
            _input: tensor, the operation's input;
            out_features: `int`, number of feature maps at the output of H_l;
            kernel_size: `int`, size of the square kernels (their side).
        
Bottleneck function, used before the composite function H_l in the
dense layers of DenseNet-BC.

Takes a concatenation of previous outputs and performs:
batch normalisation,
ReLU activation function,
2d convolution, with kernel size 1 (produces 4x the features of H_l),
dropout, if required (training the graph and keep_prob not set to 1).
Returns the output tensor and a reference to the 2d convolution kernel.
Bottleneck function used before the composite function H_l in the dense layers of DenseNet - BC . Takes a concatenation of previous outputs and performs : batch normalisation ReLU activation function 2d convolution with kernel size 1 ( produces 4x the features of H_l ) dropout if required ( training the graph and keep_prob not set to 1 ) . Returns the output tensor and a reference to the 2d convolution kernel .
def bottleneck(self, _input, out_features):
        with tf.variable_scope("bottleneck"):
            output = self.batch_norm(_input)
            output = tf.nn.relu(output)
            inter_features = out_features * 4
            output, filter_ref = self.conv2d(
                output, out_features=inter_features, kernel_size=1,
                padding='VALID')
            output = self.dropout(output)
        return output, filter_ref
def bottleneck ( self , _input , out_features ) : with tf . variable_scope ( "bottleneck" ) : output = self . batch_norm ( _input ) output = tf . nn . relu ( output ) inter_features = out_features * 4 output , filter_ref = self . conv2d ( output , out_features = inter_features , kernel_size = 1 , padding = 'VALID' ) output = self . dropout ( output ) return output , filter_ref
Bottleneck function, used before the composite function H_l in the
dense layers of DenseNet-BC.
Bottleneck function used before the composite function H_l in the dense layers of DenseNet - BC .
"""
        Bottleneck function, used before the composite function H_l in the
        dense layers of DenseNet-BC.

        Takes a concatenation of previous outputs and performs:
        - batch normalisation,
        - ReLU activation function,
        - 2d convolution, with kernel size 1 (produces 4x the features of H_l),
        - dropout, if required (training the graph and keep_prob not set to 1).
        Returns the output tensor and a reference to the 2d convolution kernel.

        Args:
            _input: tensor, the operation's input;
            out_features: `int`, number of feature maps at the output of H_l;
            kernel_size: `int`, size of the square kernels (their side).
        """ # batch normalisation # ReLU activation function # 2d convolution (produces intermediate features) # dropout (if the graph is being trained and keep_prob is not 1)
self
_input
tensor, the operation's input.
tensor the operation ' s input .
out_features
`int`, number of feature maps at the output of H_l.
` int ` number of feature maps at the output of H_l .
kernel_size
`int`, size of the square kernels (their side).
` int ` size of the square kernels ( their side ) .