In addition to what @ptrblck said, you will probably need a custom collate_fn because tensors can’t contain strings.