Extend ImageFolder in pytorch to return a tensor of a different shape?

Is this a double post from here or are these use cases somehow different?