PROFESSIONAL-MACHINE-LEARNING-ENGINEER · Question #64
You have been asked to develop an input pipeline for an ML training model that processes images from disparate sources at a low latency. You discover that your input data does not fit in memory. How s
The correct answer is D. Convert the images into TFRecords, store the images in Cloud Storage, and then use the tf.data. Cite from Google Pag: to construct a Dataset from data in memory, use tf.data.Dataset.from_tensors() or tf.data.Dataset.from_tensor_slices(). When input data is stored in a file (not in memory), the recommended TFRecord format, you can use tf.data.TFRecordDataset(). tf.data.Datas
Question
Options
- ACreate a tf.data.Dataset.prefetch transformation.
- BConvert the images to tf.Tensor objects, and then run Dataset.from_tensor_slices().
- CConvert the images to tf.Tensor objects, and then run tf.data.Dataset.from_tensors().
- DConvert the images into TFRecords, store the images in Cloud Storage, and then use the tf.data
How the community answered
(39 responses)- A5% (2)
- B3% (1)
- C13% (5)
- D79% (31)
Explanation
Cite from Google Pag: to construct a Dataset from data in memory, use tf.data.Dataset.from_tensors() or tf.data.Dataset.from_tensor_slices(). When input data is stored in a file (not in memory), the recommended TFRecord format, you can use tf.data.TFRecordDataset(). tf.data.Dataset is for data in memory. tf.data.TFRecordDataset is for data in non-memory storage.
Topics
Community Discussion
No community discussion yet for this question.