Complete the code to create a TensorFlow dataset from a list of numbers.
import tensorflow as tf numbers = [1, 2, 3, 4, 5] dataset = tf.data.Dataset.[1](numbers)
The from_tensor_slices method creates a dataset from a list or array by slicing it into elements.
Complete the code to shuffle the dataset with a buffer size of 10.
dataset = dataset.[1](buffer_size=10)
The shuffle method randomly shuffles the elements of the dataset using the specified buffer size.
Fix the error in the code to batch the dataset with batch size 4.
dataset = dataset.[1](4)
The batch method groups elements into batches of the given size.
Fill both blanks to create a dataset from a list, shuffle it with buffer size 5.
dataset = tf.data.Dataset.[1](data).[2](buffer_size=5)
First, create the dataset from the list using from_tensor_slices, then shuffle it with shuffle.
Fill all three blanks to create a dataset from a list, shuffle with buffer size 8, and batch with size 3.
dataset = tf.data.Dataset.[1](items).[2](buffer_size=8).[3](3)
Create the dataset with from_tensor_slices, shuffle it with shuffle, then group into batches with batch.