This shouldn’t be the case, as it would indicate that the other ImageFolder approach would return a single tensor (instead of the data and target tensors).
Could you post a code snippet to reproduce this behavior?