NVIDIA / DALI

A GPU-accelerated library containing highly optimized building blocks and an execution engine for data processing to accelerate deep learning training and inference applications.
https://docs.nvidia.com/deeplearning/dali/user-guide/docs/index.html
Apache License 2.0
5.18k stars 621 forks source link

TF Keras Multiple inputs/outputs #2700

Open LucasSloan opened 3 years ago

LucasSloan commented 3 years ago

tf.keras allows you to define models with multiple inputs and outputs, but in order to use the standard keras training loops, you need to provide a tf.Dataset which returns either 2 tuples or 2 dictionaries.

I can see how to create a tf.Dataset with DALI that returns more than 2 tensors, but I don't see how to return tuples or dictionaries. Is there a way to do that?

JanuszL commented 3 years ago

@awolant ?

awolant commented 3 years ago

Thanks for the question. Right now something like this is not supported in DALI out of the box, unfortunately. We have outputs mapping for TF dataset on our radar.

Are you interested in scenario similar to the one in the TensorFlow docs you linked? If you need something different, it would be very helpful, if you could share some small toy example, that we could test against.

Also, do you need this in multi-gpu setup?

LucasSloan commented 3 years ago

The linked example covers my needs. Thanks!

gemenerik commented 2 years ago

The linked example covers my needs. Thanks!

Has the linked example been removed?

Also, this issue was added to user requests and was marked as done two months later, but I can not find any reference to an implementation. Was it cancelled? I can not return a dictionary or tuple from my pipeline in v1.10.0

JanuszL commented 2 years ago

Hi @gemenerik,

I think that this issue may have been closed by mistake. I thought that The linked example covers my needs. Thanks! means that the issue is resolved, while the sentence refers to the link describing the use case.

I'm sorry but it still has not been implemented.

nivosco commented 2 years ago

Hi! Any updates on that issue? I also have a Keras use case which requires multi-input support...

JanuszL commented 2 years ago

@nivosco,

Sorry to say, but still no.