models/dense_net.py
def conv2d_with_given_kernels(self, _input, kernels,
                                  strides=[1, 1, 1, 1], padding='SAME'):
        """
        Creates a 2d convolutional filter layer, by using a given list of 3d
        kernels to create a filter (stacking them together).
        Returns the output of the layer and a reference to its filter.

        Args:
            _input: tensor, the operation's input;
            kernels: `list` of tensors, contains each of the kernels from which
                the convolution will be built;
            strides: `list` of `int`, strides in each direction for kernels;
            padding: `str`, should we use padding ('SAME') or not ('VALID').
        """
        # The kernels are stacked together so as to create a 4d filter.
        # Using the same name = good idea?
        filter_ref = tf.stack(kernels, axis=3, name='filter')
        output = tf.nn.conv2d(_input, filter_ref, strides, padding)
        return output, filter_ref

        Creates a 2d convolutional filter layer, by using a given list of 3d
        kernels to create a filter (stacking them together).
        Returns the output of the layer and a reference to its filter.

        Args:
            _input: tensor, the operation's input;
            kernels: `list` of tensors, contains each of the kernels from which
                the convolution will be built;
            strides: `list` of `int`, strides in each direction for kernels;
            padding: `str`, should we use padding ('SAME') or not ('VALID').
        
Creates a 2d convolutional filter layer, by using a given list of 3d
kernels to create a filter (stacking them together).
Returns the output of the layer and a reference to its filter.
Creates a 2d convolutional filter layer by using a given list of 3d kernels to create a filter ( stacking them together ) . Returns the output of the layer and a reference to its filter .
def conv2d_with_given_kernels(self, _input, kernels,
                                  strides=[1, 1, 1, 1], padding='SAME'):
        filter_ref = tf.stack(kernels, axis=3, name='filter')
        output = tf.nn.conv2d(_input, filter_ref, strides, padding)
        return output, filter_ref
def conv2d_with_given_kernels ( self , _input , kernels , strides = [ 1 , 1 , 1 , 1 ] , padding = 'SAME' ) : filter_ref = tf . stack ( kernels , axis = 3 , name = 'filter' ) output = tf . nn . conv2d ( _input , filter_ref , strides , padding ) return output , filter_ref
Creates a 2d convolutional filter layer, by using a given list of 3d
kernels to create a filter (stacking them together).
Creates a 2d convolutional filter layer by using a given list of 3d kernels to create a filter ( stacking them together ) .
"""
        Creates a 2d convolutional filter layer, by using a given list of 3d
        kernels to create a filter (stacking them together).
        Returns the output of the layer and a reference to its filter.

        Args:
            _input: tensor, the operation's input;
            kernels: `list` of tensors, contains each of the kernels from which
                the convolution will be built;
            strides: `list` of `int`, strides in each direction for kernels;
            padding: `str`, should we use padding ('SAME') or not ('VALID').
        """ # The kernels are stacked together so as to create a 4d filter. # Using the same name = good idea?
self
_input
tensor, the operation's input.
tensor the operation ' s input .
kernels
`list` of tensors, contains each of the kernels from which
the convolution will be built.
` list ` of tensors contains each of the kernels from which the convolution will be built .
strides
`list` of `int`, strides in each direction for kernels.
` list ` of ` int ` strides in each direction for kernels .
padding
`str`, should we use padding ('SAME') or not ('VALID').
` str ` should we use padding ( ' SAME ' ) or not ( ' VALID ' ) .