We already have a ToTensor class that transform numpy-style image into a torch tensor. It seems that a ToVariable class could also added to boost the data loading performance via multiprocess at the data loading step. Does this idea make sense ? Thanks.
class ToVariable(object):
    """Convert Tensors in sample to Variable."""

    def __call__(self, sample):
        return Variable(sample)