def get_fname(config):
    """
    Parameters
    ----------
    config : dict
        A dictionary with all the arguments and flags.

    Returns
    -------
    fname : str
        The filename for the saved model.
    """
    hidden_dims_str = '_'.join([str(x) for x in config['hidden_dims']])
    num_heads_str = '_'.join([str(x) for x in config['num_heads']])
    batch_size = config['batch_size']
    epochs = config['epochs']
    lr = config['lr']
    weight_decay = config['weight_decay']
    dropout = config['dropout']
    transductive = str(config['transductive'])
    fname = 'gat_hidden_dims_{}_num_heads_{}_batch_size_{}_epochs_{}_lr_{}_weight_decay_{}_dropout_{}_transductive_{}.pth'.format(
        hidden_dims_str, num_heads_str, batch_size, epochs, lr,
        weight_decay, dropout, transductive)

    return fname