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

How to load my own dataset #248

Open
WEIYI2021 opened this issue Nov 2, 2022 · 1 comment
Open

How to load my own dataset #248

WEIYI2021 opened this issue Nov 2, 2022 · 1 comment

Comments

@WEIYI2021
Copy link

This repo has used cifar as the dataset for training. If I want to use my own dataset, how can I revise the code ?

@andsteing
Copy link
Collaborator

When you specify config.dataset, this can be a tfds dataset name (like cifar10) or the path to a directory (see the Colab vit_jax_augreg.ipynb for an illustration). The implementation of the data loading from tfds / directory is in the file vit_jax/input_pipeline.py.

If you want to use the dataset from the command line, you'll also have to extend the config, in particular this place:

def with_dataset(config: ml_collections.ConfigDict,
dataset: str) -> ml_collections.ConfigDict:
config = ml_collections.ConfigDict(config.to_dict())
config.dataset = dataset
config.update(DATASET_PRESETS[dataset])
return config

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

2 participants