I am trying to change a property of my Dataset. However the value is not updated when using workers. What do I need to do to allow dynamic update of variables when using workers to load data via DataLoader?
Example:
ImageDataset(torch.utils.data.Dataset):
_variance = 1.0
@property
def i(self):
    return type(self)._variance

@i.setter
def i(self, val):
    type(self)._variance = val

From the training loop:
ImageDataset._variance = 0.5