rfho/models.py
def convolutional_layer_2d(init_w=None, init_b=tf.zeros, strides=(1, 1, 1, 1),
                           padding='SAME', act=tf.nn.relu):
    """
    Helper function for 2d convolutional layer

    :param padding:
    :param init_w:
    :param init_b:
    :param strides:
    :param act:
    :return: an initializer
    """
    if init_w is None: init_w = lambda shape: tf.truncated_normal(shape, stddev=.1)

    def _init(_input, shape):
        _W = create_or_reuse(init_w, shape, name='W')
        _b = create_or_reuse(init_b, [shape[-1]], name='b')
        linear_activation = tf.nn.conv2d(_input, _W, strides=strides, padding=padding, name='linear_activation') + _b
        activation = act(linear_activation)
        return _W, _b, activation

    return _init

    Helper function for 2d convolutional layer

    :param padding:
    :param init_w:
    :param init_b:
    :param strides:
    :param act:
    :return: an initializer
    
Helper function for 2d convolutional layer
Helper function for 2d convolutional layer
def convolutional_layer_2d(init_w=None, init_b=tf.zeros, strides=(1, 1, 1, 1),
                           padding='SAME', act=tf.nn.relu):
    if init_w is None: init_w = lambda shape: tf.truncated_normal(shape, stddev=.1)
    def _init(_input, shape):
        _W = create_or_reuse(init_w, shape, name='W')
        _b = create_or_reuse(init_b, [shape[-1]], name='b')
        linear_activation = tf.nn.conv2d(_input, _W, strides=strides, padding=padding, name='linear_activation') + _b
        activation = act(linear_activation)
        return _W, _b, activation
    return _init
def convolutional_layer_2d ( init_w = None , init_b = tf . zeros , strides = ( 1 , 1 , 1 , 1 ) , padding = 'SAME' , act = tf . nn . relu ) : if init_w is None : init_w = lambda shape : tf . truncated_normal ( shape , stddev = .1 ) def _init ( _input , shape ) : _W = create_or_reuse ( init_w , shape , name = 'W' ) _b = create_or_reuse ( init_b , [ shape [ - 1 ] ] , name = 'b' ) linear_activation = tf . nn . conv2d ( _input , _W , strides = strides , padding = padding , name = 'linear_activation' ) + _b activation = act ( linear_activation ) return _W , _b , activation return _init
Helper function for 2d convolutional layer
Helper function for 2d convolutional layer
"""
    Helper function for 2d convolutional layer

    :param padding:
    :param init_w:
    :param init_b:
    :param strides:
    :param act:
    :return: an initializer
    """
None
init_w
None
init_b
None
strides
None
padding
None
act
None