Prepare Interview

Mock Exams

Make Homepage

Bookmark this page

Subscribe Email Address

Question: How can you handle missing data in a TensorFlow dataset?
Answer: Missing data can be handled using the tf.data.Dataset.skip and tf.data.Dataset.filter operations to skip or filter out examples with missing values.

Example:

dataset = dataset.filter(lambda x, y: tf.math.logical_not(tf.reduce_any(tf.math.is_nan(x))))

Is it helpful? Yes No

Most helpful rated by users:

©2025 WithoutBook