import torch


def create_random_dictionary(normalize=False):
    """
    Creates a random (normal) dictionary.
    :param normalize: Bool. Normalize L0 norm of dictionary if True.
    :return: Tensor. Created dictionary
    """
    dictionary = torch.rand((64, 512))
    if normalize:
        dictionary = dictionary.__div__(torch.norm(dictionary, p=2, dim=0))

    return dictionary