It looks like there is a custom dataloader implementation being used that doesn’t return target tensors but rather a list of tensors.
Do you want to convert the targets to a single tensor? You can likely just use stack or cat depending on whether you want a dimension to be added.
Otherwise, you can do something similar to what is already done for data (target = [t.cuda() for t in target]).