Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

about extract_data in preprocessor.py #35

Open
KYYOnull opened this issue Nov 14, 2024 · 0 comments
Open

about extract_data in preprocessor.py #35

KYYOnull opened this issue Nov 14, 2024 · 0 comments

Comments

@KYYOnull
Copy link

this func has no writing action to pkl files, it seems to have no contribution for the next training?

for dataset in dataset_splits:
    if dataset.mode != 'extract_data':
        raise Exception('Dataset mode should be extract_data')

data_loaders = []
for dataset in dataset_splits:
    dl = torch_data.DataLoader(
        dataset, batch_size=batch_size,
        shuffle=False, num_workers=num_workers)
    data_loaders.append(dl)

print("Extracting pre-processed data...")

num_mini_batches = sum(
    [len(data_loader) for data_loader in data_loaders])
mini_batch_count = 0

for data_loader in data_loaders:
    for i, _ in enumerate(data_loader):
        if verbose:
            print(
                "mini batch " + str(mini_batch_count + 1) + '/' + str(num_mini_batches))
            mini_batch_count += 1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant