(z_generator, batch_size)
Returns an infinite generator that runs through randomized z
    batches, forever.
Returns an infinite generator that runs through randomized z
    batches, forever.
Returns an infinite generator that runs through randomized z batches forever .
def training_loader(z_generator, batch_size):
    '''
    Returns an infinite generator that runs through randomized z
    batches, forever.
    '''
    g_epoch = 1
    while True:
        z_data = zdataset.z_dataset_for_model(
                z_generator, size=10000, seed=g_epoch + global_seed)
        dataloader = torch.utils.data.DataLoader(
                z_data,
                shuffle=False,
                batch_size=batch_size,
                num_workers=10,
                pin_memory=True)
        for batch in dataloader:
            yield batch
        g_epoch += 1
def training_loader ( z_generator , batch_size ) : g_epoch = 1 while True : z_data = zdataset . z_dataset_for_model ( z_generator , size = 10000 , seed = g_epoch + global_seed ) dataloader = torch . utils . data . DataLoader ( z_data , shuffle = False , batch_size = batch_size , num_workers = 10 , pin_memory = True ) for batch in dataloader : yield batch g_epoch += 1