use .numpy() on the input batch, and transform the data using scipy as you wish. If it is CPU tensor, data pointer is shared between torch.Tensor and it’s corresponding ndarray generated with .numpy().
See for example:
x = torch.Tensor([1, 2, 3])
y = x.numpy()
print(x)
print(y)

x.add_(1)

print(x)
print(y)

# see that y has also changed if you added something to x

# Similarly,

y += 1
print(x)
print(y)

# changing y in-place also changes x.