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

Can we have an example showing how to use in-memory object, e.g., TF Dataset #1

Open
leocnj opened this issue Sep 18, 2020 · 1 comment
Assignees
Labels
good first issue Good for newcomers

Comments

@leocnj
Copy link

leocnj commented Sep 18, 2020

Thanks for creating this project. It will be very useful to allow TF users to have something like PyTorch Lighting.

I already have my codes that convert text files into TF Dataset and want to give DeepTrain a try. Will you please provide a simple example showing how to use Dataset in DataGenerator.

@OverLordGoldDragon
Copy link
Owner

Glad you find it useful.

I'm not too familiar with tf.Dataset; I found some of its mechanisms needlessly complicated, and performance gains from using TFRECORDs negligible. If you have any specific features in mind that tf.Dataset provides that DataGenerator doesn't, I can note it as a feature request (or explain it if you're unsure how-to). For example, there's much to gain from Dataset's train-load parallelism, for which I'm willing to consider built-in support (currently, there isn't one).

You have two options: (1) convert your data pipeline from Dataset to a DataGenerator-equivalent; (2) make Dataset work with DataGenerator. I can't say much without seeing your specific Dataset configuration, but I'll show where to look: DataGenerator and DataLoader here, and DataLoader docs. So for (2), you'll need to set up Dataset so that it takes set_num as input and returns data as output. Each DataGenerator has two DataLoaders, one for "data" x and other for labels y (see here).

I'm guessing others will have similar concerns, so I'm willing to take a closer look at your case if you share sufficient code.

@OverLordGoldDragon OverLordGoldDragon added the good first issue Good for newcomers label Sep 18, 2020
@OverLordGoldDragon OverLordGoldDragon self-assigned this Sep 18, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

2 participants