PROFESSIONAL-MACHINE-LEARNING-ENGINEER · Question #260
You are developing an ML model to identify your company's products in images. You have access to over one million images in a Cloud Storage bucket. You plan to experiment with different TensorFlow mod
The correct answer is C. Convert the images to TFRecords and store them in a Cloud Storage bucket. Read the. To efficiently read over one million images at scale for TensorFlow model training on Vertex AI while minimizing I/O bottlenecks, convert the images to TFRecords and store them in Cloud Storage.
Question
Options
- ALoad the images directly into the Vertex AI compute nodes by using Cloud Storage FUSE. Read
- BCreate a Vertex AI managed dataset from your image data. Access the
- CConvert the images to TFRecords and store them in a Cloud Storage bucket. Read the
- DStore the URLs of the images in a CSV file. Read the file by using the
How the community answered
(32 responses)- A6% (2)
- B9% (3)
- C81% (26)
- D3% (1)
Why each option
To efficiently read over one million images at scale for TensorFlow model training on Vertex AI while minimizing I/O bottlenecks, convert the images to TFRecords and store them in Cloud Storage.
While Cloud Storage FUSE allows mounting a bucket, it can introduce overhead and might not be as optimized for high-throughput, random access reading of millions of small files as TFRecords, potentially leading to I/O bottlenecks.
Creating a Vertex AI managed dataset can simplify data management, but it doesn't inherently optimize the I/O performance for reading raw image files at scale for TensorFlow training; the underlying format still matters.
Converting images to TFRecords (or other similar binary formats) allows for efficient serialization of data, grouping multiple examples into larger files, and optimizing I/O operations. TensorFlow's `tf.data.TFRecordDataset` is highly optimized for reading these files in parallel, minimizing bottlenecks when streaming large image datasets from Cloud Storage during training.
Storing URLs in a CSV and reading images one by one directly from Cloud Storage is inefficient due to many small HTTP requests and network latency, which will significantly bottleneck training for a large dataset.
Concept tested: Efficient large-scale image data loading for TensorFlow training
Source: https://www.tensorflow.org/tutorials/load_data/tfrecord
Topics
Community Discussion
No community discussion yet for this question.