Second part of the discriminator which takes a 256x8x8 feature map as input
    and generates the loss based on whether the input image was a real one or fake one

def discriminator2(ndf, no_bias=True, fix_gamma=True, eps=1e-5 + 1e-12):
    '''Second part of the discriminator which takes a 256x8x8 feature map as input
    and generates the loss based on whether the input image was a real one or fake one'''

    BatchNorm = mx.sym.BatchNorm

    data = mx.sym.Variable('data')

    label = mx.sym.Variable('label')

    d4 = mx.sym.Convolution(data, name='d4', kernel=(5,5), stride=(2,2), pad=(2,2), num_filter=ndf*8, no_bias=no_bias)
    dbn4 = BatchNorm(d4, name='dbn4', fix_gamma=fix_gamma, eps=eps)
    dact4 = mx.sym.LeakyReLU(dbn4, name='dact4', act_type='leaky', slope=0.2)

    h = mx.sym.Flatten(dact4)

    d5 = mx.sym.FullyConnected(h, num_hidden=1, name="d5")

    dloss = mx.sym.LogisticRegressionOutput(data=d5, label=label, name='dloss')

    return dloss