Complete the code to create a DataLoader with batch size 32.
loader = DataLoader(dataset, batch_size=[1])The batch_size parameter controls how many samples are loaded per batch. Here, 32 is the correct batch size.
Complete the code to enable shuffling of data in the DataLoader.
loader = DataLoader(dataset, batch_size=32, shuffle=[1])
Setting shuffle=True makes the DataLoader shuffle the data at every epoch, which helps training.
Fix the error in the DataLoader creation by choosing the correct batch size type.
loader = DataLoader(dataset, batch_size=[1], shuffle=True)
batch_size must be an integer, not a string or other type.
Fill both blanks to create a DataLoader with batch size 64 and shuffling enabled.
loader = DataLoader(dataset, batch_size=[1], shuffle=[2])
Batch size 64 and shuffle=True correctly configure the DataLoader for training.
Fill all three blanks to create a DataLoader with batch size 16, shuffling enabled, and drop_last set to True.
loader = DataLoader(dataset, batch_size=[1], shuffle=[2], drop_last=[3])
batch_size=16, shuffle=True, and drop_last=True ensure batches are shuffled and incomplete last batch is dropped.