def create_generator(latent_size):
    """
    Create the generator of the GAN for a given latent size.

    Parameters
    ----------
    latent_size : int
        The size of the latent space of the generator.

    Returns
    -------
    generator : torch.nn.Module
        A PyTorch model of the generator.
    """

    class Generator(nn.Module):
        def __init__(self, latent_size):
            super(Generator, self).__init__()
            self.layer1 = nn.Linear(latent_size, latent_size)
            self.layer2 = nn.Linear(latent_size, latent_size)
            nn.init.eye_(self.layer1.weight)
            nn.init.eye_(self.layer2.weight)

        def forward(self, x):
            x = F.relu(self.layer1(x))
            x = F.relu(self.layer2(x))
            return x

    return Generator(latent_size)

    Create the generator of the GAN for a given latent size.

    Parameters
    ----------
    latent_size : int
        The size of the latent space of the generator.

    Returns
    -------
    generator : torch.nn.Module
        A PyTorch model of the generator.
    
pyod/models/gaal_base.py