qertclever.blogg.se

Tensorflow custom data generator
Tensorflow custom data generator









tensorflow custom data generator

tensorflow custom data generator

I came over this handy method tf._generator() which helps us create a dataset object from the ImageDatagenerator object itself. It was easy using ImageDataGenerator especially with directory and data frame method to load in images made things easier without any hassle.

Tensorflow custom data generator how to#

I wasn't sure how to construct complex pipelines. The tf.data API enables you to build complex input pipelines from simple, reusable pieces. Also, we can optimize the performance of our data pipelines by using prefetch, parallelizing data transformations, and other cool methods. Oh yeah, then I started to look into the tf.data API and it was a bit confusing at first but spending time on that made me realize this could help me writing descriptive and efficient input pipelines. There was no much fun either and the results were poor. It was easy building things with high-level API but as the days go by performance was an issue and I felt constricted on doing things. Since I am new to TensorFlow and tf.data API was something I wasn’t comfortable with. This is just for experiment purposes learning how to use tf._generators() and this dataset seems a suitable one to experiment with. For this experiment, we’ll use a dataset from the AI Crowd competition (live now)











Tensorflow custom data generator