(z_generator, batch_size)
Returns an infinite generator that runs through randomized
    training data repeatedly in shuffled order, forever.
Returns an infinite generator that runs through randomized
    training data repeatedly in shuffled order, forever.
Returns an infinite generator that runs through randomized training data repeatedly in shuffled order forever .
def training_loader(z_generator, batch_size):
    '''
    Returns an infinite generator that runs through randomized
    training data repeatedly in shuffled order, forever.
    '''
    epoch = 0
    while True:
        z_dataset = zdataset.z_dataset_for_model(
                z_generator, size=batch_size * 50, seed=epoch + global_seed)
        dataloader = torch.utils.data.DataLoader(
                z_dataset,
                batch_size=batch_size, num_workers=2,
                pin_memory=True)
        for batch in dataloader:
            yield batch
        epoch += 1
def training_loader ( z_generator , batch_size ) : epoch = 0 while True : z_dataset = zdataset . z_dataset_for_model ( z_generator , size = batch_size * 50 , seed = epoch + global_seed ) dataloader = torch . utils . data . DataLoader ( z_dataset , batch_size = batch_size , num_workers = 2 , pin_memory = True ) for batch in dataloader : yield batch epoch += 1