import tensorflow as tf

        layer = conv(inp, 'resconv1'+nom, size=3, strides=first_stride, out_channels=out_num_filters, alpha=alpha, padding='SAME')
        layer = batch_norm(layer, 'batch_norm_resconv1'+nom, phase=phase)
        layer = conv(layer, 'resconv2'+nom, size=3, strides=[1, 1, 1, 1], out_channels=out_num_filters, apply_relu=False,alpha=alpha, padding='SAME')
        layer = batch_norm(layer, 'batch_norm_resconv2'+nom, phase=phase)
        
        if increase_dim:
                projection = conv(inp, 'projconv'+nom, size=1, strides=[1, 2, 2, 1], out_channels=out_num_filters, alpha=alpha, apply_relu=False,padding='SAME',bias=False)
                projection = batch_norm(projection, 'batch_norm_projconv'+nom, phase=phase)
                if last:
                    block = layer + projection
                else:
                    block = layer + projection
                    block = tf.nn.relu(block, name='relu')
        else:
            if last:
                block = layer + inp
            else:
                block = layer + inp
                block = tf.nn.relu(block, name='relu')
        
        return block
    
    # First conv
    #layer = batch_norm(inp, 'batch_norm_0', phase=phase)
