def shuffle(self, epoch):
    g = torch.Generator()
    g.manual_seed(epoch)
    bin_ids = list(torch.randperm(len(self.bins), generator=g))
    self.bins = [self.bins[i] for i in bin_ids]
def shuffle(self, epoch):
    g = torch.Generator()
    g.manual_seed(epoch)
    bin_ids = list(torch.randperm(len(self.bins), generator=g))
    self.bins = [self.bins[i] for i in bin_ids]