Why don’t use use the same way of calling the test_loader as the train_loader?
Specifically:
model.eval()
for batch_idx, input in enumerate(test_loader):
    sample_frame(model, input)

or something similar…