I guess this line of code raises the error:
test_iter = Iterator(tst, batch_size=64, device=torch.device, sort=False, sort_within_batch=False, repeat=False)

since you are passing torch.device as the object type to the device argument, while you should pass an instance (torch.device('cuda')) or a str to it.