thiagodma:

seed = np.random.randint(2147483647)
for ch in img:
    random.seed(seed)
    x.append(tfms(Image.fromarray(ch)))



Actually you should use torch.manual_seed and not python random.seed, because the transforms functions use torch.rand(1) to generate a random number and you may get different results for different channels.