'How to do Multitask Learning in R-Keras?

I'm dealing with an image classification problem in which I have different types of labels for every observation. I'm trying to do multitask learning using R keras. The only problem is that I have to use the keras 'Data Loader' because the dataset is huge and I don't know how to use the flow_images_from_directory function for multi-output models. Please someone help me.



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source