(im_size, n_feature, depth, batch_norm, finact)
return layers
Create MLP discriminator network

    Arguments:
        im_size (int): Image size
        n_feature (int): Base number of features
        depth (int): Depth of network
        batch_norm(bool): Enable batch normalization
        finact (object): Final activation function
Create MLP discriminator network
Create MLP discriminator network
def create_mlp_discriminator(im_size, n_feature, depth, batch_norm, finact):
    """
    Create MLP discriminator network

    Arguments:
        im_size (int): Image size
        n_feature (int): Base number of features
        depth (int): Depth of network
        batch_norm(bool): Enable batch normalization
        finact (object): Final activation function
    """
    assert depth > 1, "depth of the MLP has to be at least 2"
    layers = []
    for i in range(depth-1):
        lname = 'dis-{0}.{1}'.format(i, n_feature)
        layers.append(mlp_layer(lname, n_feature, batch_norm=batch_norm))
    lname = 'dis-{0}.{1}-{2}'.format(depth-1, n_feature, 1)
    layers.append(mlp_layer(lname, 1, activation=finact, batch_norm=batch_norm))
    return layers
def create_mlp_discriminator ( im_size , n_feature , depth , batch_norm , finact ) : assert depth > 1 , "depth of the MLP has to be at least 2" layers = [ ] for i in range ( depth - 1 ) : lname = 'dis-{0}.{1}' . format ( i , n_feature ) layers . append ( mlp_layer ( lname , n_feature , batch_norm = batch_norm ) ) lname = 'dis-{0}.{1}-{2}' . format ( depth - 1 , n_feature , 1 ) layers . append ( mlp_layer ( lname , 1 , activation = finact , batch_norm = batch_norm ) ) return layers