def bottleneck(l, ch_out, stride, preact):
    ch_in = l.get_shape().as_list()[(- 1)]
    input = l
    if (preact == 'both_preact'):
        l = tf.nn.relu(l, name='preact-relu')
        input = l
    l = Conv2D('conv1', l, ch_out, 1, stride=stride)
    l = BatchNorm('bn1', l)
    l = tf.nn.relu(l)
    l = Conv2D('conv2', l, ch_out, 3)
    l = BatchNorm('bn2', l)
    l = tf.nn.relu(l)
    l = Conv2D('conv3', l, (ch_out * 4), 1)
    l = BatchNorm('bn3', l)
    return (l + shortcut(input, ch_in, (ch_out * 4), stride))
def bottleneck(l, ch_out, stride, preact):
    ch_in = l.get_shape().as_list()[(- 1)]
    input = l
    if (preact == 'both_preact'):
        l = tf.nn.relu(l, name='preact-relu')
        input = l
    l = Conv2D('conv1', l, ch_out, 1, stride=stride)
    l = BatchNorm('bn1', l)
    l = tf.nn.relu(l)
    l = Conv2D('conv2', l, ch_out, 3)
    l = BatchNorm('bn2', l)
    l = tf.nn.relu(l)
    l = Conv2D('conv3', l, (ch_out * 4), 1)
    l = BatchNorm('bn3', l)
    return (l + shortcut(input, ch_in, (ch_out * 4), stride))